mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Update web-platform-tests to revision e2364b32eb46c41c242f6f728b3cb937f5d92328
This commit is contained in:
parent
fa9b077e84
commit
7aa6c54799
80 changed files with 583 additions and 143 deletions
|
@ -1,4 +0,0 @@
|
|||
[hit-test-floats-002.html]
|
||||
[Hit test float]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[hit-test-floats-003.html]
|
||||
[Miss float below something else]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[hit-test-floats-005.html]
|
||||
[Miss clipped float]
|
||||
expected: FAIL
|
||||
|
|
@ -2,6 +2,3 @@
|
|||
[listeners are called when <iframe> is resized]
|
||||
expected: FAIL
|
||||
|
||||
[listeners are called correct number of times]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -6,3 +6,6 @@
|
|||
[removeEventListener removes listener]
|
||||
expected: NOTRUN
|
||||
|
||||
[listeners for "change" type are called]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[elementFromPoint-float-in-table.html]
|
||||
[float-in-div]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
[matchMedia-display-none-iframe.html]
|
||||
expected: ERROR
|
|
@ -321,12 +321,15 @@
|
|||
[<iframe>: combined response Content-Type: */* text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;" \\" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -53,3 +53,6 @@
|
|||
[combined text/javascript ]
|
||||
expected: FAIL
|
||||
|
||||
[separate text/javascript x/x]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -11,9 +11,3 @@
|
|||
[X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!]
|
||||
expected: FAIL
|
||||
|
||||
[X-Content-Type-Options%3A%20%22nosniFF%22]
|
||||
expected: FAIL
|
||||
|
||||
[X-Content-Type-Options%3A%20%40%23%24%23%25%25%26%5E%26%5E*()()11!%2Cnosniff]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[traverse_the_history_1.html]
|
||||
[Multiple history traversals from the same task]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
[traverse_the_history_2.html]
|
||||
[traverse_the_history_5.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
[cross-origin-objects-on-new-window.html]
|
||||
expected: TIMEOUT
|
|
@ -1,4 +0,0 @@
|
|||
[creating_browsing_context_test_01.html]
|
||||
[first argument: absolute url]
|
||||
expected: FAIL
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
[embedded-opener-remove-frame.html]
|
||||
expected: TIMEOUT
|
||||
[opener of discarded nested browsing context]
|
||||
expected: FAIL
|
||||
|
||||
[opener of discarded auxiliary browsing context]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
[2d.imageData.object.ctor.basics.html]
|
||||
expected: CRASH
|
|
@ -0,0 +1,4 @@
|
|||
[2d.path.isPointInStroke.basic.html]
|
||||
[detects whether point is in the area contained by the stroke of the path]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[2d.path.isPointInStroke.basic.worker.html]
|
||||
[detects whether point is in the area contained by the stroke of the path]
|
||||
expected: FAIL
|
||||
|
|
@ -1,20 +1,16 @@
|
|||
[supported-elements.html]
|
||||
expected: TIMEOUT
|
||||
[Contenteditable element should support autofocus]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[Host element with delegatesFocus including no focusable descendants should be skipped]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
[Element with tabindex should support autofocus]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
[Area element should support autofocus]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
[Host element with delegatesFocus should support autofocus]
|
||||
expected: NOTRUN
|
||||
|
||||
[Non-HTMLElement should not support autofocus]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -171,6 +171,3 @@
|
|||
[XHTML img usemap="#hash-id"]
|
||||
expected: FAIL
|
||||
|
||||
[HTML (standards) IMG usemap="no-hash-name"]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
[iframe_sandbox_popups_escaping-2.html]
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
[iframe_sandbox_popups_escaping-3.html]
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[iframe_sandbox_popups_nonescaping-2.html]
|
||||
expected: CRASH
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: NOTRUN
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
[iframe_sandbox_popups_nonescaping-3.html]
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: FAIL
|
||||
expected: NOTRUN
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[form-double-submit.html]
|
||||
[default submit action should supersede onclick submit()]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[DOMContentLoaded-defer.html]
|
||||
[The end: DOMContentLoaded and defer scripts]
|
||||
expected: FAIL
|
||||
|
|
@ -3,6 +3,3 @@
|
|||
[The incumbent settings object while executing the compiled callback via Web IDL's invoke must be that of the node document]
|
||||
expected: TIMEOUT
|
||||
|
||||
[The entry settings object while executing the compiled callback via Web IDL's invoke must be that of the node document]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
[promise-rejection-events.html]
|
||||
expected: TIMEOUT
|
||||
[delayed handling: delaying handling rejected promise created from createImageBitmap will cause both events to fire]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[unhandledrejection: from createImageBitmap which is UA triggered]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
[realtimeanalyser-fft-scaling.html]
|
||||
expected: TIMEOUT
|
||||
[X 2048-point FFT peak position is not equal to 64. Got 0.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
[017.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, about:blank]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
[003.html]
|
||||
expected: ERROR
|
||||
[shared]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -329221,11 +329221,11 @@
|
|||
[]
|
||||
],
|
||||
"path-objects.yaml": [
|
||||
"63cf52a4b2a4fe68969fccec334b06cd03223e15",
|
||||
"6a08c885558eaa76f50674a3fd8352828247acab",
|
||||
[]
|
||||
],
|
||||
"pixel-manipulation.yaml": [
|
||||
"7c642a706e8ebb6ce84c0e11023c5a8b2259f27d",
|
||||
"59d3053fc8ae80c36d22f52dd98c10a119b95ae8",
|
||||
[]
|
||||
],
|
||||
"scroll.yaml": [
|
||||
|
@ -329237,11 +329237,11 @@
|
|||
[]
|
||||
],
|
||||
"text-styles.yaml": [
|
||||
"1547d30bd4a204cce6aebf9ca273f72328ad7f0d",
|
||||
"e3fcbe7ae2ad6364a8e515a8896b2b5e86f33130",
|
||||
[]
|
||||
],
|
||||
"the-canvas-element.yaml": [
|
||||
"9899760d8a6fbe0ab8bc8a212eea5e37f9419abf",
|
||||
"229451cdad1c5ea0650f71d907e4d8260bbe5a45",
|
||||
[]
|
||||
],
|
||||
"the-canvas-state.yaml": [
|
||||
|
@ -329287,7 +329287,7 @@
|
|||
[]
|
||||
],
|
||||
"path-objects.yaml": [
|
||||
"588079982fb6db2eb409917636a13c7890588f74",
|
||||
"d0e0672292c6fdcdf1c1757b0b4ddad0251baf2c",
|
||||
[]
|
||||
],
|
||||
"pixel-manipulation.yaml": [
|
||||
|
@ -329299,7 +329299,7 @@
|
|||
[]
|
||||
],
|
||||
"text.yaml": [
|
||||
"7b8159810473a86e9721dbfe3c3bd3680dfc0b18",
|
||||
"7edd25e7cb04694a9c97d94ce6578724cd80b61c",
|
||||
[]
|
||||
],
|
||||
"the-canvas-state.yaml": [
|
||||
|
@ -443364,6 +443364,13 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"2d.path.ellipse.basics.html": [
|
||||
"13ba8be5b6e48f153ffb8202453c25b6bcd60cb2",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"2d.path.fill.closed.basic.html": [
|
||||
"33a96df92c9498616dccabdd9fc4c7c16943ef07",
|
||||
[
|
||||
|
@ -444157,6 +444164,13 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"2d.imageData.object.ctor.basics.html": [
|
||||
"46fa3445ba5d4165b3a372411531f61fed835658",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"2d.imageData.object.ctor.size.bounds.html": [
|
||||
"5ea899ac861aac26bf97320213370d88f9372bab",
|
||||
[
|
||||
|
@ -444948,7 +444962,7 @@
|
|||
]
|
||||
],
|
||||
"2d.text.measure.width.space.html": [
|
||||
"4e94ebeafcf1842df72dbf69a0f9eecc93accfb3",
|
||||
"4d7ee4ef75837e3dacefa6de1b72f2d7d46658a7",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
@ -452279,6 +452293,20 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"2d.path.isPointInStroke.basic.html": [
|
||||
"f91c6f1bd6486338f2a6fc94a344ca4293e57857",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"2d.path.isPointInStroke.basic.worker.js": [
|
||||
"7228ce6a0f1bb923e524694cc904821e67049a3c",
|
||||
[
|
||||
"html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"2d.path.lineTo.basic.html": [
|
||||
"d41b3bf5b2a0cb0b5f01675c2c5356e9299467a3",
|
||||
[
|
||||
|
@ -455142,14 +455170,14 @@
|
|||
]
|
||||
],
|
||||
"2d.text.measure.width.space.html": [
|
||||
"36f4a33de6013485e51197366e42968e5d1bc92c",
|
||||
"682b5c0ef468464925f509e069bd3714fd5d23e7",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"2d.text.measure.width.space.worker.js": [
|
||||
"c594b59048ca49a5f6819a377b19f24cebb79dff",
|
||||
"097d082ee95b9d87bfcb8209be84c2a0be20e69c",
|
||||
[
|
||||
"html/canvas/offscreen/text/2d.text.measure.width.space.worker.html",
|
||||
{}
|
||||
|
@ -462905,6 +462933,13 @@
|
|||
]
|
||||
},
|
||||
"the-canvas-element": {
|
||||
"2d.canvas.context.html": [
|
||||
"1d231c4dfaa8eca9ded7ae240094667afdb7f667",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"2d.canvas.readonly.html": [
|
||||
"7f735b9413ad23cb30049a02d6ada13229d5c4d6",
|
||||
[
|
||||
|
@ -462933,6 +462968,13 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"2d.getcontext.invalid.args.html": [
|
||||
"ff592c9ba962192dec29ee7d7dc4886051759c50",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"2d.getcontext.shared.html": [
|
||||
"6381734c24073af965781778ce9a511d9f06f0c5",
|
||||
[
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[hit-test-floats-002.html]
|
||||
[Hit test float]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[hit-test-floats-003.html]
|
||||
[Miss float below something else]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[hit-test-floats-005.html]
|
||||
[Miss clipped float]
|
||||
expected: FAIL
|
||||
|
|
@ -2,6 +2,3 @@
|
|||
[listeners are called when <iframe> is resized]
|
||||
expected: FAIL
|
||||
|
||||
[listeners are called correct number of times]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -6,3 +6,6 @@
|
|||
[addEventListener "once" option is respected]
|
||||
expected: TIMEOUT
|
||||
|
||||
[listeners for "change" type are called]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[elementFromPoint-float-in-table.html]
|
||||
[float-in-div]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
[matchMedia-display-none-iframe.html]
|
||||
expected: ERROR
|
|
@ -321,12 +321,15 @@
|
|||
[<iframe>: combined response Content-Type: */* text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;" \\" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -53,3 +53,6 @@
|
|||
[combined text/javascript ]
|
||||
expected: FAIL
|
||||
|
||||
[separate text/javascript x/x]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -11,9 +11,3 @@
|
|||
[X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!]
|
||||
expected: FAIL
|
||||
|
||||
[X-Content-Type-Options%3A%20%22nosniFF%22]
|
||||
expected: FAIL
|
||||
|
||||
[X-Content-Type-Options%3A%20%40%23%24%23%25%25%26%5E%26%5E*()()11!%2Cnosniff]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[traverse_the_history_1.html]
|
||||
[Multiple history traversals from the same task]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
[traverse_the_history_2.html]
|
||||
[traverse_the_history_5.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
[cross-origin-objects-on-new-window.html]
|
||||
expected: TIMEOUT
|
|
@ -1,4 +0,0 @@
|
|||
[creating_browsing_context_test_01.html]
|
||||
[first argument: absolute url]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
[embedded-opener-remove-frame.html]
|
||||
expected: TIMEOUT
|
||||
[opener and "removed" embedded documents]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -6,5 +7,5 @@
|
|||
expected: FAIL
|
||||
|
||||
[opener of discarded auxiliary browsing context]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
[2d.imageData.object.ctor.basics.html]
|
||||
expected: CRASH
|
|
@ -0,0 +1,4 @@
|
|||
[2d.path.isPointInStroke.basic.html]
|
||||
[detects whether point is in the area contained by the stroke of the path]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[2d.path.isPointInStroke.basic.worker.html]
|
||||
[detects whether point is in the area contained by the stroke of the path]
|
||||
expected: FAIL
|
||||
|
|
@ -1,20 +1,16 @@
|
|||
[supported-elements.html]
|
||||
expected: TIMEOUT
|
||||
[Contenteditable element should support autofocus]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[Element with tabindex should support autofocus]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
[Host element with delegatesFocus including no focusable descendants should be skipped]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
[Area element should support autofocus]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
[Host element with delegatesFocus should support autofocus]
|
||||
expected: NOTRUN
|
||||
|
||||
[Non-HTMLElement should not support autofocus]
|
||||
expected: NOTRUN
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -172,6 +172,3 @@
|
|||
[XHTML img usemap="http://example.org/#garbage-before-hash-id"]
|
||||
expected: FAIL
|
||||
|
||||
[HTML (standards) IMG usemap="no-hash-name"]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
[iframe_sandbox_popups_escaping-2.html]
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
[iframe_sandbox_popups_escaping-3.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[iframe_sandbox_popups_nonescaping-2.html]
|
||||
type: testharness
|
||||
expected: CRASH
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: NOTRUN
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
[iframe_sandbox_popups_nonescaping-3.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: FAIL
|
||||
expected: NOTRUN
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[form-double-submit.html]
|
||||
[default submit action should supersede onclick submit()]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[DOMContentLoaded-defer.html]
|
||||
[The end: DOMContentLoaded and defer scripts]
|
||||
expected: FAIL
|
||||
|
|
@ -4,6 +4,3 @@
|
|||
[The incumbent settings object while executing the compiled callback via Web IDL's invoke must be that of the node document]
|
||||
expected: TIMEOUT
|
||||
|
||||
[The entry settings object while executing the compiled callback via Web IDL's invoke must be that of the node document]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
[promise-rejection-events.html]
|
||||
expected: TIMEOUT
|
||||
[delayed handling: delaying handling rejected promise created from createImageBitmap will cause both events to fire]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[unhandledrejection: from createImageBitmap which is UA triggered]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
[realtimeanalyser-fft-scaling.html]
|
||||
expected: TIMEOUT
|
||||
[X 2048-point FFT peak position is not equal to 64. Got 0.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
[017.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, about:blank]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
[003.html]
|
||||
type: testharness
|
||||
expected: ERROR
|
||||
[shared]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
|
||||
<title>Canvas test: 2d.path.ellipse.basics</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.ellipse.basics</h1>
|
||||
<p class="desc">Verify canvas throws error when drawing ellipse with negative radii.</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 canvas throws error when drawing ellipse with negative radii.");
|
||||
_addTest(function(canvas, ctx) {
|
||||
|
||||
ctx.ellipse(10, 10, 10, 5, 0, 0, 1, false);
|
||||
ctx.ellipse(10, 10, 10, 0, 0, 0, 1, false);
|
||||
ctx.ellipse(10, 10, -0, 5, 0, 0, 1, false);
|
||||
assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.ellipse(10, 10, -2, 5, 0, 0, 1, false); });
|
||||
assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.ellipse(10, 10, 0, -1.5, 0, 0, 1, false); });
|
||||
assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.ellipse(10, 10, -2, -5, 0, 0, 1, false); });
|
||||
ctx.ellipse(80, 0, 10, 4294967277, Math.PI / -84, -Math.PI / 2147483436, false);
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
|
||||
<title>Canvas test: 2d.imageData.object.ctor.basics</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.imageData.object.ctor.basics</h1>
|
||||
<p class="desc">Testing different type of ImageData constructor</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("Testing different type of ImageData constructor");
|
||||
_addTest(function(canvas, ctx) {
|
||||
|
||||
function setRGBA(imageData, i, rgba)
|
||||
{
|
||||
var s = i * 4;
|
||||
imageData[s] = rgba[0];
|
||||
imageData[s + 1] = rgba[1];
|
||||
imageData[s + 2] = rgba[2];
|
||||
imageData[s + 3] = rgba[3];
|
||||
}
|
||||
|
||||
function getRGBA(imageData, i)
|
||||
{
|
||||
var result = [];
|
||||
var s = i * 4;
|
||||
for (var j = 0; j < 4; j++) {
|
||||
result[j] = imageData[s + j];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function assertArrayEquals(actual, expected)
|
||||
{
|
||||
_assertSame(typeof actual, "object", "typeof actual", "\"object\"");
|
||||
_assertDifferent(actual, null, "actual", "null");
|
||||
_assertSame("length" in actual, true, "\"length\" in actual", "true");
|
||||
_assertSame(actual.length, expected.length, "actual.length", "expected.length");
|
||||
for (var i = 0; i < actual.length; i++) {
|
||||
_assertSame(actual.hasOwnProperty(i), expected.hasOwnProperty(i), "actual.hasOwnProperty(i)", "expected.hasOwnProperty(i)");
|
||||
_assertSame(actual[i], expected[i], "actual[\""+(i)+"\"]", "expected[\""+(i)+"\"]");
|
||||
}
|
||||
}
|
||||
|
||||
_assertDifferent(ImageData, undefined, "ImageData", "undefined");
|
||||
imageData = new ImageData(100, 50);
|
||||
|
||||
_assertDifferent(imageData, null, "imageData", "null");
|
||||
_assertDifferent(imageData.data, null, "imageData.data", "null");
|
||||
_assertSame(imageData.width, 100, "imageData.width", "100");
|
||||
_assertSame(imageData.height, 50, "imageData.height", "50");
|
||||
assertArrayEquals(getRGBA(imageData.data, 4), [0, 0, 0, 0]);
|
||||
|
||||
var testColor = [0, 255, 255, 128];
|
||||
setRGBA(imageData.data, 4, testColor);
|
||||
assertArrayEquals(getRGBA(imageData.data, 4), testColor);
|
||||
|
||||
assert_throws_js(TypeError, function() { new ImageData(10); });
|
||||
assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(0, 10); });
|
||||
assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(10, 0); });
|
||||
assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData('width', 'height'); });
|
||||
assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(1 << 31, 1 << 31); });
|
||||
assert_throws_js(TypeError, function() { new ImageData(new Uint8ClampedArray(0)); });
|
||||
assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(new Uint8Array(100), 25); });
|
||||
assert_throws_dom("INVALID_STATE_ERR", function() { new ImageData(new Uint8ClampedArray(27), 2); });
|
||||
assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(new Uint8ClampedArray(28), 7, 0); });
|
||||
assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(new Uint8ClampedArray(104), 14); });
|
||||
assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(new Uint8ClampedArray([12, 34, 168, 65328]), 1, 151); });
|
||||
assert_throws_js(TypeError, function() { new ImageData(self, 4, 4); });
|
||||
assert_throws_js(TypeError, function() { new ImageData(null, 4, 4); });
|
||||
assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(imageData.data, 0); });
|
||||
assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(imageData.data, 13); });
|
||||
assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(imageData.data, 1 << 31); });
|
||||
assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(imageData.data, 'biggish'); });
|
||||
assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(imageData.data, 1 << 24, 1 << 31); });
|
||||
_assertSame(new ImageData(new Uint8ClampedArray(28), 7).height, 1, "new ImageData(new Uint8ClampedArray(28), 7).height", "1");
|
||||
|
||||
imageDataFromData = new ImageData(imageData.data, 100);
|
||||
_assertSame(imageDataFromData.width, 100, "imageDataFromData.width", "100");
|
||||
_assertSame(imageDataFromData.height, 50, "imageDataFromData.height", "50");
|
||||
_assertSame(imageDataFromData.data, imageData.data, "imageDataFromData.data", "imageData.data");
|
||||
assertArrayEquals(getRGBA(imageDataFromData.data, 10), getRGBA(imageData.data, 10));
|
||||
setRGBA(imageData.data, 10, testColor);
|
||||
assertArrayEquals(getRGBA(imageDataFromData.data, 10), getRGBA(imageData.data, 10));
|
||||
|
||||
var data = new Uint8ClampedArray(400);
|
||||
data[22] = 129;
|
||||
imageDataFromData = new ImageData(data, 20, 5);
|
||||
_assertSame(imageDataFromData.width, 20, "imageDataFromData.width", "20");
|
||||
_assertSame(imageDataFromData.height, 5, "imageDataFromData.height", "5");
|
||||
_assertSame(imageDataFromData.data, data, "imageDataFromData.data", "data");
|
||||
assertArrayEquals(getRGBA(imageDataFromData.data, 2), getRGBA(data, 2));
|
||||
setRGBA(imageDataFromData.data, 2, testColor);
|
||||
assertArrayEquals(getRGBA(imageDataFromData.data, 2), getRGBA(data, 2));
|
||||
|
||||
if (window.SharedArrayBuffer) {
|
||||
assert_throws_js(TypeError, function() { new ImageData(new Uint16Array(new SharedArrayBuffer(32)), 4, 2); });
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
@ -33,7 +33,7 @@ document.fonts.ready.then(() => {
|
|||
step_timeout(t.step_func_done(function () {
|
||||
ctx.font = '50px CanvasTest';
|
||||
_assertSame(ctx.measureText('A B').width, 150, "ctx.measureText('A B').width", "150");
|
||||
_assertSame(ctx.measureText('A B').width, 150, "ctx.measureText('A B').width", "150");
|
||||
_assertSame(ctx.measureText('A B').width, 200, "ctx.measureText('A B').width", "200");
|
||||
_assertSame(ctx.measureText('A \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dB').width, 150, "ctx.measureText('A \\x09\\x0a\\x0c\\x0d \\x09\\x0a\\x0c\\x0dB').width", "150");
|
||||
_assert(ctx.measureText('A \x0b B').width >= 200, "ctx.measureText('A \\x0b B').width >= 200");
|
||||
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
|
||||
<title>OffscreenCanvas test: 2d.path.isPointInStroke.basic</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/html/canvas/resources/canvas-tests.js"></script>
|
||||
|
||||
<h1>2d.path.isPointInStroke.basic</h1>
|
||||
<p class="desc">detects whether point is in the area contained by the stroke of the path</p>
|
||||
|
||||
|
||||
<script>
|
||||
var t = async_test("detects whether point is in the area contained by the stroke of the path");
|
||||
var t_pass = t.done.bind(t);
|
||||
var t_fail = t.step_func(function(reason) {
|
||||
throw reason;
|
||||
});
|
||||
t.step(function() {
|
||||
|
||||
var offscreenCanvas = new OffscreenCanvas(100, 50);
|
||||
var ctx = offscreenCanvas.getContext('2d');
|
||||
|
||||
ctx.strokeStyle = '#0f0';
|
||||
ctx.beginPath();
|
||||
ctx.rect(0, 0, 20, 20);
|
||||
_assertSame(ctx.isPointInStroke(0, 0), true, "ctx.isPointInStroke(0, 0)", "true");
|
||||
_assertSame(ctx.isPointInStroke(30, 10), false, "ctx.isPointInStroke(30, 10)", "false");
|
||||
|
||||
var path = new Path2D();
|
||||
path.rect(20, 20, 100, 100);
|
||||
_assertSame(ctx.isPointInStroke(path, 20, 20), true, "ctx.isPointInStroke(path, 20, 20)", "true");
|
||||
_assertSame(ctx.isPointInStroke(path, 120, 20), true, "ctx.isPointInStroke(path, 120, 20)", "true");
|
||||
t.done();
|
||||
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,32 @@
|
|||
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
|
||||
// OffscreenCanvas test in a worker:2d.path.isPointInStroke.basic
|
||||
// Description:detects whether point is in the area contained by the stroke of the path
|
||||
// Note:
|
||||
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("/html/canvas/resources/canvas-tests.js");
|
||||
|
||||
var t = async_test("detects whether point is in the area contained by the stroke of the path");
|
||||
var t_pass = t.done.bind(t);
|
||||
var t_fail = t.step_func(function(reason) {
|
||||
throw reason;
|
||||
});
|
||||
t.step(function() {
|
||||
|
||||
var offscreenCanvas = new OffscreenCanvas(100, 50);
|
||||
var ctx = offscreenCanvas.getContext('2d');
|
||||
|
||||
ctx.strokeStyle = '#0f0';
|
||||
ctx.beginPath();
|
||||
ctx.rect(0, 0, 20, 20);
|
||||
_assertSame(ctx.isPointInStroke(0, 0), true, "ctx.isPointInStroke(0, 0)", "true");
|
||||
_assertSame(ctx.isPointInStroke(30, 10), false, "ctx.isPointInStroke(30, 10)", "false");
|
||||
|
||||
var path = new Path2D();
|
||||
path.rect(20, 20, 100, 100);
|
||||
_assertSame(ctx.isPointInStroke(path, 20, 20), true, "ctx.isPointInStroke(path, 20, 20)", "true");
|
||||
_assertSame(ctx.isPointInStroke(path, 120, 20), true, "ctx.isPointInStroke(path, 120, 20)", "true");
|
||||
t.done();
|
||||
|
||||
});
|
||||
done();
|
|
@ -27,7 +27,7 @@ fonts.add(f);
|
|||
fonts.ready.then(function() {
|
||||
ctx.font = '50px CanvasTest';
|
||||
_assertSame(ctx.measureText('A B').width, 150, "ctx.measureText('A B').width", "150");
|
||||
_assertSame(ctx.measureText('A B').width, 150, "ctx.measureText('A B').width", "150");
|
||||
_assertSame(ctx.measureText('A B').width, 200, "ctx.measureText('A B').width", "200");
|
||||
_assertSame(ctx.measureText('A \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dB').width, 150, "ctx.measureText('A \\x09\\x0a\\x0c\\x0d \\x09\\x0a\\x0c\\x0dB').width", "150");
|
||||
_assert(ctx.measureText('A \x0b B').width >= 200, "ctx.measureText('A \\x0b B').width >= 200");
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ fonts.add(f);
|
|||
fonts.ready.then(function() {
|
||||
ctx.font = '50px CanvasTest';
|
||||
_assertSame(ctx.measureText('A B').width, 150, "ctx.measureText('A B').width", "150");
|
||||
_assertSame(ctx.measureText('A B').width, 150, "ctx.measureText('A B').width", "150");
|
||||
_assertSame(ctx.measureText('A B').width, 200, "ctx.measureText('A B').width", "200");
|
||||
_assertSame(ctx.measureText('A \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dB').width, 150, "ctx.measureText('A \\x09\\x0a\\x0c\\x0d \\x09\\x0a\\x0c\\x0dB').width", "150");
|
||||
_assert(ctx.measureText('A \x0b B').width >= 200, "ctx.measureText('A \\x0b B').width >= 200");
|
||||
|
||||
|
|
|
@ -1560,6 +1560,19 @@
|
|||
@assert pixel 90,45 == 0,255,0,255;
|
||||
expected: green
|
||||
|
||||
- name: 2d.path.ellipse.basics
|
||||
desc: Verify canvas throws error when drawing ellipse with negative radii.
|
||||
testing:
|
||||
- 2d.ellipse.basics
|
||||
code: |
|
||||
ctx.ellipse(10, 10, 10, 5, 0, 0, 1, false);
|
||||
ctx.ellipse(10, 10, 10, 0, 0, 0, 1, false);
|
||||
ctx.ellipse(10, 10, -0, 5, 0, 0, 1, false);
|
||||
@assert throws INDEX_SIZE_ERR ctx.ellipse(10, 10, -2, 5, 0, 0, 1, false);
|
||||
@assert throws INDEX_SIZE_ERR ctx.ellipse(10, 10, 0, -1.5, 0, 0, 1, false);
|
||||
@assert throws INDEX_SIZE_ERR ctx.ellipse(10, 10, -2, -5, 0, 0, 1, false);
|
||||
ctx.ellipse(80, 0, 10, 4294967277, Math.PI / -84, -Math.PI / 2147483436, false);
|
||||
|
||||
- name: 2d.path.fill.overlap
|
||||
testing:
|
||||
- 2d.path.fill.basic
|
||||
|
@ -2538,7 +2551,6 @@
|
|||
// hit-test past the end of the dash (t=10.2)
|
||||
@assert ctx.isPointInStroke(3.74*scale, 14.46*scale) === false;
|
||||
|
||||
|
||||
- name: 2d.path.isPointInPath.basic
|
||||
desc: Verify the winding rule in isPointInPath works for for rect path.
|
||||
testing:
|
||||
|
|
|
@ -585,15 +585,96 @@
|
|||
@assert imgdata.data[i] === 0;
|
||||
}
|
||||
|
||||
- name: 2d.imageData.object.ctor.size.bounds
|
||||
desc: ImageData has a usable constructor
|
||||
- name: 2d.imageData.object.ctor.basics
|
||||
desc: Testing different type of ImageData constructor
|
||||
testing:
|
||||
- 2d.imageData.type
|
||||
code: |
|
||||
@assert window.ImageData !== undefined;
|
||||
@assert throws INDEX_SIZE_ERR new window.ImageData(0, 0);
|
||||
@assert throws INDEX_SIZE_ERR new window.ImageData(0, 1);
|
||||
@assert throws INDEX_SIZE_ERR new window.ImageData(1, 0);
|
||||
function setRGBA(imageData, i, rgba)
|
||||
{
|
||||
var s = i * 4;
|
||||
imageData[s] = rgba[0];
|
||||
imageData[s + 1] = rgba[1];
|
||||
imageData[s + 2] = rgba[2];
|
||||
imageData[s + 3] = rgba[3];
|
||||
}
|
||||
|
||||
function getRGBA(imageData, i)
|
||||
{
|
||||
var result = [];
|
||||
var s = i * 4;
|
||||
for (var j = 0; j < 4; j++) {
|
||||
result[j] = imageData[s + j];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function assertArrayEquals(actual, expected)
|
||||
{
|
||||
@assert typeof actual === "object";
|
||||
@assert actual !== null;
|
||||
@assert "length" in actual === true;
|
||||
@assert actual.length === expected.length;
|
||||
for (var i = 0; i < actual.length; i++) {
|
||||
@assert actual.hasOwnProperty(i) === expected.hasOwnProperty(i);
|
||||
@assert actual[i] === expected[i];
|
||||
}
|
||||
}
|
||||
|
||||
@assert ImageData !== undefined;
|
||||
imageData = new ImageData(100, 50);
|
||||
|
||||
@assert imageData !== null;
|
||||
@assert imageData.data !== null;
|
||||
@assert imageData.width === 100;
|
||||
@assert imageData.height === 50;
|
||||
assertArrayEquals(getRGBA(imageData.data, 4), [0, 0, 0, 0]);
|
||||
|
||||
var testColor = [0, 255, 255, 128];
|
||||
setRGBA(imageData.data, 4, testColor);
|
||||
assertArrayEquals(getRGBA(imageData.data, 4), testColor);
|
||||
|
||||
@assert throws TypeError new ImageData(10);
|
||||
@assert throws INDEX_SIZE_ERR new ImageData(0, 10);
|
||||
@assert throws INDEX_SIZE_ERR new ImageData(10, 0);
|
||||
@assert throws INDEX_SIZE_ERR new ImageData('width', 'height');
|
||||
@assert throws INDEX_SIZE_ERR new ImageData(1 << 31, 1 << 31);
|
||||
@assert throws TypeError new ImageData(new Uint8ClampedArray(0));
|
||||
@assert throws INDEX_SIZE_ERR new ImageData(new Uint8Array(100), 25);
|
||||
@assert throws INVALID_STATE_ERR new ImageData(new Uint8ClampedArray(27), 2);
|
||||
@assert throws INDEX_SIZE_ERR new ImageData(new Uint8ClampedArray(28), 7, 0);
|
||||
@assert throws INDEX_SIZE_ERR new ImageData(new Uint8ClampedArray(104), 14);
|
||||
@assert throws INDEX_SIZE_ERR new ImageData(new Uint8ClampedArray([12, 34, 168, 65328]), 1, 151);
|
||||
@assert throws TypeError new ImageData(self, 4, 4);
|
||||
@assert throws TypeError new ImageData(null, 4, 4);
|
||||
@assert throws INDEX_SIZE_ERR new ImageData(imageData.data, 0);
|
||||
@assert throws INDEX_SIZE_ERR new ImageData(imageData.data, 13);
|
||||
@assert throws INDEX_SIZE_ERR new ImageData(imageData.data, 1 << 31);
|
||||
@assert throws INDEX_SIZE_ERR new ImageData(imageData.data, 'biggish');
|
||||
@assert throws INDEX_SIZE_ERR new ImageData(imageData.data, 1 << 24, 1 << 31);
|
||||
@assert new ImageData(new Uint8ClampedArray(28), 7).height === 1;
|
||||
|
||||
imageDataFromData = new ImageData(imageData.data, 100);
|
||||
@assert imageDataFromData.width === 100;
|
||||
@assert imageDataFromData.height === 50;
|
||||
@assert imageDataFromData.data === imageData.data;
|
||||
assertArrayEquals(getRGBA(imageDataFromData.data, 10), getRGBA(imageData.data, 10));
|
||||
setRGBA(imageData.data, 10, testColor);
|
||||
assertArrayEquals(getRGBA(imageDataFromData.data, 10), getRGBA(imageData.data, 10));
|
||||
|
||||
var data = new Uint8ClampedArray(400);
|
||||
data[22] = 129;
|
||||
imageDataFromData = new ImageData(data, 20, 5);
|
||||
@assert imageDataFromData.width === 20;
|
||||
@assert imageDataFromData.height === 5;
|
||||
@assert imageDataFromData.data === data;
|
||||
assertArrayEquals(getRGBA(imageDataFromData.data, 2), getRGBA(data, 2));
|
||||
setRGBA(imageDataFromData.data, 2, testColor);
|
||||
assertArrayEquals(getRGBA(imageDataFromData.data, 2), getRGBA(data, 2));
|
||||
|
||||
if (window.SharedArrayBuffer) {
|
||||
@assert throws TypeError new ImageData(new Uint16Array(new SharedArrayBuffer(32)), 4, 2);
|
||||
}
|
||||
|
||||
- name: 2d.imageData.object.ctor.array
|
||||
desc: ImageData has a usable constructor
|
||||
|
|
|
@ -455,7 +455,7 @@
|
|||
step_timeout(t.step_func_done(function () {
|
||||
ctx.font = '50px CanvasTest';
|
||||
@assert ctx.measureText('A B').width === 150;
|
||||
@assert ctx.measureText('A B').width === 150; @moz-todo
|
||||
@assert ctx.measureText('A B').width === 200;
|
||||
@assert ctx.measureText('A \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dB').width === 150; @moz-todo
|
||||
@assert ctx.measureText('A \x0b B').width >= 200;
|
||||
|
||||
|
|
|
@ -5,6 +5,21 @@
|
|||
code: |
|
||||
@assert canvas.getContext('2d') !== null;
|
||||
|
||||
- name: 2d.getcontext.invalid.args
|
||||
desc: Calling getContext with invalid arguments.
|
||||
testing:
|
||||
- context.2d
|
||||
code: |
|
||||
@assert canvas.getContext('') === null;
|
||||
@assert canvas.getContext('2d#') === null;
|
||||
@assert canvas.getContext('This is clearly not a valid context name.') === null;
|
||||
@assert canvas.getContext('2d\0') === null;
|
||||
@assert canvas.getContext('2\uFF44') === null;
|
||||
@assert canvas.getContext('2D') === null;
|
||||
@assert throws TypeError canvas.getContext();
|
||||
@assert canvas.getContext('null') === null;
|
||||
@assert canvas.getContext('undefined') === null;
|
||||
|
||||
- name: 2d.getcontext.extraargs
|
||||
desc: The 2D context ignores extra getContext arguments
|
||||
testing:
|
||||
|
@ -131,3 +146,12 @@
|
|||
ctx.canvas = c;
|
||||
@assert ctx.canvas === d;
|
||||
|
||||
- name: 2d.canvas.context
|
||||
desc: checks CanvasRenderingContext2D prototype
|
||||
testing:
|
||||
- 2d.path.contexttypexxx.basic
|
||||
code: |
|
||||
@assert CanvasRenderingContext2D.prototype.__proto__ === Object.prototype;
|
||||
@assert ctx.__proto__ === CanvasRenderingContext2D.prototype;
|
||||
t.done();
|
||||
|
||||
|
|
|
@ -2395,3 +2395,20 @@
|
|||
@assert ctx.isPointInPath(NaN, NaN) === false;
|
||||
t.done();
|
||||
|
||||
- name: 2d.path.isPointInStroke.basic
|
||||
desc: detects whether point is in the area contained by the stroke of the path
|
||||
testing:
|
||||
- 2d.path.isPointInStroke.basic
|
||||
code: |
|
||||
ctx.strokeStyle = '#0f0';
|
||||
ctx.beginPath();
|
||||
ctx.rect(0, 0, 20, 20);
|
||||
@assert ctx.isPointInStroke(0, 0) === true;
|
||||
@assert ctx.isPointInStroke(30, 10) === false;
|
||||
|
||||
var path = new Path2D();
|
||||
path.rect(20, 20, 100, 100);
|
||||
@assert ctx.isPointInStroke(path, 20, 20) === true;
|
||||
@assert ctx.isPointInStroke(path, 120, 20) === true;
|
||||
t.done();
|
||||
|
||||
|
|
|
@ -1089,7 +1089,7 @@
|
|||
fonts.ready.then(function() {
|
||||
ctx.font = '50px CanvasTest';
|
||||
@assert ctx.measureText('A B').width === 150;
|
||||
@assert ctx.measureText('A B').width === 150; @moz-todo
|
||||
@assert ctx.measureText('A B').width === 200;
|
||||
@assert ctx.measureText('A \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dB').width === 150; @moz-todo
|
||||
@assert ctx.measureText('A \x0b B').width >= 200;
|
||||
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
|
||||
<title>Canvas test: 2d.canvas.context</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.canvas.context</h1>
|
||||
<p class="desc">checks CanvasRenderingContext2D prototype</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("checks CanvasRenderingContext2D prototype");
|
||||
_addTest(function(canvas, ctx) {
|
||||
|
||||
_assertSame(CanvasRenderingContext2D.prototype.__proto__, Object.prototype, "CanvasRenderingContext2D.prototype.__proto__", "Object.prototype");
|
||||
_assertSame(ctx.__proto__, CanvasRenderingContext2D.prototype, "ctx.__proto__", "CanvasRenderingContext2D.prototype");
|
||||
t.done();
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
|
||||
<title>Canvas test: 2d.getcontext.invalid.args</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.getcontext.invalid.args</h1>
|
||||
<p class="desc">Calling getContext with invalid arguments.</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("Calling getContext with invalid arguments.");
|
||||
_addTest(function(canvas, ctx) {
|
||||
|
||||
_assertSame(canvas.getContext(''), null, "canvas.getContext('')", "null");
|
||||
_assertSame(canvas.getContext('2d#'), null, "canvas.getContext('2d#')", "null");
|
||||
_assertSame(canvas.getContext('This is clearly not a valid context name.'), null, "canvas.getContext('This is clearly not a valid context name.')", "null");
|
||||
_assertSame(canvas.getContext('2d\0'), null, "canvas.getContext('2d\\0')", "null");
|
||||
_assertSame(canvas.getContext('2\uFF44'), null, "canvas.getContext('2\\uFF44')", "null");
|
||||
_assertSame(canvas.getContext('2D'), null, "canvas.getContext('2D')", "null");
|
||||
assert_throws_js(TypeError, function() { canvas.getContext(); });
|
||||
_assertSame(canvas.getContext('null'), null, "canvas.getContext('null')", "null");
|
||||
_assertSame(canvas.getContext('undefined'), null, "canvas.getContext('undefined')", "null");
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue