-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1719767 [wpt PR 29615] - Use DOMPointInit for roundRect, a=testonly
Automatic update from web-platform-tests Use DOMPointInit for roundRect This is what we decided on in the spec debate. whatwg/html#6765 Bug: 1193694 Change-Id: Ic24a8cf9ec61ab584318a40660c0c0e06a0b9848 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3016815 Commit-Queue: Aaron Krajeski <[email protected]> Reviewed-by: Justin Novosad <[email protected]> Cr-Commit-Position: refs/heads/master@{#899818} -- wpt-commits: adcec00147f8dc59daaca5793d8bcd5f8d2d519a wpt-pr: 29615
- Loading branch information
1 parent
e63edc6
commit 8044994
Showing
32 changed files
with
1,770 additions
and
0 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
...tform/tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompointinit.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<!DOCTYPE html> | ||
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> | ||
<title>Canvas test: 2d.path.roundrect.1.radius.dompointinit</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/html/canvas/resources/canvas-tests.js"></script> | ||
<link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css"> | ||
<body class="show_output"> | ||
|
||
<h1>2d.path.roundrect.1.radius.dompointinit</h1> | ||
<p class="desc">Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left and bottom-left corners.</p> | ||
|
||
|
||
<p class="output">Actual output:</p> | ||
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas> | ||
|
||
<ul id="d"></ul> | ||
<script> | ||
var t = async_test("Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left and bottom-left corners."); | ||
_addTest(function(canvas, ctx) { | ||
|
||
ctx.fillStyle = '#f00'; | ||
ctx.fillRect(0, 0, 100, 50); | ||
ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}]); | ||
ctx.fillStyle = '#0f0'; | ||
ctx.fill(); | ||
|
||
// top-left corner | ||
_assertPixel(canvas, 20,1, 255,0,0,255, "20,1", "255,0,0,255"); | ||
_assertPixel(canvas, 41,1, 0,255,0,255, "41,1", "0,255,0,255"); | ||
_assertPixel(canvas, 1,10, 255,0,0,255, "1,10", "255,0,0,255"); | ||
_assertPixel(canvas, 1,21, 0,255,0,255, "1,21", "0,255,0,255"); | ||
|
||
// top-right corner | ||
_assertPixel(canvas, 79,1, 255,0,0,255, "79,1", "255,0,0,255"); | ||
_assertPixel(canvas, 58,1, 0,255,0,255, "58,1", "0,255,0,255"); | ||
_assertPixel(canvas, 98,10, 255,0,0,255, "98,10", "255,0,0,255"); | ||
_assertPixel(canvas, 98,21, 0,255,0,255, "98,21", "0,255,0,255"); | ||
|
||
// bottom-right corner | ||
_assertPixel(canvas, 79,48, 255,0,0,255, "79,48", "255,0,0,255"); | ||
_assertPixel(canvas, 58,48, 0,255,0,255, "58,48", "0,255,0,255"); | ||
_assertPixel(canvas, 98,39, 255,0,0,255, "98,39", "255,0,0,255"); | ||
_assertPixel(canvas, 98,28, 0,255,0,255, "98,28", "0,255,0,255"); | ||
|
||
// bottom-left corner | ||
_assertPixel(canvas, 20,48, 255,0,0,255, "20,48", "255,0,0,255"); | ||
_assertPixel(canvas, 41,48, 0,255,0,255, "41,48", "0,255,0,255"); | ||
_assertPixel(canvas, 1,39, 255,0,0,255, "1,39", "255,0,0,255"); | ||
_assertPixel(canvas, 1,28, 0,255,0,255, "1,28", "0,255,0,255"); | ||
|
||
|
||
}); | ||
</script> | ||
|
47 changes: 47 additions & 0 deletions
47
...form/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.dompointinit.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<!DOCTYPE html> | ||
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> | ||
<title>Canvas test: 2d.path.roundrect.2.radii.1.dompointinit</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/html/canvas/resources/canvas-tests.js"></script> | ||
<link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css"> | ||
<body class="show_output"> | ||
|
||
<h1>2d.path.roundrect.2.radii.1.dompointinit</h1> | ||
<p class="desc">Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left and bottom-right corners.</p> | ||
|
||
|
||
<p class="output">Actual output:</p> | ||
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas> | ||
|
||
<ul id="d"></ul> | ||
<script> | ||
var t = async_test("Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left and bottom-right corners."); | ||
_addTest(function(canvas, ctx) { | ||
|
||
ctx.fillStyle = '#f00'; | ||
ctx.fillRect(0, 0, 100, 50); | ||
ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0]); | ||
ctx.fillStyle = '#0f0'; | ||
ctx.fill(); | ||
|
||
// top-left corner | ||
_assertPixel(canvas, 20,1, 255,0,0,255, "20,1", "255,0,0,255"); | ||
_assertPixel(canvas, 41,1, 0,255,0,255, "41,1", "0,255,0,255"); | ||
_assertPixel(canvas, 1,10, 255,0,0,255, "1,10", "255,0,0,255"); | ||
_assertPixel(canvas, 1,21, 0,255,0,255, "1,21", "0,255,0,255"); | ||
|
||
// bottom-right corner | ||
_assertPixel(canvas, 79,48, 255,0,0,255, "79,48", "255,0,0,255"); | ||
_assertPixel(canvas, 58,48, 0,255,0,255, "58,48", "0,255,0,255"); | ||
_assertPixel(canvas, 98,39, 255,0,0,255, "98,39", "255,0,0,255"); | ||
_assertPixel(canvas, 98,28, 0,255,0,255, "98,28", "0,255,0,255"); | ||
|
||
// other corners | ||
_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); | ||
_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); | ||
|
||
|
||
}); | ||
</script> | ||
|
47 changes: 47 additions & 0 deletions
47
...form/tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.dompointinit.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<!DOCTYPE html> | ||
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> | ||
<title>Canvas test: 2d.path.roundrect.2.radii.2.dompointinit</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/html/canvas/resources/canvas-tests.js"></script> | ||
<link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css"> | ||
<body class="show_output"> | ||
|
||
<h1>2d.path.roundrect.2.radii.2.dompointinit</h1> | ||
<p class="desc">Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPointInit, applies to the top-right and bottom-left corners.</p> | ||
|
||
|
||
<p class="output">Actual output:</p> | ||
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas> | ||
|
||
<ul id="d"></ul> | ||
<script> | ||
var t = async_test("Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPointInit, applies to the top-right and bottom-left corners."); | ||
_addTest(function(canvas, ctx) { | ||
|
||
ctx.fillStyle = '#f00'; | ||
ctx.fillRect(0, 0, 100, 50); | ||
ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}]); | ||
ctx.fillStyle = '#0f0'; | ||
ctx.fill(); | ||
|
||
// top-right corner | ||
_assertPixel(canvas, 79,1, 255,0,0,255, "79,1", "255,0,0,255"); | ||
_assertPixel(canvas, 58,1, 0,255,0,255, "58,1", "0,255,0,255"); | ||
_assertPixel(canvas, 98,10, 255,0,0,255, "98,10", "255,0,0,255"); | ||
_assertPixel(canvas, 98,21, 0,255,0,255, "98,21", "0,255,0,255"); | ||
|
||
// bottom-left corner | ||
_assertPixel(canvas, 20,48, 255,0,0,255, "20,48", "255,0,0,255"); | ||
_assertPixel(canvas, 41,48, 0,255,0,255, "41,48", "0,255,0,255"); | ||
_assertPixel(canvas, 1,39, 255,0,0,255, "1,39", "255,0,0,255"); | ||
_assertPixel(canvas, 1,28, 0,255,0,255, "1,28", "0,255,0,255"); | ||
|
||
// other corners | ||
_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); | ||
_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); | ||
|
||
|
||
}); | ||
</script> | ||
|
42 changes: 42 additions & 0 deletions
42
...form/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.dompointinit.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!DOCTYPE html> | ||
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> | ||
<title>Canvas test: 2d.path.roundrect.3.radii.1.dompointinit</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/html/canvas/resources/canvas-tests.js"></script> | ||
<link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css"> | ||
<body class="show_output"> | ||
|
||
<h1>2d.path.roundrect.3.radii.1.dompointinit</h1> | ||
<p class="desc">Verify that when three radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left corner.</p> | ||
|
||
|
||
<p class="output">Actual output:</p> | ||
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas> | ||
|
||
<ul id="d"></ul> | ||
<script> | ||
var t = async_test("Verify that when three radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left corner."); | ||
_addTest(function(canvas, ctx) { | ||
|
||
ctx.fillStyle = '#f00'; | ||
ctx.fillRect(0, 0, 100, 50); | ||
ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0, 0]); | ||
ctx.fillStyle = '#0f0'; | ||
ctx.fill(); | ||
|
||
// top-left corner | ||
_assertPixel(canvas, 20,1, 255,0,0,255, "20,1", "255,0,0,255"); | ||
_assertPixel(canvas, 41,1, 0,255,0,255, "41,1", "0,255,0,255"); | ||
_assertPixel(canvas, 1,10, 255,0,0,255, "1,10", "255,0,0,255"); | ||
_assertPixel(canvas, 1,21, 0,255,0,255, "1,21", "0,255,0,255"); | ||
|
||
// other corners | ||
_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); | ||
_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); | ||
_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); | ||
|
||
|
||
}); | ||
</script> | ||
|
47 changes: 47 additions & 0 deletions
47
...form/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.dompointinit.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<!DOCTYPE html> | ||
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> | ||
<title>Canvas test: 2d.path.roundrect.3.radii.2.dompointinit</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/html/canvas/resources/canvas-tests.js"></script> | ||
<link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css"> | ||
<body class="show_output"> | ||
|
||
<h1>2d.path.roundrect.3.radii.2.dompointinit</h1> | ||
<p class="desc">Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners.</p> | ||
|
||
|
||
<p class="output">Actual output:</p> | ||
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas> | ||
|
||
<ul id="d"></ul> | ||
<script> | ||
var t = async_test("Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners."); | ||
_addTest(function(canvas, ctx) { | ||
|
||
ctx.fillStyle = '#f00'; | ||
ctx.fillRect(0, 0, 100, 50); | ||
ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}, 0]); | ||
ctx.fillStyle = '#0f0'; | ||
ctx.fill(); | ||
|
||
// top-right corner | ||
_assertPixel(canvas, 79,1, 255,0,0,255, "79,1", "255,0,0,255"); | ||
_assertPixel(canvas, 58,1, 0,255,0,255, "58,1", "0,255,0,255"); | ||
_assertPixel(canvas, 98,10, 255,0,0,255, "98,10", "255,0,0,255"); | ||
_assertPixel(canvas, 98,21, 0,255,0,255, "98,21", "0,255,0,255"); | ||
|
||
// bottom-left corner | ||
_assertPixel(canvas, 20,48, 255,0,0,255, "20,48", "255,0,0,255"); | ||
_assertPixel(canvas, 41,48, 0,255,0,255, "41,48", "0,255,0,255"); | ||
_assertPixel(canvas, 1,39, 255,0,0,255, "1,39", "255,0,0,255"); | ||
_assertPixel(canvas, 1,28, 0,255,0,255, "1,28", "0,255,0,255"); | ||
|
||
// other corners | ||
_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); | ||
_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); | ||
|
||
|
||
}); | ||
</script> | ||
|
42 changes: 42 additions & 0 deletions
42
...form/tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.dompointinit.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!DOCTYPE html> | ||
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> | ||
<title>Canvas test: 2d.path.roundrect.3.radii.3.dompointinit</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/html/canvas/resources/canvas-tests.js"></script> | ||
<link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css"> | ||
<body class="show_output"> | ||
|
||
<h1>2d.path.roundrect.3.radii.3.dompointinit</h1> | ||
<p class="desc">Verify that when three radii are given to roundRect(), the third radius, specified as a DOMPointInit, applies to the bottom-right corner.</p> | ||
|
||
|
||
<p class="output">Actual output:</p> | ||
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas> | ||
|
||
<ul id="d"></ul> | ||
<script> | ||
var t = async_test("Verify that when three radii are given to roundRect(), the third radius, specified as a DOMPointInit, applies to the bottom-right corner."); | ||
_addTest(function(canvas, ctx) { | ||
|
||
ctx.fillStyle = '#f00'; | ||
ctx.fillRect(0, 0, 100, 50); | ||
ctx.roundRect(0, 0, 100, 50, [0, 0, {x: 40, y: 20}]); | ||
ctx.fillStyle = '#0f0'; | ||
ctx.fill(); | ||
|
||
// bottom-right corner | ||
_assertPixel(canvas, 79,48, 255,0,0,255, "79,48", "255,0,0,255"); | ||
_assertPixel(canvas, 58,48, 0,255,0,255, "58,48", "0,255,0,255"); | ||
_assertPixel(canvas, 98,39, 255,0,0,255, "98,39", "255,0,0,255"); | ||
_assertPixel(canvas, 98,28, 0,255,0,255, "98,28", "0,255,0,255"); | ||
|
||
// other corners | ||
_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); | ||
_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); | ||
_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); | ||
|
||
|
||
}); | ||
</script> | ||
|
42 changes: 42 additions & 0 deletions
42
...form/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.dompointinit.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!DOCTYPE html> | ||
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> | ||
<title>Canvas test: 2d.path.roundrect.4.radii.1.dompointinit</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/html/canvas/resources/canvas-tests.js"></script> | ||
<link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css"> | ||
<body class="show_output"> | ||
|
||
<h1>2d.path.roundrect.4.radii.1.dompointinit</h1> | ||
<p class="desc">Verify that when four radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left corner.</p> | ||
|
||
|
||
<p class="output">Actual output:</p> | ||
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas> | ||
|
||
<ul id="d"></ul> | ||
<script> | ||
var t = async_test("Verify that when four radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left corner."); | ||
_addTest(function(canvas, ctx) { | ||
|
||
ctx.fillStyle = '#f00'; | ||
ctx.fillRect(0, 0, 100, 50); | ||
ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0, 0, 0]); | ||
ctx.fillStyle = '#0f0'; | ||
ctx.fill(); | ||
|
||
// top-left corner | ||
_assertPixel(canvas, 20,1, 255,0,0,255, "20,1", "255,0,0,255"); | ||
_assertPixel(canvas, 41,1, 0,255,0,255, "41,1", "0,255,0,255"); | ||
_assertPixel(canvas, 1,10, 255,0,0,255, "1,10", "255,0,0,255"); | ||
_assertPixel(canvas, 1,21, 0,255,0,255, "1,21", "0,255,0,255"); | ||
|
||
// other corners | ||
_assertPixel(canvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); | ||
_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); | ||
_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); | ||
|
||
|
||
}); | ||
</script> | ||
|
42 changes: 42 additions & 0 deletions
42
...form/tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.dompointinit.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!DOCTYPE html> | ||
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> | ||
<title>Canvas test: 2d.path.roundrect.4.radii.2.dompointinit</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/html/canvas/resources/canvas-tests.js"></script> | ||
<link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css"> | ||
<body class="show_output"> | ||
|
||
<h1>2d.path.roundrect.4.radii.2.dompointinit</h1> | ||
<p class="desc">Verify that when four radii are given to roundRect(), the second radius, specified as a DOMPointInit, applies to the top-right corner.</p> | ||
|
||
|
||
<p class="output">Actual output:</p> | ||
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas> | ||
|
||
<ul id="d"></ul> | ||
<script> | ||
var t = async_test("Verify that when four radii are given to roundRect(), the second radius, specified as a DOMPointInit, applies to the top-right corner."); | ||
_addTest(function(canvas, ctx) { | ||
|
||
ctx.fillStyle = '#f00'; | ||
ctx.fillRect(0, 0, 100, 50); | ||
ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}, 0, 0]); | ||
ctx.fillStyle = '#0f0'; | ||
ctx.fill(); | ||
|
||
// top-right corner | ||
_assertPixel(canvas, 79,1, 255,0,0,255, "79,1", "255,0,0,255"); | ||
_assertPixel(canvas, 58,1, 0,255,0,255, "58,1", "0,255,0,255"); | ||
_assertPixel(canvas, 98,10, 255,0,0,255, "98,10", "255,0,0,255"); | ||
_assertPixel(canvas, 98,21, 0,255,0,255, "98,21", "0,255,0,255"); | ||
|
||
// other corners | ||
_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); | ||
_assertPixel(canvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); | ||
_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); | ||
|
||
|
||
}); | ||
</script> | ||
|
Oops, something went wrong.