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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/resize-while-save-active.html

Issue 2701053003: Use testharness.js instead of js-test.js in LayoutTests/fast/canvas tests. (Closed)
Patch Set: Addressing comments Created 3 years, 10 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
OLDNEW
1 <!DOCTYPE HTML> 1 <script src="../../resources/testharness.js"></script>
2 <html> 2 <script src="../../resources/testharnessreport.js"></script>
3 <head>
4 </head>
5 <body> 3 <body>
6 <canvas id="mycanvas" width="512" height="512"></canvas> 4 <canvas id="mycanvas" width="512" height="512"></canvas>
7 <script> 5 <script>
8 if (window.testRunner) 6 function runTest() {
9 testRunner.dumpAsText()
10 onload = function()
11 {
12 var canvas = document.getElementById('mycanvas'); 7 var canvas = document.getElementById('mycanvas');
13 var ctx = canvas.getContext('2d'); 8 var ctx = canvas.getContext('2d');
14 ctx.fillStyle = "rgb(255,165,0)"; 9 ctx.fillStyle = "rgb(255,165,0)";
15 ctx.fillRect(0, 0, 512, 512); 10 ctx.fillRect(0, 0, 512, 512);
16 ctx.save(); 11 ctx.save();
17 canvas.width = 256; 12 canvas.width = 256;
18 ctx.fillStyle = "rgb(255,165,0)"; 13 ctx.fillStyle = "rgb(255,165,0)";
19 ctx.fillRect(0, 0, 256, 512); 14 ctx.fillRect(0, 0, 256, 512);
20 document.body.appendChild(document.createElement("p")).appendChild(document. createTextNode("If we got this far without an assertion, this test passed.")); 15 }
21 }; 16
17 async_test(t => {
18 window.onload = function() {
19 t.step(runTest);
20 t.done();
21 }
22 }, 'Verify that canvas resize after save does not crash.');
22 </script> 23 </script>
23 </body> 24 </body>
24 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698