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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/dom/resources/EventListener-incumbent-global-subsubframe.html

Issue 2142173003: binding: Adds layout tests to check origins of window.postMessage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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
Index: third_party/WebKit/LayoutTests/http/tests/dom/resources/EventListener-incumbent-global-subsubframe.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/dom/resources/EventListener-incumbent-global-subsubframe.html b/third_party/WebKit/LayoutTests/http/tests/dom/resources/EventListener-incumbent-global-subsubframe.html
new file mode 100644
index 0000000000000000000000000000000000000000..8656578a432a018b1b28172f7995b0fde8683831
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/dom/resources/EventListener-incumbent-global-subsubframe.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<script>
+ function getTheListener() {
+ return postMessage.bind(this, "respond", "*", undefined);
+ }
+ document.domain = "web-platform.test";
+ onmessage = function (e) {
+ if (e.data == "sendclick") {
+ document.body.click();
+ } else {
+ parent.postMessage(
+ {
+ actual: e.origin,
+ expected: location.protocol + "//www1.web-platform.test:8080",
+ reason: "Incumbent should have been the caller of addEventListener()"
+ },
+ "*")
+ };
+ }
+</script>

Powered by Google App Engine
This is Rietveld 408576698