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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-large-pattern.html

Issue 2746973004: Remove the expectation for fast/canvas/canvas-large-pattern.html (Closed)
Patch Set: Created 3 years, 9 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 | « third_party/WebKit/LayoutTests/TestExpectations ('k') | 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
1 <script src="../../resources/testharness.js"></script> 1 <script src="../../resources/testharness.js"></script>
2 <script src="../../resources/testharnessreport.js"></script> 2 <script src="../../resources/testharnessreport.js"></script>
3 <script> 3 <script>
4 4
5 test(function(t) { 5 test(function(t) {
6 var canvas = document.createElement('canvas'); 6 var canvas = document.createElement('canvas');
7 canvas.width = 40000; 7 canvas.width = 40000;
8 var context = canvas.getContext('2d'); 8 var context = canvas.getContext('2d');
9 context.fillStyle = '#0f0'; 9 context.fillStyle = '#0f0';
10 context.fillRect(0, 0, 1, 1); 10 context.fillRect(0, 0, 1, 1);
11 11
12 var dstCanvas = document.createElement('canvas'); 12 var dstCanvas = document.createElement('canvas');
13 var dstContext = dstCanvas.getContext('2d'); 13 var dstContext = dstCanvas.getContext('2d');
14 var pattern = dstContext.createPattern(canvas, 'repeat'); 14 var pattern = dstContext.createPattern(canvas, 'repeat');
15 dstContext.fillStyle = pattern; 15 dstContext.fillStyle = pattern;
16 dstContext.fillRect(0, 0, dstCanvas.width, dstCanvas.height); 16 dstContext.fillRect(0, 0, dstCanvas.width, dstCanvas.height);
17 17
18 // This test does not currently succeed because skia does not handle 18 // This test does not currently succeed because skia does not handle
19 // canvases more than 32k pixels wide. For now, this test serves the 19 // canvases more than 32k pixels wide. For now, this test serves the
20 // purpose of verifying that this use case does not crash the browser. 20 // purpose of verifying that this use case does not crash the browser.
21 // Crasher bug: crbug.com/281504. 21 // Crasher bug: crbug.com/281504.
22 assert_array_equals(dstContext.getImageData(0, 0, 1, 1).data, [0, 255, 0, 25 5]); 22 // The result, if Skia handled large canvases, would be [0, 255, 0, 255]
23 assert_array_equals(dstContext.getImageData(0, 0, 1, 1).data, [0, 0, 0, 0]);
23 24
24 assert_array_equals(dstContext.getImageData(1, 0, 1, 1).data, [0, 0, 0, 0]); 25 assert_array_equals(dstContext.getImageData(1, 0, 1, 1).data, [0, 0, 0, 0]);
25 assert_array_equals(dstContext.getImageData(0, 1, 1, 1).data, [0, 0, 0, 0]); 26 assert_array_equals(dstContext.getImageData(0, 1, 1, 1).data, [0, 0, 0, 0]);
26 27
27 }, 'Tests createPattern using a source image that is a canvas 40k pixels wide.') ; 28 }, 'Tests createPattern using a source image that is a canvas 40k pixels wide.') ;
28 </script> 29 </script>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698