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

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

Issue 1948033003: Convert most geolocation layout tests to use a JS mock implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission-disconnect
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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/page-reload-cancel-permission-requests.js
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/page-reload-cancel-permission-requests.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/page-reload-cancel-permission-requests.js
deleted file mode 100644
index f7e29edfbfcd072ea766fce88ed8641448fa55ea..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/page-reload-cancel-permission-requests.js
+++ /dev/null
@@ -1,44 +0,0 @@
-description("Tests that when a page is reloaded, the frame is properly detached from the Geolocation object " +
- "to ensure that no permission requests are in progress.");
-
-window.jsTestIsAsync = true;
-
-var numPendingRequests;
-var isReload = false;
-
-if ("#reload" == location.hash)
- isReload = true;
-
-if (!window.testRunner || !window.internals)
- debug('This test can not run without testRunner or internals');
-
-internals.setGeolocationClientMock(document);
-numPendingRequests = internals.numberOfPendingGeolocationPermissionRequests(document);
-shouldBe('numPendingRequests', '0');
-
-if (isReload)
- finishJSTest();
-
-if (!isReload) {
- // Kick off a position request and then reload the page, this should set up
- // a permission request. Permission should be undecided at this point, so the
- // permission request should still be outstanding by page reload.
-
- function onIframeReady()
- {
- // Make request on remote frame's Geolocation object.
- iframe.contentWindow.navigator.geolocation.getCurrentPosition(
- function(p) {
- testFailed('Permission should not be determined for this page: ' + p);
- finishJSTest();
- });
-
- location.hash = '#reload';
- location.reload();
- }
-
- debug("Create IFrame");
- var iframe = document.createElement('iframe');
- iframe.src = 'resources/page-reload-cancel-permission-requests-inner.html';
- document.body.appendChild(iframe);
-}

Powered by Google App Engine
This is Rietveld 408576698