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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/webmessaging/postMessage_ArrayBuffer.sub.htm

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 <html>
3 <head>
4 <title> postMessage with ArrayBuffer object </title>
5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script>
7 </head>
8 <body>
9 <div id=log></div>
10
11 <div style="display:none">
12 <iframe width="70%" onload="PostMessageTest()" src="{{location[scheme]}}://{ {domains[www]}}:{{location[port]}}/webmessaging/support/ChildWindowPostMessage.h tm"></iframe>
13 </div>
14
15 <script>
16
17
18 var description = "Test Description: postMessage with ArrayBuffer object.";
19
20 var t = async_test(description);
21
22 var DATA;
23 var TYPE = "object";
24 var TARGET = document.querySelector("iframe");
25
26 function PostMessageTest()
27 {
28 test(function()
29 {
30 DATA = new ArrayBuffer(32);
31 TARGET.contentWindow.postMessage(DATA, "*");
32 }, "ArrayBuffer is supported.");
33 }
34
35 window.onmessage = t.step_func(function(e)
36 {
37 assert_equals(typeof(e.data), TYPE);
38 assert_equals(e.data.toString(), DATA.toString());
39 assert_equals(e.data.byteLength, 32);
40 t.done();
41 });
42 </script>
43 </body>
44 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698