Bug 1598648 [wpt PR 20401] - Use `assert_array_equals` harness, a=testonly draft
authorAlexey Shvayka <shvaikalesh@gmail.com>
Sat, 23 Nov 2019 09:17:49 +0000
changeset 2496004 0a6057e1ec94c8c211d8ab864411b13c6e09a025
parent 2496003 c3c5e3fe72f8a1c98853770ddf4f7f1204f77bfa
child 2496005 65ba4794f87885c08e69fef73787d43bb0ac25f0
push id455263
push userwptsync@mozilla.com
push dateMon, 25 Nov 2019 19:36:14 +0000
treeherdertry@e7eb01746159 [default view] [failures only]
reviewerstestonly
bugs1598648, 20401
milestone72.0a1
Bug 1598648 [wpt PR 20401] - Use `assert_array_equals` harness, a=testonly wpt-commit: e716c449f65d7cf84e8ca0584595f75d21232259 wpt-pr: 20401
testing/web-platform/tests/css/cssom-view/MediaQueryList-addListener-removeListener.html
testing/web-platform/tests/css/cssom-view/MediaQueryList-extends-EventTarget-interop.html
--- a/testing/web-platform/tests/css/cssom-view/MediaQueryList-addListener-removeListener.html
+++ b/testing/web-platform/tests/css/cssom-view/MediaQueryList-addListener-removeListener.html
@@ -70,17 +70,17 @@ promise_test(async t => {
     });
     mql.addListener(() => {
         calls.push("2nd");
     });
 
     triggerMQLEvent(mql);
     await waitForChangesReported();
 
-    assert_equals(calls.join(), "1st,2nd");
+    assert_array_equals(calls, ["1st", "2nd"]);
 }, "listeners are called in order they were added");
 
 promise_test(async t => {
     const mql = await createMQL(t);
 
     let called = 0;
     const listener = () => {
         called++;
@@ -109,17 +109,17 @@ promise_test(async t => {
 
     mql1.addListener(() => {
         calls.push("mql1");
     });
 
     iframe.width = "200"; // 100x100 => 200x100
     await waitForChangesReported();
 
-    assert_equals(calls.join(), "mql1,mql2");
+    assert_array_equals(calls, ["mql1", "mql2"]);
 }, "listeners are called in order their MQLs were created");
 
 promise_test(async t => {
     const iframe = await createIFrame(t, 200);
     const media = `(max-height: 150px)`;
 
     const mql1 = iframe.contentWindow.matchMedia(media);
     const mql2 = iframe.contentWindow.matchMedia(media);
--- a/testing/web-platform/tests/css/cssom-view/MediaQueryList-extends-EventTarget-interop.html
+++ b/testing/web-platform/tests/css/cssom-view/MediaQueryList-extends-EventTarget-interop.html
@@ -154,15 +154,15 @@ promise_test(async t => {
     mql.addEventListener("change", {
         handleEvent() {
             calls.push("addEventListener");
         },
     }, true);
 
     triggerMQLEvent(mql);
     await waitForChangesReported();
-    assert_equals(calls.join(), "addListener,addEventListener", "triggerMQLEvent");
+    assert_array_equals(calls, ["addListener", "addEventListener"], "triggerMQLEvent");
 
     calls = [];
     mql.dispatchEvent(new Event("change"));
-    assert_equals(calls.join(), "addListener,addEventListener", "dispatchEvent");
+    assert_array_equals(calls, ["addListener", "addEventListener"], "dispatchEvent");
 }, "listeners are called in order they were added, ignoring capture parameter");
 </script>