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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/Window/file-origin-window-open.html

Issue 1799423003: Apply WebSettings before initializing the main frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comment. Created 4 years, 9 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/Window/file-origin-window-open.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Window/file-origin-window-open.html b/third_party/WebKit/LayoutTests/fast/dom/Window/file-origin-window-open.html
new file mode 100644
index 0000000000000000000000000000000000000000..99c6a056a0d068c72e1c25d608c3c4320a91aab1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dom/Window/file-origin-window-open.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script>
+// Note: this test must indirect through a file:// iframe, since the original test page is
+// created with an origin that has universal access.
+
+jsTestIsAsync = true;
+
+description('Test that web settings are applied early enough when creating a new view: if the settings are applied to late, a new window created by a file:// URL will have universal access even if universal access is not enabled.');
+
+if (window.testRunner) {
+ testRunner.setAllowUniversalAccessFromFileURLs(false);
+ testRunner.setAllowFileAccessFromFileURLs(false);
+ testRunner.setCanOpenWindows(true);
+}
+
+window.addEventListener('message', function (e) {
+ if (e.data)
+ testPassed(e.data);
+ else
+ testFailed('accessing newWindow.document did not throw!');
+ finishJSTest();
+});
+</script>
+</head>
+<body>
+<iframe src="resources/file-origin-window-open-frame.html"></iframe>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698