Home | History | Annotate | Download | only in script-tests
      1 description('Tests that pages that use DeviceOrientation are not put in the page cache.');
      2 
      3 if (window.layoutTestController) {
      4     layoutTestController.waitUntilDone();
      5     layoutTestController.setCanOpenWindows();
      6     layoutTestController.overridePreference('WebKitUsesPageCachePreferenceKey', 1);
      7 } else
      8     debug('This test can not be run without the LayoutTestController');
      9 
     10 var pageOneOnloadCount = 0;
     11 function reportPageOneOnload() {
     12     ++pageOneOnloadCount;
     13     debug('resources/cached-page-1.html onload fired, count = ' + pageOneOnloadCount);
     14     if (pageOneOnloadCount == 2) {
     15         finishJSTest();
     16     }
     17     return pageOneOnloadCount;
     18 }
     19 
     20 debug("Main page opening resources/cached-page-1.html");
     21 window.open("resources/cached-page-1.html");
     22 
     23 window.jsTestIsAsync = true;
     24 window.successfullyParsed = true;
     25