Bug 1451257 [wpt PR 10303] - Simplify assert_throws in two places where error messages were passed, a=testonly
authorPhilip Jägenstedt <foolip@chromium.org>
Mon, 09 Apr 2018 22:04:21 +0000
changeset 467269 481f211d7f1c96010a922bd976a10d47f51a5d5a
parent 467268 06e258ea8af70189d18e9504be0183b298e5e6af
child 467270 366210378fc547535f3dd9fe7add2e1a8c70541a
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1451257, 10303, 980757, 995192, 548060
milestone61.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 1451257 [wpt PR 10303] - Simplify assert_throws in two places where error messages were passed, a=testonly Automatic update from web-platform-testsSimplify assert_throws in two places where error messages were passed This was discovered in https://chromium-review.googlesource.com/c/chromium/src/+/980757 by letting assert_throws also check that the message matches. That change itself isn't a good idea, but it's still just as well to use plain TypeErrors here to not make it seems like more is being tested than in fact is. Change-Id: I8f964e9b25cc94942cb86f3ee0017530f230e04a Reviewed-on: https://chromium-review.googlesource.com/995192 Reviewed-by: Adam Rice <ricea@chromium.org> Reviewed-by: Mounir Lamouri <mlamouri@chromium.org> Commit-Queue: Philip J├Ągenstedt <foolip@chromium.org> Cr-Commit-Position: refs/heads/master@{#548060} wpt-commits: 168e0e121c233c19292757f66fd949a444efffc1 wpt-pr: 10303 wpt-commits: 168e0e121c233c19292757f66fd949a444efffc1 wpt-pr: 10303
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/fetch/api/abort/general.any.js
testing/web-platform/tests/mediasession/setactionhandler.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -552339,17 +552339,17 @@
    "ea0eda077eb4a5a234ad3b97595da16aee178fc9",
    "testharness"
   ],
   "fetch/api/abort/general-sharedworker.html": [
    "96563c4324949b5dece964eaf6df0b25324e8365",
    "testharness"
   ],
   "fetch/api/abort/general.any.js": [
-   "a0b775a19b3046336c45289f5a87ea57e476f084",
+   "e7a735978af073066872021580ececcb7f465512",
    "testharness"
   ],
   "fetch/api/abort/serviceworker-intercepted.https.html": [
    "ee3512098bed44d034d9a0e6f2ccdbd5a07c7e42",
    "testharness"
   ],
   "fetch/api/basic/accept-header.any.js": [
    "ab322023411faca98534f620806b2418a6767e64",
@@ -575971,17 +575971,17 @@
    "0f0c1f7e3b58321a76229fa5a93e80b6863f181f",
    "testharness"
   ],
   "mediasession/playbackstate.html": [
    "e9edd18778d437b039bc45f2e3f35db725528447",
    "testharness"
   ],
   "mediasession/setactionhandler.html": [
-   "70a1f9e81faa3dbbe320a71a008e4594a29878a8",
+   "ab3482a22dd713ce7c71ce4b5efeb3cb201e76e6",
    "testharness"
   ],
   "mimesniff/OWNERS": [
    "69591fe91d93bf0a6b171734b119274a8c69bbde",
    "support"
   ],
   "mimesniff/README.md": [
    "d0b95d2e21e80df8b65d5bc8217f79d862229ae2",
--- a/testing/web-platform/tests/fetch/api/abort/general.any.js
+++ b/testing/web-platform/tests/fetch/api/abort/general.any.js
@@ -52,17 +52,17 @@ for (const { args, testName } of badRequ
     }
     catch (err) {
       const controller = new AbortController();
       controller.abort();
 
       // Add signal to 2nd arg
       args[1] = args[1] || {};
       args[1].signal = controller.signal;
-      await promise_rejects(t, err, fetch(...args));
+      await promise_rejects(t, new TypeError, fetch(...args));
     }
   }, `TypeError from request constructor takes priority - ${testName}`);
 }
 
 test(() => {
   const request = new Request('');
   assert_true(Boolean(request.signal), "Signal member is present & truthy");
   assert_equals(request.signal.constructor, AbortSignal);
--- a/testing/web-platform/tests/mediasession/setactionhandler.html
+++ b/testing/web-platform/tests/mediasession/setactionhandler.html
@@ -10,15 +10,13 @@ test(function(t) {
   window.navigator.mediaSession.setActionHandler("previoustrack", null);
   window.navigator.mediaSession.setActionHandler("nexttrack", null);
   window.navigator.mediaSession.setActionHandler("seekbackward", null);
   window.navigator.mediaSession.setActionHandler("seekforward", null);
 }, "Test that setActionHandler() can be executed for supported actions");
 
 test(function(t) {
   assert_throws(
-      new TypeError("Failed to execute 'setActionHandler' on 'MediaSession':" +
-                    "The provided value 'invalid' is not a valid enum value" +
-                    "of type MediaSessionAction."),
+      new TypeError,
       _ => { window.navigator.mediaSession.setActionHandler("invalid", null); });
 }, "Test that setActionHandler() throws exception for unsupported actions");
 
 </script>