1description('Tests that pages that use DeviceOrientation are not put in the page cache.'); 2 3if (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 10var pageOneOnloadCount = 0; 11function 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 20debug("Main page opening resources/cached-page-1.html"); 21window.open("resources/cached-page-1.html"); 22 23window.jsTestIsAsync = true; 24window.successfullyParsed = true; 25