Bug 1530852 [wpt PR 15497] - v8binding: Make PaintWorkletGlobalScope use IDL callback function, a=testonly

Automatic update from web-platform-tests
v8binding: Make PaintWorkletGlobalScope use IDL callback function

Converts PaintWorkletGlobalScope.registerPaint's second argument
|paintCtor| into IDL callback function type.  Also, makes
Paint Worklet use |PaintCallback| of callback function type.

Change-Id: I6706499705a116c85f5c092a46309854db88708c
Reviewed-on: https://chromium-review.googlesource.com/c/1478850
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634582}

--

wpt-commits: 270d9bf4444b52a2d66dd10ade64cdfa455f2300
wpt-pr: 15497
This commit is contained in:
Yuki Shiino 2019-03-06 12:36:18 +00:00 committed by James Graham
parent 3f0c7ac57b
commit 0d8e2b4320
10 changed files with 20 additions and 10 deletions

View File

@ -25,7 +25,8 @@ try {
}
});
} catch(ex) {
if (ex.name == "TypeError" && ex.message == "Failed to execute 'registerPaint' on 'PaintWorkletGlobalScope': The provided value cannot be converted to a sequence.")
// 'inputArguments' property is a string, not a sequence.
if (ex.name == 'TypeError')
testsPassed = true;
}

View File

@ -25,7 +25,8 @@ try {
}
});
} catch(ex) {
if (ex.name == "TypeError" && ex.message == "Failed to execute 'registerPaint' on 'PaintWorkletGlobalScope': Invalid argument types.")
// 'non-sense-type' is not a proper name of CSS properties.
if (ex.name == 'TypeError')
testsPassed = true;
}

View File

@ -22,7 +22,8 @@ try {
registerPaint('foo', class { paint() { } });
registerPaint('foo', class { paint() { } });
} catch(ex) {
if (ex.name == "NotSupportedError" && ex.message == "Failed to execute 'registerPaint' on 'PaintWorkletGlobalScope': A class with name:'foo' is already registered.")
// 'foo' gets registered twice.
if (ex.name == 'InvalidModificationError')
testsPassed = true;
}

View File

@ -21,7 +21,8 @@ var testsPassed = false;
try {
registerPaint('', class { });
} catch(ex) {
if (ex.name == 'TypeError' && ex.message == "Failed to execute 'registerPaint' on 'PaintWorkletGlobalScope': The empty string is not a valid name.")
// The empty string is not a valid name.
if (ex.name == 'TypeError')
testsPassed = true;
}

View File

@ -25,7 +25,8 @@ try {
}
});
} catch(ex) {
if (ex.name == 'TypeError' && ex.message == "Failed to execute 'registerPaint' on 'PaintWorkletGlobalScope': The provided value cannot be converted to a sequence.")
// 'inputProperties' property is 42, not a sequence<DOMString>.
if (ex.name == 'TypeError')
testsPassed = true;
}

View File

@ -23,7 +23,8 @@ try {
a.prototype = undefined;
registerPaint('foo5', a);
} catch(ex) {
if (ex.name == 'TypeError' && ex.message == "Failed to execute 'registerPaint' on 'PaintWorkletGlobalScope': The 'prototype' object on the class does not exist.")
// The prototype object is undefined, not an object.
if (ex.name == 'TypeError')
testsPassed = true;
}

View File

@ -23,7 +23,8 @@ try {
b.prototype = 42;
registerPaint('foo6', b);
} catch(ex) {
if (ex.name == 'TypeError' && ex.message == "Failed to execute 'registerPaint' on 'PaintWorkletGlobalScope': The 'prototype' property on the class is not an object.")
// The prototype object is 42, not an object.
if (ex.name == 'TypeError')
testsPassed = true;
}

View File

@ -21,7 +21,8 @@ var testsPassed = false;
try {
registerPaint('foo7', class { });
} catch(ex) {
if (ex.name == 'TypeError' && ex.message == "Failed to execute 'registerPaint' on 'PaintWorkletGlobalScope': The 'paint' property on the prototype does not exist.")
// 'paint' property doesn't exist on the prototype chain.
if (ex.name == 'TypeError')
testsPassed = true;
}

View File

@ -25,7 +25,8 @@ try {
}
});
} catch(ex) {
if (ex.name == 'TypeError' && ex.message == "Failed to execute 'registerPaint' on 'PaintWorkletGlobalScope': The 'paint' property on the prototype is not a function.")
// 'paint' property's value is 42, not a function.
if (ex.name == 'TypeError')
testsPassed = true;
}

View File

@ -25,7 +25,8 @@ try {
}
});
} catch(ex) {
if (ex.name == "TypeError" && ex.message == "Failed to execute 'registerPaint' on 'PaintWorkletGlobalScope': cannot convert to dictionary.")
// 'contextOptions' property is 42, not a dictionary.
if (ex.name == 'TypeError')
testsPassed = true;
}