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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/arc360.html

Issue 2671853004: Use testharness.js instead of js-test.js in LayoutTests/fast/canvas tests. (Closed)
Patch Set: Corrections 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 <body> 1 <script src="../../resources/testharness.js"></script>
2 <p>Test canvas arc() start / end points when the arc is >= 360 degrees. The resu lt should be a circle with two line segments connected to the left hand side, to wards the top left and bottom left corners. 2 <script src="../../resources/testharnessreport.js"></script>
3 <canvas id="mycanvas" width="400" height="400"></canvas> 3 <canvas id="mycanvas" width="400" height="400"></canvas>
4 <script> 4 <script>
5 if (window.testRunner) 5 test(function(t) {
6 testRunner.dumpAsTextWithPixelResults(); 6 var canvas = document.getElementById('mycanvas');
7 7 var ctx = canvas.getContext('2d');
8 var canvas = document.getElementById('mycanvas'); 8 var cx = 200, cy = 200, radius = 100;
9 var ctx = canvas.getContext('2d'); 9 ctx.lineWidth = 10;
10 var cx = 200, cy = 200, radius = 100; 10 ctx.beginPath();
11 ctx.lineWidth = 10; 11 ctx.moveTo(0, 100);
12 ctx.beginPath(); 12 ctx.arc(cx, cy, radius, -Math.PI, Math.PI, false);
13 ctx.moveTo(0, 100); 13 ctx.lineTo(0, 300);
14 ctx.arc(cx, cy, radius, -Math.PI, Math.PI, false); 14 ctx.stroke();
15 ctx.lineTo(0, 300); 15 }, 'Test canvas arc() start / end points when the arc is >= 360 degrees. The res ult should be a circle with two line segments connected to the left hand side, t owards the top left and bottom left corners.');
16 ctx.stroke();
17 </script> 16 </script>
18 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698