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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-frameless-document-text.html

Issue 2674933002: Use testharness.js instead of js-test.js in LayoutTests/fast/canvas tests. (Closed)
Patch Set: 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 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body> 3 <body>
7 <script src="script-tests/canvas-frameless-document-text.js"></script> 4 <script>
5 test(function(t) {
6
7 // It is not clear from the spec whether this is supposed to work and how.
Justin Novosad 2017/02/03 18:07:18 indent
8 // Therefore, we do not validate the rendering results. We just make sure
9 // this does not crash the browser.
10 var canvas1 = document.createElement('canvas');
11 var ctx1 = canvas1.getContext('2d');
12 var htmlDoc = document.implementation.createHTMLDocument('', '', null);
13 htmlDoc.adoptNode(canvas1);
14 var canvas2 = htmlDoc.createElement('canvas');
15 var ctx2 = canvas2.getContext('2d');
16
17 ctx1.font = 'italic 30px Arial';
18 ctx2.font = 'italic 30px Arial';
19 ctx1.fillText('Text1', 0, 30);
20 ctx2.fillText('Text1', 0, 30);
21 ctx1.strokeText('Text2', 0, 60);
22 ctx2.strokeText('Text2', 0, 60);
23 ctx1.measureText('Text3');
24 ctx2.measureText('Text3');
25
26 }, "This verifies that the browser does not crash when drawing text to a canvas in a frame-less document.");
27 </script>
8 </body> 28 </body>
9 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698