| Index: LayoutTests/http/tests/security/cross-frame-access-parent-isolated-world.html
|
| diff --git a/LayoutTests/http/tests/security/cross-frame-access-parent-isolated-world.html b/LayoutTests/http/tests/security/cross-frame-access-parent-isolated-world.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1235b6a483d2c27867adf4c92eecac735f08020a
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/security/cross-frame-access-parent-isolated-world.html
|
| @@ -0,0 +1,34 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<script src="/js-test-resources/js-test.js"></script>
|
| +<body>
|
| +<p id="description"></p>
|
| +<p id="console"></p>
|
| +<iframe src="data:text/html,"></iframe>
|
| +<script>
|
| +description('Tests that isolated worlds do not allow cross-origin frame access');
|
| +window.jsTestIsAsync = true;
|
| +
|
| +if (window.testRunner) {
|
| + window.addEventListener('message', function(event) {
|
| + var message = JSON.parse(event.data);
|
| + switch (message.type) {
|
| + case 'debug':
|
| + debug(message.message);
|
| + break;
|
| + case 'finish':
|
| + finishJSTest();
|
| + break;
|
| + }
|
| + });
|
| +
|
| + testRunner.setIsolatedWorldSecurityOrigin(2, 'chrome-extension://123');
|
| + var iframe = document.getElementsByTagName('iframe')[0];
|
| + iframe.focus();
|
| + iframe.src = 'http://127.0.0.1:8080/security/resources/cross-frame-iframe-for-parent-isolated-world.html';
|
| +} else {
|
| + testFailed('Test depends on LayoutTestController and must be run by DRT');
|
| +}
|
| +</script>
|
| +</body>
|
| +</html>
|
|
|