Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/page-reload-cancel-permission-requests.js

Issue 1367853002: Move GeolocationDispatcher into blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 description("Tests that when a page is reloaded, the frame is properly detached from the Geolocation object " +
2 "to ensure that no permission requests are in progress.");
3
4 window.jsTestIsAsync = true;
5
6 var numPendingRequests;
7 var isReload = false;
8
9 if ("#reload" == location.hash)
10 isReload = true;
11
12 if (!window.testRunner || !window.internals)
13 debug('This test can not run without testRunner or internals');
14
15 internals.setGeolocationClientMock(document);
16 numPendingRequests = internals.numberOfPendingGeolocationPermissionRequests(docu ment);
17 shouldBe('numPendingRequests', '0');
18
19 if (isReload)
20 finishJSTest();
21
22 if (!isReload) {
23 // Kick off a position request and then reload the page, this should set up
24 // a permission request. Permission should be undecided at this point, so th e
25 // permission request should still be outstanding by page reload.
26
27 function onIframeReady()
28 {
29 // Make request on remote frame's Geolocation object.
30 iframe.contentWindow.navigator.geolocation.getCurrentPosition(
31 function(p) {
32 testFailed('Permission should not be determined for this page: ' + p);
33 finishJSTest();
34 });
35
36 location.hash = '#reload';
37 location.reload();
38 }
39
40 debug("Create IFrame");
41 var iframe = document.createElement('iframe');
42 iframe.src = 'resources/page-reload-cancel-permission-requests-inner.html';
43 document.body.appendChild(iframe);
44 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698