OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="resources/test-runner-paint-helper.js"></script> | 4 <script src="resources/test-runner-paint-helper.js"></script> |
5 <script> | 5 <script> |
6 function runTest() { | 6 function runTest() { |
7 runner([{ | 7 runner([{ |
8 expectedError: "failed!", | 8 expectedError: "failed!", |
9 script: "registerPaint('foo', class { static get inputArguments() { throw
Error('failed!'); } });", | 9 script: "registerPaint('foo', class { static get inputArguments() { throw
Error('failed!'); } });", |
10 }, { | 10 }, { |
11 expectedError: " Failed to execute 'registerPaint' on 'PaintWorkletGlobalS
cope': The value provided is neither an array, nor does it have indexed properti
es.", | 11 expectedError: " Failed to execute 'registerPaint' on 'PaintWorkletGlobalS
cope': The value provided is neither an array, nor does it have indexed properti
es.", |
12 script: "registerPaint('foo1', class { static get inputArguments() { retur
n 'non sense stuff'; } });", | 12 script: "registerPaint('foo1', class { static get inputArguments() { retur
n 'non sense stuff'; } });", |
13 }, { | 13 }, { |
14 expectedError: "Failed to execute 'registerPaint' on 'PaintWorkletGlobalSc
ope': Invalid argument types.", | 14 expectedError: "Failed to execute 'registerPaint' on 'PaintWorkletGlobalSc
ope': Invalid argument types.", |
15 script: "registerPaint('foo2', class { static get inputArguments() { retur
n ['<non-sense-type>'] } });", | 15 script: "registerPaint('foo2', class { static get inputArguments() { retur
n ['<non-sense-type>'] } });", |
16 }, { | 16 }, { |
17 script: "registerPaint('foo3', class { static get inputArguments(){return
['<length>'];} paint() { } }); console.log('Success for \\'foo\\'.');", | 17 script: "registerPaint('foo3', class { static get inputArguments(){return
['<length>'];} paint() { } }); console.log('Success for \\'foo\\'.');", |
18 }]); | 18 }]); |
19 } | 19 } |
20 </script> | 20 </script> |
21 </head> | 21 </head> |
22 <body onload="runTest()"> | 22 <body onload="runTest()"> |
23 <p>This tests a series of PaintWorkletGlobalScope#registerPaint Parse Input Argu
ments calls.</p> | 23 <p>This tests a series of PaintWorkletGlobalScope#registerPaint Parse Input Argu
ments calls.</p> |
24 <p>See the devtools console for test output.</p> | 24 <p>See the devtools console for test output.</p> |
25 </body> | 25 </body> |
26 </html> | 26 </html> |
OLD | NEW |