| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="resources/test-runner-paint-helper.js"></script> | |
| 5 <script> | |
| 6 function runTest() { | |
| 7 runner([{ | |
| 8 expectedError: "failed!", | |
| 9 script: "registerPaint('foo', class { static get inputArguments() { throw
Error('failed!'); } });", | |
| 10 }, { | |
| 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'; } });", | |
| 13 }, { | |
| 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>'] } });", | |
| 16 }, { | |
| 17 script: "registerPaint('foo3', class { static get inputArguments(){return
['<length>'];} paint() { } }); console.log('Success for \\'foo\\'.');", | |
| 18 }]); | |
| 19 } | |
| 20 </script> | |
| 21 </head> | |
| 22 <body onload="runTest()"> | |
| 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> | |
| 25 </body> | |
| 26 </html> | |
| OLD | NEW |