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

Unified Diff: LayoutTests/fast/dom/Geolocation/script-tests/invalid-internals-arguments.js

Issue 1197733009: Prepare LayoutTests for lazy loading testRunner and internals. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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: LayoutTests/fast/dom/Geolocation/script-tests/invalid-internals-arguments.js
diff --git a/LayoutTests/fast/dom/Geolocation/script-tests/invalid-internals-arguments.js b/LayoutTests/fast/dom/Geolocation/script-tests/invalid-internals-arguments.js
index d5e3d43caa4fcb4d16da7a3fef2986535f718dbb..81010c6dda8557d561385dd83aab743b1d78e6f6 100644
--- a/LayoutTests/fast/dom/Geolocation/script-tests/invalid-internals-arguments.js
+++ b/LayoutTests/fast/dom/Geolocation/script-tests/invalid-internals-arguments.js
@@ -14,10 +14,13 @@ 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("iframe.internals.setGeolocationClientMock(iframe.document)");
-shouldBeUndefined("iframe.internals.setGeolocationPosition(iframe.document, 1, 2, 3)");
-shouldBeUndefined("iframe.internals.setGeolocationPermission(iframe.document, true)");
-shouldBeUndefined("iframe.internals.setGeolocationPositionUnavailableError(iframe.document, 'not available')");
-shouldBe("iframe.internals.numberOfPendingGeolocationPermissionRequests(iframe.document)", "-1");
+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