Chromium Code Reviews| Index: LayoutTests/http/tests/security/cross-frame-access-dispatchEvent.html |
| diff --git a/LayoutTests/http/tests/security/cross-frame-access-dispatchEvent.html b/LayoutTests/http/tests/security/cross-frame-access-dispatchEvent.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5ac6d22a984371bb8e7efe38c4e758d6c2707c20 |
| --- /dev/null |
| +++ b/LayoutTests/http/tests/security/cross-frame-access-dispatchEvent.html |
| @@ -0,0 +1,32 @@ |
| +<html> |
|
jochen (gone - plz use gerrit)
2014/02/12 09:27:19
doctype missing
|
| +<head> |
| + <script src="resources/cross-frame-access.js"></script> |
| + <script> |
| + if (window.testRunner) { |
| + testRunner.dumpAsText(); |
| + testRunner.dumpChildFramesAsText(); |
| + testRunner.waitUntilDone(); |
| + } |
| + |
| + receiver = function(e) { |
| + if (e.data == "LOADED") |
| + deleteTest(); |
| + }; |
| + |
| + var targetWindow; |
| + addEventListener('message', function () { |
| + targetWindow = document.querySelector('iframe').contentWindow; |
| + shouldThrowException('targetWindow.dispatchEvent(new CustomEvent("click"));'); |
| + shouldThrowException('window.dispatchEvent.call(targetWindow, new CustomEvent("click"));'); |
| + |
| + if (window.testRunner) |
| + testRunner.notifyDone(); |
| + }); |
| + |
| + </script> |
| +</head> |
| +<body> |
| + <iframe src="http://localhost:8000/security/resources/cross-frame-iframe-for-delete-test.html"></iframe> |
| + <pre id="console"></pre> |
| +</body> |
| +</html> |