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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/drawImage-with-bad-canvas.html

Issue 2700823002: Use testharness.js instead of js-test.js in LayoutTests/fast/canvas tests. (Closed)
Patch Set: Addressing comments 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
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 <script src="../../resources/testharness.js"></script>
2 <html> 2 <script src="../../resources/testharnessreport.js"></script>
3 <head> 3
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <script> 4 <script>
7 description("This test checks behavior of drawImage on a canvas that failed to allocate its backing store. This test passes by not crashing."); 5 test(function(){
6
8 var canvas1 = document.createElement("canvas"); 7 var canvas1 = document.createElement("canvas");
9 var ctx1 = canvas1.getContext('2d'); 8 var ctx1 = canvas1.getContext('2d');
10 var canvas2 = document.createElement("canvas"); 9 var canvas2 = document.createElement("canvas");
11 // Terapixel canvas should fail to allocate 10 // Terapixel canvas should fail to allocate
12 canvas2.width = 1000000; 11 canvas2.width = 1000000;
13 canvas2.height = 1000000; 12 canvas2.height = 1000000;
14 var ctx2 = canvas2.getContext('2d'); 13 var ctx2 = canvas2.getContext('2d');
15 ctx2.drawImage(canvas1, 0, 0); 14 ctx2.drawImage(canvas1, 0, 0);
15
16 }, "This test checks behavior of drawImage on a canvas that failed to allocate i ts backing store. This test passes by not crashing.");
16 </script> 17 </script>
17 </body>
18 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698