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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/webmessaging/without-ports/021.html

Issue 2558423002: Import wpt/webmessaging tests (Closed)
Patch Set: rebase again Created 3 years, 11 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2 <title>cross-origin test</title>
3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script>
5 <iframe src="../without-ports/020-1.html"></iframe>
6 <div id="log"></div>
7 <script>
8 var iframe = document.createElement('iframe');
9 var url_prefix = location.href.replace('://', '://www1.').replace(/\/with(out)?- ports\/[^\/]+$/, '');
10 var url = url_prefix + '/without-ports/020-1.html';
11 iframe.src = url;
12 document.body.appendChild(iframe);
13 </script>
14 <div id=log></div>
15 <script>
16 onload = function() {
17 window[0].postMessage(1, '*');
18 window[1].postMessage(2, '*');
19 var i = 0;
20 onmessage = function(e) {
21 i++;
22 assert_equals(e.data[0], i);
23 assert_equals(e.data[1], location.protocol + '//' + location.host);
24 if (i === 2) {
25 done();
26 }
27 };
28 };
29 </script>
30
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698