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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-empty-image-source.html

Issue 2344573002: Correct SourceImageStatus in OffscreenCanvas::getSourceImageForCanvas (Closed)
Patch Set: Adding test Created 4 years, 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <script src="../../resources/testharness.js"></script>
2 <script src="../../resources/testharnessreport.js"></script>
3 <script>
4 test(function() {
5 var patternCanvas = new OffscreenCanvas(0, 50);
6 var patternCanvasCtx = patternCanvas.getContext("2d");
7 patternCanvasCtx.fillStyle = '#fed';
8 patternCanvasCtx.fillRect(0, 0, 15, 15);
9 var myOCanvas = new OffscreenCanvas(100, 100);
10 var myOCanvasCtx = myOCanvas.getContext("2d");
11 var pattern = myOCanvasCtx.createPattern(patternCanvas, 'repeat');
12 myOCanvasCtx.fillStyle = pattern;
13 myOCanvasCtx.fillRect(0, 0, myOCanvas.width, myOCanvas.height);
14 var imageData = myOCanvasCtx.getImageData(0, 0, 1, 1).data;
15 assert_equals(imageData[0], 0);
16 assert_equals(imageData[1], 0);
17 assert_equals(imageData[2], 0);
18 assert_equals(imageData[3], 0);
19 }, "CreatePattern using OffcreenCanvas as image source silently fails when offsc reenCanvas has zero size");
20 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698