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