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

Unified Diff: third_party/WebKit/LayoutTests/csspaint/parse-input-arguments.html

Issue 2561773003: Parse input argument types and store the argument types in CSSPaintDefinition. (Closed)
Patch Set: update tests Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/csspaint/parse-input-arguments-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/csspaint/parse-input-arguments.html
diff --git a/third_party/WebKit/LayoutTests/csspaint/parse-input-arguments.html b/third_party/WebKit/LayoutTests/csspaint/parse-input-arguments.html
new file mode 100644
index 0000000000000000000000000000000000000000..b78db59de968586e8dcac6d89154857ef149a003
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/csspaint/parse-input-arguments.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="resources/test-runner-paint-helper.js"></script>
+<script>
+function runTest() {
+ runner([{
+ expectedError: "failed!",
+ script: "registerPaint('foo', class { static get inputArguments() { throw Error('failed!'); } });",
+ }, {
+ expectedError: " Failed to execute 'registerPaint' on 'PaintWorkletGlobalScope': The value provided is neither an array, nor does it have indexed properties.",
+ script: "registerPaint('foo1', class { static get inputArguments() { return 'non sense stuff'; } });",
+ }, {
+ expectedError: "Failed to execute 'registerPaint' on 'PaintWorkletGlobalScope': Invalid argument types.",
+ script: "registerPaint('foo2', class { static get inputArguments() { return ['<non-sense-type>'] } });",
+ }, {
+ script: "registerPaint('foo3', class { static get inputArguments(){return ['<length>'];} paint() { } }); console.log('Success for \\'foo\\'.');",
+ }]);
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>This tests a series of PaintWorkletGlobalScope#registerPaint Parse Input Arguments calls.</p>
+<p>See the devtools console for test output.</p>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/csspaint/parse-input-arguments-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698