Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1778)

Side by Side Diff: third_party/WebKit/LayoutTests/csspaint/register-failed.html

Issue 1834843002: [WIP] Plumbing for paint Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: \o/\o/ Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5 function runner(tests) {
6 if (window.testRunner) {
7 testRunner.waitUntilDone();
8 testRunner.dumpAsText();
9 }
10
11 tests.reduce(function(chain, obj) {
12 return chain.then(function() {
13 console.log('The worklet should throw an error with: "' + obj.expect edError + '"');
14 var blob = new Blob([obj.script], {type: 'text/javascript'});
15 return paintWorklet.import(URL.createObjectURL(blob));
16 });
17 }, Promise.resolve()).then(function() {
18 if (window.testRunner) {
19 testRunner.notifyDone();
20 }
21 });
22 }
23
24 function runTest() {
25 runner([{
26 expectedError: "A class with name:'foo' is already registered.",
27 script: "registerPaint('foo', class { }); registerPaint('foo', class { } );",
28 }, {
29 expectedError: "The empty string is not a valid name.",
30 script: "registerPaint('', class { });",
31 }, {
32 expectedError: "failed!",
33 script: "registerPaint('foo3', class { static get inputProperties() { th row Error('failed!'); } });",
34 }, {
35 expectedError: "The value provided is neither an array, nor does it have indexed properties.",
36 script: "registerPaint('foo4', class { static get inputProperties() { re turn 42; } });",
37 }]);
38 }
39 </script>
40 </head>
41 <body onload="runTest()">
42 <p>This test imports a </p>
43 </body>
44 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698