Bug 1501924 - Fix a wrong use of assert_throws in createImageBitmap-invalid-args, r=Ms2ger
authorAndrea Marchesini <amarchesini@mozilla.com>
Thu, 25 Oct 2018 10:44:26 +0200
changeset 491258 5e6bc808c1d7bae1b7c63a257399820c67081c2c
parent 491257 2393a7d9f454e3d5fc310c5ee4a1cd94fea42ab2
child 491259 39af81ab41a7c420e3c4b574739bebcda0cdcbc1
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersMs2ger
bugs1501924
milestone65.0a1
Bug 1501924 - Fix a wrong use of assert_throws in createImageBitmap-invalid-args, r=Ms2ger
testing/web-platform/tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html
--- a/testing/web-platform/tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html
+++ b/testing/web-platform/tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html
@@ -75,17 +75,17 @@ testCases = [
             assert_equals(i.height, 100000000);
           })
           .catch(e => {
             // This case is not explicitly documented in the specification for
             // createImageBitmap, but it is expected that internal failures
             // cause InvalidStateError.
             //
             // Note: https://bugs.chromium.org/p/chromium/issues/detail?id=799025
-            assert_throws(e, function() { throw e }, new DOMException('', 'InvalidStateError'));
+            assert_throws("InvalidStateError", () => { throw e });
           });
       }
   },
 ];
 
 // Generate the test matrix for each sourceType + testCase combo.
 imageSourceTypes.forEach(imageSourceType => {
   testCases.forEach(testCase => {