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

Unified Diff: LayoutTests/http/tests/security/cross-frame-access-dispatchEvent.html

Issue 150203016: Add cross-origin BindingsSecurity checks to 'EventTarget::dispatchEvent'. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Doctype + rebaseline. Created 6 years, 10 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/cross-frame-access-dispatchEvent-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..08af109fed54e6c65fc13ccf5c8a91a98157c59b
--- /dev/null
+++ b/LayoutTests/http/tests/security/cross-frame-access-dispatchEvent.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<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>
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/cross-frame-access-dispatchEvent-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698