no-page-cache.js revision f486d19d62f1bc33246748b14b14a9dfa617b57f
1description("Tests that pages that use Geolocation are not put in the page cache.<br><br>Currently, Geolocation does not work with the page cache so pages that use Geolocation are explicitly prevented from entering the cache. This test checks for accidental enabling of the page Cache for Geolocation. See https://bugs.webkit.org/show_bug.cgi?id=43956 for details.");
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 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