Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / canvas / canvas_arc_largeangles.html
blob04cae0c23a26d69dc5b6a4fc3b5b1559f0f4e438
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <a id="result"></a>
5 <script>
6 if (window.testRunner)
7 testRunner.dumpAsText();
9 canvas = document.createElement("canvas");
10 document.body.appendChild(canvas);
11 canvas.width = 100;
12 canvas.height = 100;
13 ctx = canvas.getContext("2d");
14 ctx.moveTo(25,25);
15 ctx.arc(25, 25, 25, Math.PI, 500*Math.PI, false);
16 ctx.closePath();
18 ctx.moveTo(75, 75);
19 ctx.arc(75, 75, 25, 500*Math.PI, Math.PI, true);
20 ctx.fillStyle = '#0f0';
21 ctx.fill();
23 var result = document.getElementById("result");
24 var passed = true;
26 checkPixel(25, 25, 0, 255, 0, 255);
27 checkPixel(75, 75, 0, 255, 0, 255);
28 if (passed) result.innerHTML = "PASSED";
30 function checkPixel(x, y, r, g, b, a) {
31 var data = ctx.getImageData(x,y,1,1).data;
32 var red = data[0];
33 var green = data[1];
34 var blue = data[2];
35 var alpha = data[3];
37 if (red != r) {
38 result.innerHTML += "Red should be "+r+", but was "+red+". ";
39 passed = false;
41 if (green != g) {
42 result.innerHTML += "green should be "+g+", but was "+green+". ";
43 passed = false;
45 if (blue != b) {
46 result.innerHTML += "blue should be "+b+", but was "+blue+". ";
47 passed = false;
49 if (alpha != a) {
50 result.innerHTML += "alpha should be "+a+", but was "+alpha+". ";
51 passed = false;
55 </script>
56 </body>
57 </html>