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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-globalCompositeOperation.html

Issue 2504773003: Support globalCompositeOperation in OffscreenCanvas (Closed)
Patch Set: reset API layout tests Created 4 years, 1 month 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 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4
5 <script>
6 test(function() {
7 var width = 50;
8 var height = 50;
9 var offscreenCanvas1 = new OffscreenCanvas(width, height);
10 var ctx1 = offscreenCanvas1.getContext('2d');
11 var offscreenCanvas2 = new OffscreenCanvas(width, height);
12 var ctx2 = offscreenCanvas2.getContext('2d');
13
14 ctx2.fillStyle = '#ff0';
15 ctx2.fillRect(0, 0, width, height);
16 ctx1.fillStyle = '#0ff';
17 ctx1.fillRect(0, 0, width, height);
18 ctx1.globalCompositeOperation = 'copy';
19 ctx1.drawImage(offscreenCanvas2, 0, 0);
20
21 var color = ctx1.getImageData(25, 25, 1, 1).data;
22
23 assert_approx_equals(color[0], 255, 5);
24 assert_approx_equals(color[1], 255, 5);
25 assert_approx_equals(color[2], 0, 5);
26 assert_approx_equals(color[3], 255, 5);
Justin Novosad 2016/11/17 19:34:24 This is not really a good test because the pixel v
xidachen 2016/11/18 01:42:57 Done.
27 }, 'Test globalCompositeOperation API on OffscreenCanvas');
28
29 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698