Commit 61cb516b authored by steveblock@google.com's avatar steveblock@google.com

2010-08-13 Steve Block <steveblock@google.com>

        Reviewed by Alexey Proskuryakov.

        Need a LayoutTest to check that pages using Geolocation are not put in the page cache
        https://bugs.webkit.org/show_bug.cgi?id=43957

        * fast/dom/Geolocation/no-page-cache-expected.txt: Added.
        * fast/dom/Geolocation/no-page-cache.html: Added.
        * fast/dom/Geolocation/resources/cached-page-1.html: Added.
        * fast/dom/Geolocation/resources/cached-page-2.html: Added.
        * fast/dom/Geolocation/script-tests/no-page-cache.js: Added.
        (reportPageOneOnload):
        * platform/gtk/Skipped: Added new test to GTK skipped list


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65325 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c48c5bc4
2010-08-13 Steve Block <steveblock@google.com>
Reviewed by Alexey Proskuryakov.
Need a LayoutTest to check that pages using Geolocation are not put in the page cache
https://bugs.webkit.org/show_bug.cgi?id=43957
* fast/dom/Geolocation/no-page-cache-expected.txt: Added.
* fast/dom/Geolocation/no-page-cache.html: Added.
* fast/dom/Geolocation/resources/cached-page-1.html: Added.
* fast/dom/Geolocation/resources/cached-page-2.html: Added.
* fast/dom/Geolocation/script-tests/no-page-cache.js: Added.
(reportPageOneOnload):
* platform/gtk/Skipped: Added new test to GTK skipped list
2010-08-13 Nate Chapin <japhet@chromium.org>
Unreviewed, Chromium test_expectations.txt updates + a rebaseline
Tests that pages that use Geolocation are not put in the page cache.
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.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Main page opening resources/cached-page-1.html
resources/cached-page-1.html fired, count = 1
resources/cached-page-1.html about to navigate to resources/cached-page-2.html
resources/cached-page-2.html about to go back to resources/cached-page-1.html
resources/cached-page-1.html fired, count = 2
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<link rel="stylesheet" href="../../js/resources/js-test-style.css">
<script src="../../js/resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script src="script-tests/no-page-cache.js"></script>
<script src="../../js/resources/js-test-post.js"></script>
</body>
</html>
<script>
function loadNext() {
var geolocation = navigator.geolocation;
if (window.opener.reportPageOneOnload() == 1) {
window.opener.debug('resources/cached-page-1.html about to navigate to resources/cached-page-2.html')
location.href = 'cached-page-2.html';
}
}
</script>
<body onload="loadNext()"></body>
<script>
function init() {
window.opener.pageTwoLoaded = true;
window.opener.debug('resources/cached-page-2.html about to go back to resources/cached-page-1.html');
history.back();
}
</script>
<body onload="init()"></body>
description("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.");
if (window.layoutTestController) {
layoutTestController.waitUntilDone();
layoutTestController.setCanOpenWindows();
layoutTestController.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
} else
debug('This test can not be run without the LayoutTestController');
var pageOneOnloadCount = 0;
function reportPageOneOnload() {
++pageOneOnloadCount;
debug('resources/cached-page-1.html fired, count = ' + pageOneOnloadCount);
if (pageOneOnloadCount == 2) {
finishJSTest();
}
return pageOneOnloadCount;
}
debug("Main page opening resources/cached-page-1.html");
window.open("resources/cached-page-1.html");
window.jsTestIsAsync = true;
window.successfullyParsed = true;
......@@ -1094,6 +1094,7 @@ fast/dom/Geolocation/delayed-permission-allowed.html
fast/dom/Geolocation/delayed-permission-denied.html
fast/dom/Geolocation/error.html
fast/dom/Geolocation/multiple-requests.html
fast/dom/Geolocation/no-page-cache.html
fast/dom/Geolocation/permission-denied-already-clear-watch.html
fast/dom/Geolocation/position-string.html
fast/dom/Geolocation/reentrant-error.html
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment