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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/invalid-internals-arguments.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/invalid-internals-arguments.js
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/invalid-internals-arguments.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/invalid-internals-arguments.js
deleted file mode 100644
index 81010c6dda8557d561385dd83aab743b1d78e6f6..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/invalid-internals-arguments.js
+++ /dev/null
@@ -1,26 +0,0 @@
-description("Verify that using invalid or detached documents on internal test methods does not crash.");
-
-// The internals object and these test methods aren't available in production
-// builds, but they are exposed to fuzzers.
-
-if (!window.testRunner || !window.internals)
- debug('This test can not run without testRunner or internals');
-
-shouldThrow("internals.setGeolocationClientMock(null);");
-shouldThrow("internals.setGeolocationPosition(null, 1, 2, 3);");
-shouldThrow("internals.setGeolocationPermission(window.notThere, true);");
-shouldThrow("internals.setGeolocationPositionUnavailableError(null, 'not available');");
-shouldThrow("internals.numberOfPendingGeolocationPermissionRequests(null)");
-
-var ifr = document.getElementById("ifr");
-var iframe = ifr.contentWindow;
-// Must access it first so it exists, we cannot get internals from a detached frame window.
-var iframeInternals = iframe.internals;
-ifr.remove();
-
-// Verify that detached documents do not crash.
-shouldBeUndefined("iframeInternals.setGeolocationClientMock(iframe.document)");
-shouldBeUndefined("iframeInternals.setGeolocationPosition(iframe.document, 1, 2, 3)");
-shouldBeUndefined("iframeInternals.setGeolocationPermission(iframe.document, true)");
-shouldBeUndefined("iframeInternals.setGeolocationPositionUnavailableError(iframe.document, 'not available')");
-shouldBe("iframeInternals.numberOfPendingGeolocationPermissionRequests(iframe.document)", "-1");

Powered by Google App Engine
This is Rietveld 408576698