Bug 1530852 [wpt PR 15497] - v8binding: Make PaintWorkletGlobalScope use IDL callback function, a=testonly
authorYuki Shiino <yukishiino@chromium.org>
Wed, 06 Mar 2019 12:36:18 +0000
changeset 464669 80f87e0a5ed3cd2f37f5f7d0664d61c479826b72
parent 464668 55dcd4b52946f3674e3c93b70b9dafe9f0f3f5ee
child 464670 0a9bd27b33902cb0a5a6baca2ca7b6a74ea1dd37
push id35717
push useraciure@mozilla.com
push dateSun, 17 Mar 2019 09:45:26 +0000
treeherdermozilla-central@e0861be8d6c0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1530852, 15497, 1478850, 634582
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
testing/web-platform/tests/css/css-paint-api/parse-input-arguments-002.https.html
testing/web-platform/tests/css/css-paint-api/parse-input-arguments-003.https.html
testing/web-platform/tests/css/css-paint-api/parse-input-arguments-005.https.html
testing/web-platform/tests/css/css-paint-api/parse-input-arguments-006.https.html
testing/web-platform/tests/css/css-paint-api/parse-input-arguments-008.https.html
testing/web-platform/tests/css/css-paint-api/parse-input-arguments-009.https.html
testing/web-platform/tests/css/css-paint-api/parse-input-arguments-010.https.html
testing/web-platform/tests/css/css-paint-api/parse-input-arguments-011.https.html
testing/web-platform/tests/css/css-paint-api/parse-input-arguments-012.https.html
testing/web-platform/tests/css/css-paint-api/parse-input-arguments-016.https.html
--- a/testing/web-platform/tests/css/css-paint-api/parse-input-arguments-002.https.html
+++ b/testing/web-platform/tests/css/css-paint-api/parse-input-arguments-002.https.html
@@ -20,17 +20,18 @@
 var testsPassed = false;
 try {
     registerPaint('foo1', class {
         static get inputArguments() {
             return 'non sense stuff';
         }
     });
 } 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;
 }
 
 registerPaint('geometry', class {
     paint(ctx, geom) {
         if (testsPassed)
             ctx.strokeStyle = 'green';
         else
--- a/testing/web-platform/tests/css/css-paint-api/parse-input-arguments-003.https.html
+++ b/testing/web-platform/tests/css/css-paint-api/parse-input-arguments-003.https.html
@@ -20,17 +20,18 @@
 var testsPassed = false;
 try {
     registerPaint('foo2', class {
         static get inputArguments() {
             return ['<non-sense-type>'];
         }
     });
 } 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;
 }
 
 registerPaint('geometry', class {
     paint(ctx, geom) {
         if (testsPassed)
             ctx.strokeStyle = 'green';
         else
--- a/testing/web-platform/tests/css/css-paint-api/parse-input-arguments-005.https.html
+++ b/testing/web-platform/tests/css/css-paint-api/parse-input-arguments-005.https.html
@@ -17,17 +17,18 @@
 <div id="canvas-geometry" class="container"></div>
 
 <script id="code" type="text/worklet">
 var testsPassed = false;
 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;
 }
 
 registerPaint('geometry', class {
     paint(ctx, geom) {
         if (testsPassed)
             ctx.strokeStyle = 'green';
         else
--- a/testing/web-platform/tests/css/css-paint-api/parse-input-arguments-006.https.html
+++ b/testing/web-platform/tests/css/css-paint-api/parse-input-arguments-006.https.html
@@ -16,17 +16,18 @@
 <body>
 <div id="canvas-geometry" class="container"></div>
 
 <script id="code" type="text/worklet">
 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;
 }
 
 registerPaint('geometry', class {
     paint(ctx, geom) {
         if (testsPassed)
             ctx.strokeStyle = 'green';
         else
--- a/testing/web-platform/tests/css/css-paint-api/parse-input-arguments-008.https.html
+++ b/testing/web-platform/tests/css/css-paint-api/parse-input-arguments-008.https.html
@@ -20,17 +20,18 @@
 var testsPassed = false;
 try {
     registerPaint('foo4', class {
         static get inputProperties() {
             return 42;
         }
     });
 } 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;
 }
 
 registerPaint('geometry', class {
     paint(ctx, geom) {
         if (testsPassed)
             ctx.strokeStyle = 'green';
         else
--- a/testing/web-platform/tests/css/css-paint-api/parse-input-arguments-009.https.html
+++ b/testing/web-platform/tests/css/css-paint-api/parse-input-arguments-009.https.html
@@ -18,17 +18,18 @@
 
 <script id="code" type="text/worklet">
 var testsPassed = false;
 try {
     var a = function() { };
     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;
 }
 
 registerPaint('geometry', class {
     paint(ctx, geom) {
         if (testsPassed)
             ctx.strokeStyle = 'green';
         else
--- a/testing/web-platform/tests/css/css-paint-api/parse-input-arguments-010.https.html
+++ b/testing/web-platform/tests/css/css-paint-api/parse-input-arguments-010.https.html
@@ -18,17 +18,18 @@
 
 <script id="code" type="text/worklet">
 var testsPassed = false;
 try {
     var b = function() { };
     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;
 }
 
 registerPaint('geometry', class {
     paint(ctx, geom) {
         if (testsPassed)
             ctx.strokeStyle = 'green';
         else
--- a/testing/web-platform/tests/css/css-paint-api/parse-input-arguments-011.https.html
+++ b/testing/web-platform/tests/css/css-paint-api/parse-input-arguments-011.https.html
@@ -16,17 +16,18 @@
 <body>
 <div id="canvas-geometry" class="container"></div>
 
 <script id="code" type="text/worklet">
 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;
 }
 
 registerPaint('geometry', class {
     paint(ctx, geom) {
         if (testsPassed)
             ctx.strokeStyle = 'green';
         else
--- a/testing/web-platform/tests/css/css-paint-api/parse-input-arguments-012.https.html
+++ b/testing/web-platform/tests/css/css-paint-api/parse-input-arguments-012.https.html
@@ -20,17 +20,18 @@
 var testsPassed = false;
 try {
     registerPaint('foo8', class {
         get paint() {
             return 42;
         }
     });
 } 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;
 }
 
 registerPaint('geometry', class {
     paint(ctx, geom) {
         if (testsPassed)
             ctx.strokeStyle = 'green';
         else
--- a/testing/web-platform/tests/css/css-paint-api/parse-input-arguments-016.https.html
+++ b/testing/web-platform/tests/css/css-paint-api/parse-input-arguments-016.https.html
@@ -20,17 +20,18 @@
 var testsPassed = false;
 try {
     registerPaint('foo12', class {
         static get contextOptions() {
             return 42;
         }
     });
 } 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;
 }
 
 registerPaint('geometry', class {
     paint(ctx, geom) {
         if (testsPassed)
             ctx.strokeStyle = 'green';
         else