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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/webmessaging/without-ports/011.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>posting an imagedata (from a cloned canvas) in an array</title>
3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script>
5 <div id="log"></div>
6 <script>
7 async_test(function() {
8
9 var canvas = document.createElement('canvas');
10 var clone = canvas.cloneNode(true);
11 var ctx = clone.getContext('2d');
12 var imagedata = ctx.getImageData(0, 0, 300, 150);
13 postMessage([imagedata], '*');
14
15 onmessage = this.step_func(function(e) {
16 function processPixels(imagedata) {
17 var pixeldata = imagedata.data;
18 for (var i = 0; i < pixeldata.length; i = i+4) {
19 pixeldata[i] = 128;
20 assert_equals(pixeldata[i], 128);
21 }
22 }
23 processPixels(e.data[0]);
24 this.done();
25 });
26
27 });
28 </script>
29
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698