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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/images/jpeg-yuv-progressive-canvas.html

Issue 2496663002: Merge css3/image/ and fast/images/ to images/ (Closed)
Patch Set: Address failing tests (3 of them) 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 <!-- test case for crbug.com/597127 -->
3 <html>
4 <head>
5 <!-- Use a <meta> viewport, see http://crbug.com/598949 -->
6 <meta name="viewport" content="width=device-width, minimum-scale=1.0">
7 <style>
8 canvas {
9 border: 2px solid black;
10 margin: 5px 5px 0px 5px;
11 padding: 2px;
12 width: 150px;
13 height: 150px;
14 }
15 </style>
16 </head>
17
18 <script>
19 if (window.testRunner) {
20 testRunner.dumpAsTextWithPixelResults();
21 testRunner.waitUntilDone();
22 }
23
24 var totalTestImages = 4;
25
26 window.onload = function() {
27 for (var x = 0; x < totalTestImages; ++x)
28 loadImage(x);
29 };
30
31 function loadImage(x) {
32 var image = new Image();
33
34 var canvas = document.createElement('canvas');
35 canvas.width = canvas.height = 150;
36
37 document.body.appendChild(canvas);
38
39 image.onload = function() {
40 canvas.getContext('2d').drawImage(this, 0, 0, 150, 150);
41 setTimeout(canvasLoaded, 0, x + 1);
42 };
43
44 image.src = 'resources/ycbcr-progressive-00' + x + '.jpg';
45 }
46
47 function canvasLoaded(x) {
48 if (x >= totalTestImages && window.testRunner)
49 testRunner.notifyDone();
50 }
51 </script>
52 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698