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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-commit-retains-backing.html

Issue 2574543002: Add test to verify that OffscreenCanvas commit() retains canvas contents (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <script>
5 test(function() {
6 var canvas = document.createElement('canvas');
7 canvas.width = canvas.height = 10;
8 var offscreen = canvas.transferControlToOffscreen();
9 var ctx = offscreen.getContext('2d');
10 ctx.fillStyle = '#ff0';
11 ctx.fillRect(0, 0, 10, 10);
12 ctx.commit();
13 var pixel = ctx.getImageData(0, 0, 1, 1).data;
14 assert_array_equals(pixel, [255, 255, 0, 255]);
15 }, "Verify that commit() preserves the contents of an OffscreenCanvas with a 2d context.");
16 </script>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698