Bug 1444643 [wpt PR 9958] - Allow for exception to occur if medium not found, a=testonly
authorChris Nardi <christopherncarmel@hotmail.com>
Mon, 09 Apr 2018 16:41:08 +0000
changeset 467028 ca14ea060d91eb6477e381890af638ec80269ec3
parent 467027 ed108ac6a823038b72ec5dfbe273716b2f4eda37
child 467029 9eb3303debe4b10bd36d85ec73bfdcd725488a0f
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
bugs1444643
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 1444643 [wpt PR 9958] - Allow for exception to occur if medium not found, a=testonly Automatic update from web-platform-testsAllow for exception to occur if medium not found (#9958) According to https://drafts.csswg.org/cssom/#dom-medialist-deletemedium, "If nothing was removed, then throw a NotFoundError exception." Throwing an exception in this step stops the test with an error. Assert that the correct exception is thrown, and allow the test to continue. wpt-commits: 72a61489a6e95e5732c541b9d854fe957052110a wpt-pr: 9958 wpt-commits: 72a61489a6e95e5732c541b9d854fe957052110a wpt-pr: 9958
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/css/cssom/medialist-interfaces-002.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -532763,17 +532763,17 @@
    "8c62d1e6b5791b68240551c0c9cd115f4d16a892",
    "reftest"
   ],
   "css/cssom/medialist-interfaces-001.html": [
    "bae698d83d94e35d31750e0690e13c1ab5334379",
    "testharness"
   ],
   "css/cssom/medialist-interfaces-002.html": [
-   "20d4d9e76e0331816aed5f70182dee6966e568e7",
+   "e04c0d3c8533660f524310350c7e71defa4888b2",
    "testharness"
   ],
   "css/cssom/medialist-interfaces-003.html": [
    "42c6fb48a67af381e09995e27dcd8795557345dd",
    "testharness"
   ],
   "css/cssom/medialist-interfaces-004.html": [
    "a8a6a1b9966526de2d846baf6176880353f84e1a",
--- a/testing/web-platform/tests/css/cssom/medialist-interfaces-002.html
+++ b/testing/web-platform/tests/css/cssom/medialist-interfaces-002.html
@@ -53,17 +53,17 @@
     }, "deleteMedium_removes_correct_medium",
     { assert: "MediaList.deleteMedium removes correct medium and updates corresponding properties." });
 
     test(function() {
       media_list = setup();
 
       media_list.appendMedium("all");
 
-      media_list.deleteMedium("screen");
+      assert_throws("NotFoundError", () => media_list.deleteMedium("screen"));
 
       assert_equals(media_list.length, 1);
       assert_equals(media_list.item(0), "all");
       assert_equals(media_list.mediaText, "all");
     }, "deleteMedium_no_matching_medium_to_remove",
     { assert: "MediaList.deleteMedium doesn't modify MediaList when medium is not found." });
 
   </script>