| 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>
|
|
|