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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/dom/EventListener-incumbent-global-2.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/EventListener-incumbent-global-2.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/dom/EventListener-incumbent-global-2.html b/third_party/WebKit/LayoutTests/http/tests/dom/EventListener-incumbent-global-2.html
new file mode 100644
index 0000000000000000000000000000000000000000..1179e8c2511d6fa2767068a28d2d9edbe5b3b566
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/dom/EventListener-incumbent-global-2.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<!--
+This test is imported from
+https://github.com/w3c/web-platform-tests/blob/master/dom/events/EventListener-incumbent-global-2.sub.html
+-->
+<title></title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<iframe src="//www1.web-platform.test:8080/dom/resources/EventListener-incumbent-global-subframe-2.html"></iframe>
+<script>
+
+var t = async_test("Check the incumbent global EventListeners are called with");
+
+onload = t.step_func(function() {
+ onmessage = t.step_func_done(function(e) {
+ var d = e.data;
+ assert_equals(d.actual, d.expected, d.reason);
+ });
+
+ frames[0].postMessage("start", "*");
+});
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698