diff --git a/tests/wpt/metadata-layout-2020/FileAPI/url/url-charset.window.js.ini b/tests/wpt/metadata-layout-2020/FileAPI/url/url-charset.window.js.ini index 7248ba77bd5..a9005e45d6e 100644 --- a/tests/wpt/metadata-layout-2020/FileAPI/url/url-charset.window.js.ini +++ b/tests/wpt/metadata-layout-2020/FileAPI/url/url-charset.window.js.ini @@ -3,3 +3,6 @@ [Blob charset should override any auto-detected charset.] expected: TIMEOUT + [Blob charset should override .] + expected: TIMEOUT + diff --git a/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini b/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini index 76b44d9e9cf..3605e8f3fc9 100644 --- a/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini +++ b/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini @@ -4,7 +4,7 @@ expected: TIMEOUT [Opening a blob URL in a new window immediately before revoking it works.] - expected: FAIL + expected: TIMEOUT [Fetching a blob URL immediately before revoking it works in an iframe.] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini deleted file mode 100644 index f29da48a2a0..00000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[hit-test-floats-003.html] - [Miss float below something else] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini new file mode 100644 index 00000000000..baa9f1a7541 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini @@ -0,0 +1,4 @@ +[hit-test-floats-005.html] + [Miss clipped float] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/flex-aspect-ratio-img-row-008.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/flex-aspect-ratio-img-row-008.html.ini new file mode 100644 index 00000000000..e360dc83f9c --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/flex-aspect-ratio-img-row-008.html.ini @@ -0,0 +1,2 @@ +[flex-aspect-ratio-img-row-008.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/flex-aspect-ratio-img-row-009.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/flex-aspect-ratio-img-row-009.html.ini new file mode 100644 index 00000000000..dfef92b8800 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/flex-aspect-ratio-img-row-009.html.ini @@ -0,0 +1,2 @@ +[flex-aspect-ratio-img-row-009.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/flex-aspect-ratio-img-row-010.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/flex-aspect-ratio-img-row-010.html.ini new file mode 100644 index 00000000000..556c9c8c87b --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/flex-aspect-ratio-img-row-010.html.ini @@ -0,0 +1,2 @@ +[flex-aspect-ratio-img-row-010.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/flex-aspect-ratio-img-row-011.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/flex-aspect-ratio-img-row-011.html.ini new file mode 100644 index 00000000000..fed6f2183d9 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/flex-aspect-ratio-img-row-011.html.ini @@ -0,0 +1,2 @@ +[flex-aspect-ratio-img-row-011.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/svg-root-as-flex-item-002.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/svg-root-as-flex-item-002.html.ini new file mode 100644 index 00000000000..d18a2a4b5cd --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/svg-root-as-flex-item-002.html.ini @@ -0,0 +1,2 @@ +[svg-root-as-flex-item-002.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/svg-root-as-flex-item-003.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/svg-root-as-flex-item-003.html.ini new file mode 100644 index 00000000000..9ca09711e56 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/svg-root-as-flex-item-003.html.ini @@ -0,0 +1,2 @@ +[svg-root-as-flex-item-003.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/CaretPosition-001.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/CaretPosition-001.html.ini deleted file mode 100644 index 4c79907309b..00000000000 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/CaretPosition-001.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[CaretPosition-001.html] - [Element at (400, 100)] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-001.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-001.html.ini new file mode 100644 index 00000000000..e38782d8c85 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-001.html.ini @@ -0,0 +1,4 @@ +[elementFromPoint-001.html] + [CSSOM View - 5 - extensions to the Document interface] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/elementsFromPoint-invalid-cases.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/elementsFromPoint-invalid-cases.html.ini new file mode 100644 index 00000000000..e181af5397f --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/elementsFromPoint-invalid-cases.html.ini @@ -0,0 +1,4 @@ +[elementsFromPoint-invalid-cases.html] + [The root element is the last element returned for otherwise empty queries within the viewport] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/offsetTopLeft-border-box.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/offsetTopLeft-border-box.html.ini deleted file mode 100644 index 239c35135e4..00000000000 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/offsetTopLeft-border-box.html.ini +++ /dev/null @@ -1,7 +0,0 @@ -[offsetTopLeft-border-box.html] - [container: 1] - expected: FAIL - - [container: 0] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/css/cssom/rule-restrictions.html.ini b/tests/wpt/metadata-layout-2020/css/cssom/rule-restrictions.html.ini new file mode 100644 index 00000000000..c27b1ee50c2 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/cssom/rule-restrictions.html.ini @@ -0,0 +1,7 @@ +[rule-restrictions.html] + [@page] + expected: FAIL + + [@keyframe] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/filter-effects/feflood-with-filter-reference.html.ini b/tests/wpt/metadata-layout-2020/css/filter-effects/feflood-with-filter-reference.html.ini new file mode 100644 index 00000000000..745b9642086 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/filter-effects/feflood-with-filter-reference.html.ini @@ -0,0 +1,2 @@ +[feflood-with-filter-reference.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini index dd6224425f1..7f559dc22c6 100644 --- a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini @@ -321,12 +321,15 @@ [ diff --git a/tests/wpt/web-platform-tests/css/css-display/display-math-on-non-mathml-elements.html b/tests/wpt/web-platform-tests/css/css-display/display-math-on-non-mathml-elements.html index 2d117cfff57..b622acdccd1 100644 --- a/tests/wpt/web-platform-tests/css/css-display/display-math-on-non-mathml-elements.html +++ b/tests/wpt/web-platform-tests/css/css-display/display-math-on-non-mathml-elements.html @@ -24,6 +24,6 @@ test(function() { assert_equals(window.getComputedStyle(element).display, element.getAttribute('data-expected')); - }, `computed display on <${element.tagName} style="${element.getAttribute('style')}">`); + }, `computed display on <${element.localName} style="${element.getAttribute('style')}">`); }); diff --git a/tests/wpt/web-platform-tests/css/css-display/display-math-on-pseudo-elements-001.html b/tests/wpt/web-platform-tests/css/css-display/display-math-on-pseudo-elements-001.html new file mode 100644 index 00000000000..dbc2525a690 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-display/display-math-on-pseudo-elements-001.html @@ -0,0 +1,30 @@ + + +display: math and inline-math on pseudo elements compute to flow + + + + +
+
+ + +
+ + +
+ diff --git a/tests/wpt/web-platform-tests/css/css-display/display-math-on-pseudo-elements-002-ref.html b/tests/wpt/web-platform-tests/css/css-display/display-math-on-pseudo-elements-002-ref.html new file mode 100644 index 00000000000..7d7ba376372 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-display/display-math-on-pseudo-elements-002-ref.html @@ -0,0 +1,17 @@ + + +display: block math and inline math on pseudo elements (reference) + +

Test passes if SPAN and DIV are respectively surrounded by inline and block + "math" text.

+
+ SPAN +
+
+ DIV +
diff --git a/tests/wpt/web-platform-tests/css/css-display/display-math-on-pseudo-elements-002.html b/tests/wpt/web-platform-tests/css/css-display/display-math-on-pseudo-elements-002.html new file mode 100644 index 00000000000..426adb6a23b --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-display/display-math-on-pseudo-elements-002.html @@ -0,0 +1,20 @@ + + +display: block math and inline math on pseudo elements + + + + +

Test passes if SPAN and DIV are respectively surrounded by inline and block + "math" text.

+
+ SPAN +
+
+ DIV +
diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-007.html b/tests/wpt/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-007.html new file mode 100644 index 00000000000..42441477583 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-007.html @@ -0,0 +1,15 @@ + +Aspect-ratio flex item + + + + + +

Test passes if there is a filled green square.

+ + + +
+ +
+
diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-008.html b/tests/wpt/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-008.html new file mode 100644 index 00000000000..59ec6fc68e0 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-008.html @@ -0,0 +1,12 @@ + +SVG img as flex item + + + + + +

Test passes if there is a filled green square.

+ +
+ +
diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-009.html b/tests/wpt/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-009.html new file mode 100644 index 00000000000..fab5f0bfdaf --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-009.html @@ -0,0 +1,26 @@ + +SVG img as flex item + + + + + + + + + + +

Test passes if there is a filled green square and no red.

+
+ +
+ +
diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-010.html b/tests/wpt/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-010.html new file mode 100644 index 00000000000..f57ba6f625c --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-010.html @@ -0,0 +1,13 @@ + +SVG img as flex item + + + + + + +

Test passes if there is a filled green square and no red.

+ +
+ +
diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-011.html b/tests/wpt/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-011.html new file mode 100644 index 00000000000..4c10b513fd8 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-011.html @@ -0,0 +1,13 @@ + +SVG img as flex item + + + + + + +

Test passes if there is a filled green square and no red.

+ +
+ +
diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/svg-root-as-flex-item-002.html b/tests/wpt/web-platform-tests/css/css-flexbox/svg-root-as-flex-item-002.html new file mode 100644 index 00000000000..0594eb406ee --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/svg-root-as-flex-item-002.html @@ -0,0 +1,27 @@ + +SVG root as flex item + + + + + + + + +

Test passes if there is a filled green square and no red.

+ +
+ +
+ + + +
diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/svg-root-as-flex-item-003.html b/tests/wpt/web-platform-tests/css/css-flexbox/svg-root-as-flex-item-003.html new file mode 100644 index 00000000000..778690d7948 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/svg-root-as-flex-item-003.html @@ -0,0 +1,15 @@ + +SVG root as flex item + + + + + + +

Test passes if there is a filled green square.

+ +
+ + + +
diff --git a/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-002.tentative.html b/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-002.tentative.html index 1272f955985..e6de63dbe90 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-002.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-002.tentative.html @@ -80,18 +80,18 @@
-
+
-
+
-
+
-
+
diff --git a/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-001.tentative.html b/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-001.tentative.html index 51d90d131c6..9ae2107ad23 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-001.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-001.tentative.html @@ -19,7 +19,7 @@

Test passes if you see a square of side 100 × 0.71^(0 − 0) = 100px.

-
+
X
diff --git a/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-002.tentative.html b/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-002.tentative.html index c56fc20c9c5..6f1073235b4 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-002.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-002.tentative.html @@ -19,7 +19,7 @@

Test passes if you see a square of side 500 × 0.71^(1 − 0) = 355px.

-
+
X
diff --git a/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-003.tentative-ref.html b/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-003.tentative-ref.html index f3ddde49f5a..741da4f75c2 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-003.tentative-ref.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-003.tentative-ref.html @@ -13,9 +13,9 @@ -

Test passes if you see a square of side 500 × 0.71^(1 − 0) = 355px.

+

Test passes if you see a square of side 500px.

-
X
+
X
diff --git a/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-003.tentative.html b/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-003.tentative.html index a7b22d921bf..9d83627fa01 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-003.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-003.tentative.html @@ -6,7 +6,7 @@ - + -

Test passes if you see a square of side 500 × 0.71^(1 − 0) = 355px.

+

Test passes if you see a square of side 500px.

X
diff --git a/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-004.tentative-ref.html b/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-004.tentative-ref.html index 63bfe20945d..edda57e25e4 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-004.tentative-ref.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-004.tentative-ref.html @@ -13,11 +13,11 @@ -

Test passes if you see a square of side 500 × 0.71^(1 − 0) = 355px.

+

Test passes if you see a square of side 500px.

-
X
+
X
diff --git a/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-004.tentative.html b/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-004.tentative.html index 9eca5716d8d..e12734a88cf 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-004.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-004.tentative.html @@ -6,7 +6,7 @@ - + -

Test passes if you see a square of side 500 × 0.71^(1 − 0) = 355px.

+

Test passes if you see a square of side 500px.

-
+
X
diff --git a/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-005.tentative.html b/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-005.tentative.html index fd6d2936a9b..18b2af9e4b6 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-005.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-005.tentative.html @@ -20,7 +20,7 @@

Test passes if you see a square of side 100 × 0.71^(0 − 0) = 100px.

-
+
X
diff --git a/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-style-001.tentative.html b/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-style-001.tentative.html index 56cb1eca09d..e63f28b1913 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-style-001.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-style-001.tentative.html @@ -16,15 +16,15 @@ setup({ explicit_done: true }); window.addEventListener("load", function() { test(function() { - assert_equals(mathStyle("initial"), "inline"); + assert_equals(mathStyle("initial"), "normal"); }, "Initial value of math-style"); test(function() { - assert_equals(mathStyle("specifiedInline"), "inline"); - assert_equals(mathStyle("specifiedDisplay"), "display"); + assert_equals(mathStyle("specifiedInline"), "compact"); + assert_equals(mathStyle("specifiedDisplay"), "normal"); }, "Specified values of math-style"); test(function() { - assert_equals(mathStyle("inheritedInline"), "inline"); - assert_equals(mathStyle("inheritedDisplay"), "display"); + assert_equals(mathStyle("inheritedInline"), "compact"); + assert_equals(mathStyle("inheritedDisplay"), "normal"); }, "Inherited values of math-style"); done(); }); @@ -33,10 +33,10 @@
-
+
-
+
diff --git a/tests/wpt/web-platform-tests/css/css-fonts/variations/at-font-face-font-matching.html b/tests/wpt/web-platform-tests/css/css-fonts/variations/at-font-face-font-matching.html index 28fa626849b..e56334f2da7 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/variations/at-font-face-font-matching.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/variations/at-font-face-font-matching.html @@ -73,7 +73,7 @@ testElement.style.fontStretch = testStretch; testElement.style.fontFamily = testFamily; - assert_true(masterWidth == testElement.offsetWidth, "Unexpected font on test element"); + assert_equals(masterWidth, testElement.offsetWidth, "Unexpected font on test element"); } var descriptorPriorityCases = [ diff --git a/tests/wpt/web-platform-tests/css/css-pseudo/before-after-dynamic-custom-property-001-ref.html b/tests/wpt/web-platform-tests/css/css-pseudo/before-after-dynamic-custom-property-001-ref.html new file mode 100644 index 00000000000..c15156138e6 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-pseudo/before-after-dynamic-custom-property-001-ref.html @@ -0,0 +1,7 @@ + + +CSS Test reference + +

Test passes if you see two PASS lines below:

+
PASS
+
PASS
diff --git a/tests/wpt/web-platform-tests/css/css-pseudo/before-after-dynamic-custom-property-001.html b/tests/wpt/web-platform-tests/css/css-pseudo/before-after-dynamic-custom-property-001.html new file mode 100644 index 00000000000..dcbd60786b3 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-pseudo/before-after-dynamic-custom-property-001.html @@ -0,0 +1,23 @@ + + +CSS Test: Dynamic ::before and ::after generation by a custom property reference + + + + + +

Test passes if you see two PASS lines below:

+
SS
+
PA
+ diff --git a/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-015.tentative.html b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-015.tentative.html new file mode 100644 index 00000000000..3fc555be731 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-015.tentative.html @@ -0,0 +1,13 @@ + +CSS aspect-ratio: Row flex container with the replaced-element item + + + + + + +

Test passes if there is a filled green square and no red.

+ +
+ +
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-016.tentative.html b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-016.tentative.html new file mode 100644 index 00000000000..55fec97db52 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-016.tentative.html @@ -0,0 +1,13 @@ + +CSS aspect-ratio: Column flex container with the replaced-element item + + + + + + +

Test passes if there is a filled green square and no red.

+ +
+ +
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-017.tentative.html b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-017.tentative.html new file mode 100644 index 00000000000..5b340ffabaa --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-017.tentative.html @@ -0,0 +1,13 @@ + +CSS aspect-ratio: Non-square aspect-ratio (on replaced elements) in Row flex container + + + + + +

Test passes if there is a filled green square and no red.

+ +
+ +
+
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-018.tentative.html b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-018.tentative.html new file mode 100644 index 00000000000..f7c667c555e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-018.tentative.html @@ -0,0 +1,13 @@ + +CSS aspect-ratio: Non-square aspect-ratio (on replaced elements) in Column flex container + + + + + +

Test passes if there is a filled green square and no red.

+ +
+ +
+
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-019.tentative.html b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-019.tentative.html new file mode 100644 index 00000000000..07635fd0a95 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-019.tentative.html @@ -0,0 +1,13 @@ + +CSS aspect-ratio: Row flexbox main size with flex-basis:content + + + + + +

Test passes if there is a filled green square and no red.

+ +
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-020.tentative.html b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-020.tentative.html new file mode 100644 index 00000000000..4ad3f3cb964 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-020.tentative.html @@ -0,0 +1,13 @@ + +CSS aspect-ratio: Flex item main size with flex-basis:content in Column flex container + + + + + +

Test passes if there is a filled green square and no red.

+ +
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-021.tentative.html b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-021.tentative.html new file mode 100644 index 00000000000..5241b862104 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-021.tentative.html @@ -0,0 +1,13 @@ + +CSS aspect-ratio: Flex item main size with flex-basis:content and width in Row flex container + + + + + +

Test passes if there is a filled green square and no red.

+ +
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-022.tentative.html b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-022.tentative.html new file mode 100644 index 00000000000..a70be1b569c --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-022.tentative.html @@ -0,0 +1,13 @@ + +CSS aspect-ratio: Column flexbox main size with flex-basis:content and height + + + + + +

Test passes if there is a filled green square and no red.

+ +
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-023.tentative.html b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-023.tentative.html new file mode 100644 index 00000000000..9ad01dc8d57 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-023.tentative.html @@ -0,0 +1,12 @@ + +CSS aspect-ratio: Row flex container cross size with the replaced-element item + + + + + +

Test passes if there is a filled green square and no red.

+ +
+ +
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-024.tentative.html b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-024.tentative.html new file mode 100644 index 00000000000..b0cefd57c48 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-024.tentative.html @@ -0,0 +1,12 @@ + +CSS aspect-ratio: Column flex container cross size with the replaced-element item + + + + + +

Test passes if there is a filled green square and no red.

+ +
+ +
diff --git a/tests/wpt/web-platform-tests/css/css-syntax/charset-is-not-a-rule.html b/tests/wpt/web-platform-tests/css/css-syntax/charset-is-not-a-rule.html index 81b2a04dc5a..ff8d3298b62 100644 --- a/tests/wpt/web-platform-tests/css/css-syntax/charset-is-not-a-rule.html +++ b/tests/wpt/web-platform-tests/css/css-syntax/charset-is-not-a-rule.html @@ -12,6 +12,6 @@ foo { color: blue; } diff --git a/tests/wpt/web-platform-tests/css/css-text/whitespace-followed-by-cham-symbol-crash.html b/tests/wpt/web-platform-tests/css/css-text/whitespace-followed-by-cham-symbol-crash.html new file mode 100644 index 00000000000..c56f915518f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/whitespace-followed-by-cham-symbol-crash.html @@ -0,0 +1,7 @@ +CSS Text Test: Under quirks mode, a white space, followed by a Cham symbol, makes chrome to crash + + +s a diff --git a/tests/wpt/web-platform-tests/css/cssom-view/elementFromPosition.html b/tests/wpt/web-platform-tests/css/cssom-view/elementFromPosition.html index ed86d16b7de..e7a7b4afee3 100644 --- a/tests/wpt/web-platform-tests/css/cssom-view/elementFromPosition.html +++ b/tests/wpt/web-platform-tests/css/cssom-view/elementFromPosition.html @@ -83,22 +83,22 @@ })(); test( function () { var elem = document.elementFromPoint( 0, 0 ); - assert_true( elem.nodeName == 'HTML' ); + assert_equals( elem.nodeName, 'HTML' ); }, 'Point (0, 0), return root element(HTML)' ); test( function () { var elem = document.elementFromPoint( -1000, 0 ); - assert_true( elem == null, 'negative x, return null' ); + assert_equals( elem, null, 'negative x, return null' ); }, ' test negative x '); test( function () { var elem = document.elementFromPoint( 0, -1000 ); - assert_true( elem == null, 'negative y, return null' ); + assert_equals( elem, null, 'negative y, return null' ); }, ' test negative y '); test( function () { var elem = document.elementFromPoint( 100000, 0 ); - assert_true( elem == null ); + assert_equals( elem, null ); }, 'test outside of viewport'); test( function () { diff --git a/tests/wpt/web-platform-tests/css/cssom/css-style-attr-decl-block.html b/tests/wpt/web-platform-tests/css/cssom/css-style-attr-decl-block.html index 7bc37e007a7..744b3a744cb 100644 --- a/tests/wpt/web-platform-tests/css/cssom/css-style-attr-decl-block.html +++ b/tests/wpt/web-platform-tests/css/cssom/css-style-attr-decl-block.html @@ -92,7 +92,7 @@ test(function() { observer.observe(elem, {attributes: true}); function assert_no_record(action) { let records = observer.takeRecords(); - assert_true(records.length == 0, "expect no record after " + action); + assert_equals(records.length, 0, "expect no record after " + action); } style.setProperty("z-index", "invalid"); assert_no_record("setting invalid value to property"); diff --git a/tests/wpt/web-platform-tests/css/cssom/cssimportrule.html b/tests/wpt/web-platform-tests/css/cssom/cssimportrule.html index 1d7b18f6285..89269f1c24c 100644 --- a/tests/wpt/web-platform-tests/css/cssom/cssimportrule.html +++ b/tests/wpt/web-platform-tests/css/cssom/cssimportrule.html @@ -95,8 +95,8 @@ test(function() { var ruleWithPage = ruleList[3]; - ruleWithPage.style = "background-color: green;" - assert_equals(ruleWithPage.style.cssText, "background-color: green;"); + ruleWithPage.style = "margin-top: 10px;" + assert_equals(ruleWithPage.style.cssText, "margin-top: 10px;"); }, "CSSStyleDeclaration cssText attribute should be updated due to [PutForwards]"); test(function() { diff --git a/tests/wpt/web-platform-tests/css/cssom/getComputedStyle-detached-subtree.html b/tests/wpt/web-platform-tests/css/cssom/getComputedStyle-detached-subtree.html index 4f59ccd13c7..b522baa42b3 100644 --- a/tests/wpt/web-platform-tests/css/cssom/getComputedStyle-detached-subtree.html +++ b/tests/wpt/web-platform-tests/css/cssom/getComputedStyle-detached-subtree.html @@ -17,7 +17,7 @@ function testNoComputedStyle(element, description, global) { assert_true(!!element); let style = (global ? global : window).getComputedStyle(element); assert_true(!!style); - assert_true(style.length === 0); + assert_equals(style.length, 0); assert_equals(style.color, ""); }, `getComputedStyle returns no style for ${description}`); } diff --git a/tests/wpt/web-platform-tests/css/cssom/rule-restrictions.html b/tests/wpt/web-platform-tests/css/cssom/rule-restrictions.html new file mode 100644 index 00000000000..ce2dee37a0a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/cssom/rule-restrictions.html @@ -0,0 +1,51 @@ + + +CSSOM Should correctly honor property restrictions + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/css/filter-effects/feflood-with-filter-reference.html b/tests/wpt/web-platform-tests/css/filter-effects/feflood-with-filter-reference.html new file mode 100644 index 00000000000..0a8fede7e61 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/filter-effects/feflood-with-filter-reference.html @@ -0,0 +1,12 @@ + +Filter primitive (feFlood) with filter reference + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/custom-elements/CustomElementRegistry.html b/tests/wpt/web-platform-tests/custom-elements/CustomElementRegistry.html index 15d983f1c49..5b75fc651fc 100644 --- a/tests/wpt/web-platform-tests/custom-elements/CustomElementRegistry.html +++ b/tests/wpt/web-platform-tests/custom-elements/CustomElementRegistry.html @@ -738,13 +738,13 @@ promise_test(function () { class ResolvedCustomElement extends HTMLElement {}; customElements.define('resolved-custom-element', ResolvedCustomElement); return customElements.whenDefined('resolved-custom-element').then(function (value) { - assert_true(value === ResolvedCustomElement, 'The promise returned by "whenDefined" must resolve with the defined class'); + assert_equals(value, ResolvedCustomElement, 'The promise returned by "whenDefined" must resolve with the defined class'); }); }, 'A promise returned by customElements.whenDefined must be resolved with the defined class'); promise_test(function () { var promise = customElements.whenDefined('not-resolved-yet-custom-element').then(function (value) { - assert_true(value === NotResolvedYetCustomElement, 'The promise returned by "whenDefined" must resolve with the defined class once such class is defined'); + assert_equals(value, NotResolvedYetCustomElement, 'The promise returned by "whenDefined" must resolve with the defined class once such class is defined'); }); class NotResolvedYetCustomElement extends HTMLElement {}; customElements.define('not-resolved-yet-custom-element', NotResolvedYetCustomElement); diff --git a/tests/wpt/web-platform-tests/custom-state-pseudo-class/idlharness.window.js b/tests/wpt/web-platform-tests/custom-state-pseudo-class/idlharness.window.js index 7ddbe315a60..dccc0f56f46 100644 --- a/tests/wpt/web-platform-tests/custom-state-pseudo-class/idlharness.window.js +++ b/tests/wpt/web-platform-tests/custom-state-pseudo-class/idlharness.window.js @@ -5,7 +5,7 @@ idl_test( ['custom-state-pseudo-class'], - ['html'], + ['html', 'wai-aria'], idl_array => { idl_array.add_objects({ // Nothing to add; spec only defined a partial interface. diff --git a/tests/wpt/web-platform-tests/dom/events/Event-dispatch-redispatch.html b/tests/wpt/web-platform-tests/dom/events/Event-dispatch-redispatch.html index 893f57f0770..7869aa00de8 100644 --- a/tests/wpt/web-platform-tests/dom/events/Event-dispatch-redispatch.html +++ b/tests/wpt/web-platform-tests/dom/events/Event-dispatch-redispatch.html @@ -47,7 +47,7 @@ window.addEventListener("load", loadEvent => { assert_true(contentLoadedEvent.isTrusted, "Received DOMContentLoaded event should be trusted before redispatching"); buttonElement.dispatchEvent(contentLoadedEvent); assert_false(contentLoadedEvent.isTrusted, "Received DOMContentLoaded event shouldn't be trusted after redispatching"); - assert_true(untrustedContentLoadedEvent !== undefined, "Untrusted DOMContentLoaded event should've been fired"); + assert_not_equals(untrustedContentLoadedEvent, undefined, "Untrusted DOMContentLoaded event should've been fired"); test_contentLoaded_redispatching.done(); }); }, {capture: true, once: true}); @@ -114,7 +114,7 @@ async function testMouseUpAndClickEvent() { .send() .then(() => { test_mouseup_redispatching.step(() => { - assert_true(clickEvent !== undefined, "mouseup and click events should've been fired"); + assert_not_equals(clickEvent, undefined, "mouseup and click events should've been fired"); }); test_mouseup_redispatching.done(); test_redispatching_of_dispatching_event.done(); diff --git a/tests/wpt/web-platform-tests/dom/ranges/Range-insertNode.html b/tests/wpt/web-platform-tests/dom/ranges/Range-insertNode.html index 04727dbc4d2..b0a9d43f982 100644 --- a/tests/wpt/web-platform-tests/dom/ranges/Range-insertNode.html +++ b/tests/wpt/web-platform-tests/dom/ranges/Range-insertNode.html @@ -75,19 +75,19 @@ function testInsertNode(i, j) { "Unexpected exception thrown when setting up Range for simulated insertNode()"); assert_equals(typeof actualRange, "object", "typeof Range produced in actual iframe"); - assert_false(actualRange === null, + assert_not_equals(actualRange, null, "Range produced in actual iframe was null"); assert_equals(typeof expectedRange, "object", "typeof Range produced in expected iframe"); - assert_false(expectedRange === null, + assert_not_equals(expectedRange, null, "Range produced in expected iframe was null"); assert_equals(typeof actualNode, "object", "typeof Node produced in actual iframe"); - assert_false(actualNode === null, + assert_not_equals(actualNode, null, "Node produced in actual iframe was null"); assert_equals(typeof expectedNode, "object", "typeof Node produced in expected iframe"); - assert_false(expectedNode === null, + assert_not_equals(expectedNode, null, "Node produced in expected iframe was null"); // We want to test that the trees containing the ranges are equal, and @@ -179,19 +179,19 @@ function testInsertNode(i, j) { "Unexpected exception thrown when setting up Range for simulated insertNode()"); assert_equals(typeof actualRange, "object", "typeof Range produced in actual iframe"); - assert_false(actualRange === null, + assert_not_equals(actualRange, null, "Range produced in actual iframe was null"); assert_equals(typeof expectedRange, "object", "typeof Range produced in expected iframe"); - assert_false(expectedRange === null, + assert_not_equals(expectedRange, null, "Range produced in expected iframe was null"); assert_equals(typeof actualNode, "object", "typeof Node produced in actual iframe"); - assert_false(actualNode === null, + assert_not_equals(actualNode, null, "Node produced in actual iframe was null"); assert_equals(typeof expectedNode, "object", "typeof Node produced in expected iframe"); - assert_false(expectedNode === null, + assert_not_equals(expectedNode, null, "Node produced in expected iframe was null"); for (var k = 0; k < actualRoots.length; k++) { diff --git a/tests/wpt/web-platform-tests/dom/ranges/Range-mutations.js b/tests/wpt/web-platform-tests/dom/ranges/Range-mutations.js index 3837de92828..23c013ac6a1 100644 --- a/tests/wpt/web-platform-tests/dom/ranges/Range-mutations.js +++ b/tests/wpt/web-platform-tests/dom/ranges/Range-mutations.js @@ -63,7 +63,7 @@ function doTests(sourceTests, descFn, testFn) { function(params) { return function() { var evaledParams = params.map(eval); for (var i = 0; i < evaledParams.length; i++) { - assert_true(typeof evaledParams[i] != "undefined", + assert_not_equals(typeof evaledParams[i], "undefined", "Test bug: " + params[i] + " is undefined"); } return testFn.apply(null, evaledParams); @@ -79,7 +79,7 @@ function doTests(sourceTests, descFn, testFn) { function(params) { return function(selectedRange) { var evaledParams = params.slice(0, len - 4).map(eval); for (var i = 0; i < evaledParams.length; i++) { - assert_true(typeof evaledParams[i] != "undefined", + assert_not_equals(typeof evaledParams[i], "undefined", "Test bug: " + params[i] + " is undefined"); } // Override input range with the one that was actually selected when computing the expected result. diff --git a/tests/wpt/web-platform-tests/dom/ranges/Range-surroundContents.html b/tests/wpt/web-platform-tests/dom/ranges/Range-surroundContents.html index c1ed30d0053..c9d47fcbad0 100644 --- a/tests/wpt/web-platform-tests/dom/ranges/Range-surroundContents.html +++ b/tests/wpt/web-platform-tests/dom/ranges/Range-surroundContents.html @@ -125,19 +125,19 @@ function testSurroundContents(i, j) { "Unexpected exception thrown when setting up Range for simulated surroundContents()"); assert_equals(typeof actualRange, "object", "typeof Range produced in actual iframe"); - assert_false(actualRange === null, + assert_not_equals(actualRange, null, "Range produced in actual iframe was null"); assert_equals(typeof expectedRange, "object", "typeof Range produced in expected iframe"); - assert_false(expectedRange === null, + assert_not_equals(expectedRange, null, "Range produced in expected iframe was null"); assert_equals(typeof actualNode, "object", "typeof Node produced in actual iframe"); - assert_false(actualNode === null, + assert_not_equals(actualNode, null, "Node produced in actual iframe was null"); assert_equals(typeof expectedNode, "object", "typeof Node produced in expected iframe"); - assert_false(expectedNode === null, + assert_not_equals(expectedNode, null, "Node produced in expected iframe was null"); // We want to test that the trees containing the ranges are equal, and @@ -222,19 +222,19 @@ function testSurroundContents(i, j) { "Unexpected exception thrown when setting up Range for simulated surroundContents()"); assert_equals(typeof actualRange, "object", "typeof Range produced in actual iframe"); - assert_false(actualRange === null, + assert_not_equals(actualRange, null, "Range produced in actual iframe was null"); assert_equals(typeof expectedRange, "object", "typeof Range produced in expected iframe"); - assert_false(expectedRange === null, + assert_not_equals(expectedRange, null, "Range produced in expected iframe was null"); assert_equals(typeof actualNode, "object", "typeof Node produced in actual iframe"); - assert_false(actualNode === null, + assert_not_equals(actualNode, null, "Node produced in actual iframe was null"); assert_equals(typeof expectedNode, "object", "typeof Node produced in expected iframe"); - assert_false(expectedNode === null, + assert_not_equals(expectedNode, null, "Node produced in expected iframe was null"); for (var k = 0; k < actualRoots.length; k++) { diff --git a/tests/wpt/web-platform-tests/encrypted-media/scripts/setmediakeys-to-multiple-video-elements.js b/tests/wpt/web-platform-tests/encrypted-media/scripts/setmediakeys-to-multiple-video-elements.js index d98f33f0c1a..4c7faef69d0 100644 --- a/tests/wpt/web-platform-tests/encrypted-media/scripts/setmediakeys-to-multiple-video-elements.js +++ b/tests/wpt/web-platform-tests/encrypted-media/scripts/setmediakeys-to-multiple-video-elements.js @@ -27,12 +27,12 @@ function runTest(config, qualifier) { return _video1.setMediaKeys(_mediaKeys); }).then(function(result) { assert_not_equals(_video1.mediaKeys, null); - assert_true(_video1.mediaKeys === _mediaKeys); + assert_equals(_video1.mediaKeys, _mediaKeys); // The specification allows this to fail, but it is not required to fail. return _video2.setMediaKeys(_mediaKeys); }).then(function(result) { // Second setMediaKeys is not required to fail. - assert_true(_video2.mediaKeys === _mediaKeys); + assert_equals(_video2.mediaKeys, _mediaKeys); return Promise.resolve(); }, function(error) { assert_equals(error.name, 'QuotaExceededError'); @@ -47,7 +47,7 @@ function runTest(config, qualifier) { return _video2.setMediaKeys(_mediaKeys); }).then(function(result) { assert_not_equals(_video2.mediaKeys, null); - assert_true(_video2.mediaKeys === _mediaKeys); + assert_equals(_video2.mediaKeys, _mediaKeys); test.done(); }).catch(onFailure); }, testname); diff --git a/tests/wpt/web-platform-tests/fetch/api/response/response-clone.html b/tests/wpt/web-platform-tests/fetch/api/response/response-clone.html index 62251416847..5529d49932c 100644 --- a/tests/wpt/web-platform-tests/fetch/api/response/response-clone.html +++ b/tests/wpt/web-platform-tests/fetch/api/response/response-clone.html @@ -109,13 +109,13 @@ function testReadableStreamClone(initialBuffer, bufferType) var buffer; return stream1.getReader().read().then(function(data) { assert_false(data.done); - assert_true(data.value === initialBuffer, "Buffer of being-cloned response stream is the same as the original buffer"); + assert_equals(data.value, initialBuffer, "Buffer of being-cloned response stream is the same as the original buffer"); return stream2.getReader().read(); }).then(function(data) { assert_false(data.done); assert_array_equals(data.value, initialBuffer, "Cloned buffer chunks have the same content"); assert_equals(Object.getPrototypeOf(data.value), Object.getPrototypeOf(initialBuffer), "Cloned buffers have the same type"); - assert_true(data.value !== initialBuffer, "Buffer of cloned response stream is a clone of the original buffer"); + assert_not_equals(data.value, initialBuffer, "Buffer of cloned response stream is a clone of the original buffer"); }); }, "Check response clone use structureClone for teed ReadableStreams (" + bufferType + "chunk)"); } diff --git a/tests/wpt/web-platform-tests/fetch/api/response/response-stream-disturbed-1.html b/tests/wpt/web-platform-tests/fetch/api/response/response-stream-disturbed-1.html index e9db8f77b9b..c856a6d4e09 100644 --- a/tests/wpt/web-platform-tests/fetch/api/response/response-stream-disturbed-1.html +++ b/tests/wpt/web-platform-tests/fetch/api/response/response-stream-disturbed-1.html @@ -39,7 +39,7 @@ promise_test(function() { promise_test(function() { return createResponseWithReadableStream(function(response) { return response.json().then(function(json) { - assert_true(typeof json === "object"); + assert_equals(typeof json, "object"); }); }); }, "Getting json after getting the Response body - not disturbed, not locked"); diff --git a/tests/wpt/web-platform-tests/font-access/resources/window-tests-enumeration.js b/tests/wpt/web-platform-tests/font-access/resources/window-tests-enumeration.js index 477d973a3a9..441199c8ecf 100644 --- a/tests/wpt/web-platform-tests/font-access/resources/window-tests-enumeration.js +++ b/tests/wpt/web-platform-tests/font-access/resources/window-tests-enumeration.js @@ -3,11 +3,11 @@ promise_test(async t => { const iterator = navigator.fonts.query(); - await promise_rejects_dom(t, 'NotAllowedError', (async () => { + await promise_rejects_dom(t, 'SecurityError', (async () => { for await (const f of iterator) { } })()); -}, 'iteration fails if there is no user activation'); +}, 'iteration fails if there is no sticky user activation'); font_access_test(async t => { const iterator = navigator.fonts.query(); diff --git a/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-cross-origin-manual.sub.html b/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-cross-origin-manual.sub.html new file mode 100644 index 00000000000..c01bd9a2cec --- /dev/null +++ b/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-cross-origin-manual.sub.html @@ -0,0 +1,116 @@ + +Element#requestFullscreen() works properly with a tree of cross-origin iframes + + + + + + diff --git a/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-elements-manual.html b/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-elements-manual.html index 3291664c63a..11baad7da78 100644 --- a/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-elements-manual.html +++ b/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-elements-manual.html @@ -23,7 +23,7 @@ async_test(t => { // have not seen the transition from null -> 'b' but just see the // resulting 'a' transition twice. assert_true(order[0] == 'a' || order[0] == 'b', 'first id seen is a or b'); - assert_true(order[1] == 'a', 'second id seen is b'); + assert_equals(order[1], 'a', 'second id seen is b'); t.done(); } }); diff --git a/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-elements-manual.tentative.html b/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-elements-manual.tentative.html index f46fb80490e..5ebc628b3b3 100644 --- a/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-elements-manual.tentative.html +++ b/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-elements-manual.tentative.html @@ -29,7 +29,7 @@ promise_test(async (test) => { // have not seen the transition from null -> 'b' but just see the // resulting 'a' transition twice. assert_true(order[0] == 'a' || order[0] == 'b', 'first id seen is a or b'); - assert_true(order[1] == 'a', 'second id seen is b'); + assert_equals(order[1], 'a', 'second id seen is b'); } resolve(); }); diff --git a/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-iframes-manual.html b/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-iframes-manual.html index c581a1575b7..916ae796950 100644 --- a/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-iframes-manual.html +++ b/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-iframes-manual.html @@ -28,7 +28,7 @@ async_test(t => { // TODO(mustaq): We need a better explanation here to cover the tree-order // idea of the spec. assert_true(order[0] == 'a' || order[0] == 'b', 'first id seen is a or b'); - assert_true(order[1] == 'a', 'second id seen is a'); + assert_equals(order[1], 'a', 'second id seen is a'); t.done(); } }); diff --git a/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-iframes-manual.tentative.html b/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-iframes-manual.tentative.html index 5dce676910f..691c221904e 100644 --- a/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-iframes-manual.tentative.html +++ b/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-iframes-manual.tentative.html @@ -35,7 +35,7 @@ promise_test(async (test) => { // TODO(mustaq): We need a better explanation here to cover the tree-order // idea of the spec. assert_true(order[0] == 'a' || order[0] == 'b', 'first id seen is a or b'); - assert_true(order[1] == 'a', 'second id seen is a'); + assert_equals(order[1], 'a', 'second id seen is a'); } resolve(); }); diff --git a/tests/wpt/web-platform-tests/fullscreen/api/resources/recursive-iframe-fullscreen.html b/tests/wpt/web-platform-tests/fullscreen/api/resources/recursive-iframe-fullscreen.html new file mode 100644 index 00000000000..f28afddac72 --- /dev/null +++ b/tests/wpt/web-platform-tests/fullscreen/api/resources/recursive-iframe-fullscreen.html @@ -0,0 +1,78 @@ + + +Recursive IFrame Fullscreen API success reporter + + diff --git a/tests/wpt/web-platform-tests/generic-sensor/generic-sensor-iframe-tests.sub.js b/tests/wpt/web-platform-tests/generic-sensor/generic-sensor-iframe-tests.sub.js index 3ebabad3a10..11c9f50f4ab 100644 --- a/tests/wpt/web-platform-tests/generic-sensor/generic-sensor-iframe-tests.sub.js +++ b/tests/wpt/web-platform-tests/generic-sensor/generic-sensor-iframe-tests.sub.js @@ -1,4 +1,4 @@ -async function send_message_to_iframe(iframe, message, reply) { +function send_message_to_iframe(iframe, message, reply) { if (reply === undefined) { reply = 'success'; } @@ -32,6 +32,10 @@ function run_generic_sensor_iframe_tests(sensorName) { // Create sensor inside cross-origin nested browsing context. const iframeLoadWatcher = new EventWatcher(t, iframe, 'load'); document.body.appendChild(iframe); + t.add_cleanup(async () => { + await send_message_to_iframe(iframe, { command: 'reset_sensor_backend' }); + iframe.parentNode.removeChild(iframe); + }); await iframeLoadWatcher.wait_for('load'); await send_message_to_iframe(iframe, {command: 'create_sensor', type: sensorName}); @@ -49,7 +53,6 @@ function run_generic_sensor_iframe_tests(sensorName) { // the top level browsing context are suspended. iframe.contentWindow.focus(); await send_message_to_iframe(iframe, {command: 'start_sensor'}); - assert_equals(cachedTimeStamp, sensor.timestamp); // Focus on the main frame, verify that sensor reading updates are resumed. window.focus(); @@ -59,10 +62,6 @@ function run_generic_sensor_iframe_tests(sensorName) { // Verify that sensor in cross-origin frame is suspended. await send_message_to_iframe(iframe, {command: 'is_sensor_suspended'}, true); - await send_message_to_iframe(iframe, {command: 'reset_sensor_backend'}); - - // Remove iframe from main document. - iframe.parentNode.removeChild(iframe); }, `${sensorName}: sensor is suspended and resumed when focus traverses from\ to cross-origin frame`); @@ -75,6 +74,10 @@ function run_generic_sensor_iframe_tests(sensorName) { // Create sensor inside same-origin nested browsing context. const iframeLoadWatcher = new EventWatcher(t, iframe, 'load'); document.body.appendChild(iframe); + t.add_cleanup(async () => { + await send_message_to_iframe(iframe, { command: 'reset_sensor_backend' }); + iframe.parentNode.removeChild(iframe); + }); await iframeLoadWatcher.wait_for('load'); await send_message_to_iframe(iframe, {command: 'create_sensor', type: sensorName}); @@ -123,10 +126,6 @@ function run_generic_sensor_iframe_tests(sensorName) { await sensorWatcher.wait_for('reading'); assert_greater_than(sensor.timestamp, cachedTimeStamp); sensor.stop(); - await send_message_to_iframe(iframe, {command: 'reset_sensor_backend'}); - - // Remove iframe from main document. - iframe.parentNode.removeChild(iframe); }, `${sensorName}: sensor is not suspended when focus traverses from\ to same-origin frame`); diff --git a/tests/wpt/web-platform-tests/generic-sensor/resources/generic-sensor-helpers.js b/tests/wpt/web-platform-tests/generic-sensor/resources/generic-sensor-helpers.js index 40f2c906f65..59855742ce4 100644 --- a/tests/wpt/web-platform-tests/generic-sensor/resources/generic-sensor-helpers.js +++ b/tests/wpt/web-platform-tests/generic-sensor/resources/generic-sensor-helpers.js @@ -36,7 +36,6 @@ async function initialize_generic_sensor_tests() { await loadChromiumResources(); } } - assert_implements(GenericSensorTest, 'GenericSensorTest is unavailable.'); let sensorTest = new GenericSensorTest(); await sensorTest.initialize(); diff --git a/tests/wpt/web-platform-tests/generic-sensor/resources/iframe_sensor_handler.html b/tests/wpt/web-platform-tests/generic-sensor/resources/iframe_sensor_handler.html index 16fcdc49b17..23e8e1bb94d 100644 --- a/tests/wpt/web-platform-tests/generic-sensor/resources/iframe_sensor_handler.html +++ b/tests/wpt/web-platform-tests/generic-sensor/resources/iframe_sensor_handler.html @@ -1,62 +1,60 @@ iframe sensor tester - diff --git a/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/001.html b/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/001.html index 6d48d108bbe..4cade019118 100644 --- a/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/001.html +++ b/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/001.html @@ -220,7 +220,7 @@ function reportload() { assert_equals( iframe.contentWindow.history.state && iframe.contentWindow.history.state.strdata, 'string data' ); }, 'history.state should also reference a clone of the original object'); test(function () { - assert_false( cloneobj === iframe.contentWindow.history.state ); + assert_not_equals( cloneobj, iframe.contentWindow.history.state ); }, 'history.state should be a clone of the original object, not a reference to it'); /* behaviour is not defined per spec, and no known implementations do this @@ -265,16 +265,16 @@ function reportload() { assert_equals( ev.state.looped, ev.state ); }, 'state data should cope with circular object references'); test(function () { - assert_false( cloneobj === ev.state ); + assert_not_equals( cloneobj, ev.state ); }, 'state data should be a clone of the original object, not a reference to it'); test(function () { assert_equals( iframe.contentWindow.history.state && iframe.contentWindow.history.state.strdata, 'string data' ); }, 'history.state should also reference a clone of the original object (2)'); test(function () { - assert_false( cloneobj === iframe.contentWindow.history.state ); + assert_not_equals( cloneobj, iframe.contentWindow.history.state ); }, 'history.state should be a clone of the original object, not a reference to it (2)'); test(function () { - assert_true( iframe.contentWindow.history.state === ev.state ); + assert_equals( iframe.contentWindow.history.state, ev.state ); }, 'history.state should be identical to the object passed to the event handler unless history.state is updated'); try { iframe.contentWindow.persistval = true; diff --git a/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/002.html b/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/002.html index c054246770f..8331a7c6dfc 100644 --- a/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/002.html +++ b/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/002.html @@ -201,7 +201,7 @@ function reportload() { assert_equals( iframe.contentWindow.history.state && iframe.contentWindow.history.state.strdata, 'string data' ); }, 'history.state should also reference a clone of the original object'); test(function () { - assert_false( cloneobj === iframe.contentWindow.history.state ); + assert_not_equals( cloneobj, iframe.contentWindow.history.state ); }, 'history.state should be a clone of the original object, not a reference to it'); history.go(-1); setTimeout(tests8,50); //.go is queued to end of thread @@ -240,16 +240,16 @@ function reportload() { assert_equals( ev.state.looped, ev.state ); }, 'state data should cope with circular object references'); test(function () { - assert_false( cloneobj === ev.state ); + assert_not_equals( cloneobj, ev.state ); }, 'state data should be a clone of the original object, not a reference to it'); test(function () { assert_equals( iframe.contentWindow.history.state && iframe.contentWindow.history.state.strdata, 'string data' ); }, 'history.state should also reference a clone of the original object (2)'); test(function () { - assert_false( cloneobj === iframe.contentWindow.history.state ); + assert_not_equals( cloneobj, iframe.contentWindow.history.state ); }, 'history.state should be a clone of the original object, not a reference to it (2)'); test(function () { - assert_true( iframe.contentWindow.history.state === ev.state ); + assert_equals( iframe.contentWindow.history.state, ev.state ); }, 'history.state should be identical to the object passed to the event handler unless history.state is updated'); try { iframe.contentWindow.persistval = true; diff --git a/tests/wpt/web-platform-tests/html/browsers/history/the-location-interface/reload_document_write.html b/tests/wpt/web-platform-tests/html/browsers/history/the-location-interface/reload_document_write.html index dfbd436a47e..fb5fddc7da8 100644 --- a/tests/wpt/web-platform-tests/html/browsers/history/the-location-interface/reload_document_write.html +++ b/tests/wpt/web-platform-tests/html/browsers/history/the-location-interface/reload_document_write.html @@ -11,7 +11,7 @@ window.onmessage = t.step_func(function(e) { var initial_value = e.data; win.location.reload(); window.onmessage = t.step_func(function(e) { - assert_true(e.data !== initial_value); + assert_not_equals(e.data, initial_value); t.done(); }); }); diff --git a/tests/wpt/web-platform-tests/html/browsers/windows/nested-browsing-contexts/window-parent.html b/tests/wpt/web-platform-tests/html/browsers/windows/nested-browsing-contexts/window-parent.html index a25c9f20941..ef662dca5e6 100644 --- a/tests/wpt/web-platform-tests/html/browsers/windows/nested-browsing-contexts/window-parent.html +++ b/tests/wpt/web-platform-tests/html/browsers/windows/nested-browsing-contexts/window-parent.html @@ -27,7 +27,7 @@ async_test(t => { var frame2Window = iframe2.contentWindow; assert_equals(frameWindow.parent, window); assert_equals(frame2Window.parent, frameWindow); - assert_false(frame2Window.parent === window); + assert_not_equals(frame2Window.parent, window); }); var nestFrame = function () { diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.fontBoundingBox.ahem.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.fontBoundingBox.ahem.html new file mode 100644 index 00000000000..7af141ac8ef --- /dev/null +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.fontBoundingBox.ahem.html @@ -0,0 +1,48 @@ + + +Canvas test: 2d.text.measure.fontBoundingBox.ahem + + + + + + + +

2d.text.measure.fontBoundingBox.ahem

+

Testing fontBoundingBox for font ahem

+ + +A +

Actual output:

+

FAIL (fallback content)

+ +
    + + diff --git a/tests/wpt/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-drawImage-e_srgb.html b/tests/wpt/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-drawImage-e_srgb.html index 0cfa729a60b..b6ff5f4657a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-drawImage-e_srgb.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-drawImage-e_srgb.html @@ -18,7 +18,7 @@ function testPixels(ctx, tests) for (var i = 0; i < tests.length; i++) { actual = ctx.getImageData(tests[i].x, tests[i].y, 1, 1).data; expected = tests[i].color; - assert_true(actual.length === expected.length); + assert_equals(actual.length, expected.length); for (var j = 0; j < actual.length; j++) assert_approx_equals(actual[j], expected[j], tolerance); } diff --git a/tests/wpt/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-getImageData-e_srgb.html b/tests/wpt/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-getImageData-e_srgb.html index 73682eb631d..cfc6428d0d0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-getImageData-e_srgb.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-getImageData-e_srgb.html @@ -14,7 +14,7 @@ on e-sRGB canvas and getting e-sRGB image data.'); function assert_array_approx_equals(actual, expected, epsilon) { - assert_true(actual.length === expected.length); + assert_equals(actual.length, expected.length); for (var i=0; i < actual.length; i++) assert_approx_equals(actual[i], expected[i], epsilon); } diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/yaml/element/drawing-text-to-the-canvas.yaml b/tests/wpt/web-platform-tests/html/canvas/tools/yaml/element/drawing-text-to-the-canvas.yaml index 58fa119d32f..31e85a7ea98 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/yaml/element/drawing-text-to-the-canvas.yaml +++ b/tests/wpt/web-platform-tests/html/canvas/tools/yaml/element/drawing-text-to-the-canvas.yaml @@ -665,6 +665,29 @@ }), 500); }); +- name: 2d.text.measure.fontBoundingBox.ahem + desc: Testing fontBoundingBox for font ahem + testing: + - 2d.text.measure.fontBoundingBox + fonts: + - Ahem + code: | + deferTest(); + var f = new FontFace("Ahem", "/fonts/Ahem.ttf"); + document.fonts.add(f); + document.fonts.ready.then(() => { + step_timeout(t.step_func_done(function () { + ctx.font = '50px Ahem'; + ctx.direction = 'ltr'; + ctx.align = 'left' + @assert ctx.measureText('A').fontBoundingBoxAscent === 40; + @assert ctx.measureText('A').fontBoundingBoxDescent === 10; + + @assert ctx.measureText('ABCD').fontBoundingBoxAscent === 40; + @assert ctx.measureText('ABCD').fontBoundingBoxDescent === 10; + }), 500); + }); + - name: 2d.text.measure.emHeights desc: Testing emHeights testing: diff --git a/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/report-to-both_coop-ro.https.html b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/report-to-both_coop-ro.https.html new file mode 100644 index 00000000000..1979d13c109 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/report-to-both_coop-ro.https.html @@ -0,0 +1,124 @@ + + Both the openee and the opener have a COOP reporter. The report are sent to + both side. + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/html/dom/idlharness.https.html b/tests/wpt/web-platform-tests/html/dom/idlharness.https.html index d79e09b46af..a906b19ac88 100644 --- a/tests/wpt/web-platform-tests/html/dom/idlharness.https.html +++ b/tests/wpt/web-platform-tests/html/dom/idlharness.https.html @@ -38,7 +38,7 @@ const waitForLoad = new Promise(resolve => { addEventListener('load', resolve); idl_test( ['html'], - ['SVG', 'cssom', 'touch-events', 'uievents', 'dom', 'xhr', 'FileAPI', 'mediacapture-streams'], + ['wai-aria', 'SVG', 'cssom', 'touch-events', 'uievents', 'dom', 'xhr', 'FileAPI', 'mediacapture-streams'], async idlArray => { self.documentWithHandlers = new Document(); const handler = function(e) {}; diff --git a/tests/wpt/web-platform-tests/html/dom/idlharness.worker.js b/tests/wpt/web-platform-tests/html/dom/idlharness.worker.js index 872657d383c..b6cdc5afdd6 100644 --- a/tests/wpt/web-platform-tests/html/dom/idlharness.worker.js +++ b/tests/wpt/web-platform-tests/html/dom/idlharness.worker.js @@ -5,7 +5,7 @@ importScripts("/resources/WebIDLParser.js", "/resources/idlharness.js"); idl_test( ["html"], - ["dom", "cssom", "touch-events", "uievents"], + ["wai-aria", "dom", "cssom", "touch-events", "uievents"], idlArray => { idlArray.add_untested_idls('typedef Window WindowProxy;'); idlArray.add_objects({ diff --git a/tests/wpt/web-platform-tests/html/editing/dnd/the-datatransfer-interface/protectedDragDataTransfer-manual.html b/tests/wpt/web-platform-tests/html/editing/dnd/the-datatransfer-interface/protectedDragDataTransfer-manual.html index ac7b844d2e1..6d84f54efc1 100644 --- a/tests/wpt/web-platform-tests/html/editing/dnd/the-datatransfer-interface/protectedDragDataTransfer-manual.html +++ b/tests/wpt/web-platform-tests/html/editing/dnd/the-datatransfer-interface/protectedDragDataTransfer-manual.html @@ -97,7 +97,7 @@ "over_dt mustbe protected during dragover"); }, "dragover event status"); test(function() { - assert_true(drag_dt != over_dt, + assert_not_equals(drag_dt, over_dt, "drag_dt must be a different DataTransfer object than over_dt"); }, "dragover event identity"); } diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-content-rtl-ref.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-content-rtl-ref.html new file mode 100644 index 00000000000..b7c080bfac0 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-content-rtl-ref.html @@ -0,0 +1,24 @@ + + + + + + + +
    + +
    +
    + + diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-content-rtl.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-content-rtl.html new file mode 100644 index 00000000000..0f12c6f92a1 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-content-rtl.html @@ -0,0 +1,26 @@ + + + + +crbug.com/1130174; Non-auto-width block should be right-aligned in an RTL fieldset + + + + +
    + +
    +
    + + diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/Image-constructor.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/Image-constructor.html index 38b6765bb49..4c1cf2dcd13 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/Image-constructor.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/Image-constructor.html @@ -15,7 +15,7 @@ }, "Image constructor works"); test(function() { - assert_true(Image.prototype === HTMLImageElement.prototype); + assert_equals(Image.prototype, HTMLImageElement.prototype); }, "Image and HTMLImageElement share a prototype"); test(function() { diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-form-element/form-elements-sameobject.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-form-element/form-elements-sameobject.html index d1ebac07f0a..1c1aa5d3ddc 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/the-form-element/form-elements-sameobject.html +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-form-element/form-elements-sameobject.html @@ -13,8 +13,8 @@ test(function() { var form = document.querySelector('form'); var elements = form.elements; - assert_true(elements === form.elements); + assert_equals(elements, form.elements); form.appendChild(document.createElement('input')); - assert_true(elements === form.elements); + assert_equals(elements, form.elements); }, "[SameObject] should apply to 'elements' attr on
    "); diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-label-element/labelable-elements.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-label-element/labelable-elements.html index 725871f9113..7943aa2be3c 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/the-label-element/labelable-elements.html +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-label-element/labelable-elements.html @@ -107,7 +107,7 @@ test(function() { assert_equals(hiddenInput.labels, null, ".labels NodeList should be null after input type changed to hidden"); hiddenInput.type = "checkbox"; - assert_true(labels === hiddenInput.labels, ".labels property must return the [SameObject] after input type is toggled back from 'hidden'"); + assert_equals(labels, hiddenInput.labels, ".labels property must return the [SameObject] after input type is toggled back from 'hidden'"); assert_equals(hiddenInput.labels.length, 1, ".labels NodeList should contain the input after the input type is changed from 'hidden' to 'checkbox'"); }, "Check if the hidden input element has null 'labels'"); diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-option-element/option-text-setter.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-option-element/option-text-setter.html index 83a45b43573..1aa44ed7f46 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/the-option-element/option-text-setter.html +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-option-element/option-text-setter.html @@ -15,10 +15,10 @@ test(() => { option.text = "baz"; assert_equals(textChild.nodeValue, "bar", 'Verify that the text child node does not have an updated value.'); assert_false(textChild.isConnected, 'Verify that the text child node is not in the document.'); - assert_false(textChild == option.firstChild, 'Verify that text child node was replaced by a different text child node.'); + assert_not_equals(textChild, option.firstChild, 'Verify that text child node was replaced by a different text child node.'); assert_equals(option.firstChild.nodeValue, "baz", 'Verify that the new text child node does equal the updated value.'); assert_equals(option.text, "baz", 'Verify that option text getter returns the updated value.'); option.text = ""; - assert_true(option.firstChild == null, 'Verify that after setting to empty string there are no child text nodes.'); + assert_equals(option.firstChild, null, 'Verify that after setting to empty string there are no child text nodes.'); }, 'Verify that using HTMLOptionElement.text setter does not update the existing text child node.'); diff --git a/tests/wpt/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-form-submission.html b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-form-submission.html index bc3706c4521..5c561e162d0 100644 --- a/tests/wpt/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-form-submission.html +++ b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-form-submission.html @@ -51,7 +51,7 @@ promise_test(async () => { button.removeAttribute("value"); button.click(); assert_false(dialog.open, "dialog should be closed now"); - assert_false(dialog.returnValue === undefined, "returnValue should not be set"); + assert_not_equals(dialog.returnValue, undefined, "returnValue should not be set"); }, "no returnValue when there's no result."); promise_test(async () => { diff --git a/tests/wpt/web-platform-tests/html/semantics/interactive-elements/the-summary-element/anchor-with-inline-element.html b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/the-summary-element/anchor-with-inline-element.html index ab200020b4f..6910a5de93c 100644 --- a/tests/wpt/web-platform-tests/html/semantics/interactive-elements/the-summary-element/anchor-with-inline-element.html +++ b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/the-summary-element/anchor-with-inline-element.html @@ -42,7 +42,7 @@ function testClickingOnInlineElement(detailsId, targetId, expected, testName) { const promise = new Promise((resolve, reject) => { window.onhashchange = test.step_func_done(() => { assert_false(details.open); - assert_true(location.hash === expected); + assert_equals(location.hash, expected); resolve(); }); }); diff --git a/tests/wpt/web-platform-tests/html/semantics/selectors/pseudo-classes/dir.html b/tests/wpt/web-platform-tests/html/semantics/selectors/pseudo-classes/dir.html index 8edd9b8ab2b..fb2a10e0ca3 100644 --- a/tests/wpt/web-platform-tests/html/semantics/selectors/pseudo-classes/dir.html +++ b/tests/wpt/web-platform-tests/html/semantics/selectors/pseudo-classes/dir.html @@ -27,18 +27,59 @@ ‮WERBEHWERBEH HEBREW + + + + + HEBREW إيان עברית diff --git a/tests/wpt/web-platform-tests/html/syntax/parsing/html_content_in_foreign_context.html b/tests/wpt/web-platform-tests/html/syntax/parsing/html_content_in_foreign_context.html index 611b71d0e6a..a13c2fb176d 100644 --- a/tests/wpt/web-platform-tests/html/syntax/parsing/html_content_in_foreign_context.html +++ b/tests/wpt/web-platform-tests/html/syntax/parsing/html_content_in_foreign_context.html @@ -15,13 +15,13 @@ test(function() { const wrapper = document.createElement('div'); const html = `<${c}><${e}> { assert_false(navigator.userActivation.isActive); @@ -36,7 +36,7 @@ } function finishReportPhase() { - assert_true(num_children_to_report == 0); + assert_equals(num_children_to_report, 0); test(() => { assert_false(navigator.userActivation.isActive); diff --git a/tests/wpt/web-platform-tests/html/user-activation/consumption-sameorigin.tentative.html b/tests/wpt/web-platform-tests/html/user-activation/consumption-sameorigin.tentative.html index 50f2feaa638..4ca361c87e0 100644 --- a/tests/wpt/web-platform-tests/html/user-activation/consumption-sameorigin.tentative.html +++ b/tests/wpt/web-platform-tests/html/user-activation/consumption-sameorigin.tentative.html @@ -23,7 +23,7 @@ let num_children_to_report = 3; function finishLoadPhase() { - assert_true(num_children_to_load == 0); + assert_equals(num_children_to_load, 0); test(() => { assert_false(navigator.userActivation.isActive); @@ -34,7 +34,7 @@ } function finishReportPhase() { - assert_true(num_children_to_report == 0); + assert_equals(num_children_to_report, 0); test(() => { assert_false(navigator.userActivation.isActive); diff --git a/tests/wpt/web-platform-tests/html/user-activation/message-event-activation-api-iframe-cross-origin.sub.tentative.html b/tests/wpt/web-platform-tests/html/user-activation/message-event-activation-api-iframe-cross-origin.sub.tentative.html index 79899cd5218..cbb72850910 100644 --- a/tests/wpt/web-platform-tests/html/user-activation/message-event-activation-api-iframe-cross-origin.sub.tentative.html +++ b/tests/wpt/web-platform-tests/html/user-activation/message-event-activation-api-iframe-cross-origin.sub.tentative.html @@ -45,7 +45,7 @@ assert_true(event.userActivation.hasBeenActive); child.contentWindow.postMessage('report-no-activation', "*"); } else if (event.data == 'child-report-no-activation') { - assert_true(event.userActivation === null); + assert_equals(event.userActivation, null); t.done(); } })); diff --git a/tests/wpt/web-platform-tests/html/user-activation/propagation-crossorigin.sub.tentative.html b/tests/wpt/web-platform-tests/html/user-activation/propagation-crossorigin.sub.tentative.html index 6847502d936..c29c9d8440d 100644 --- a/tests/wpt/web-platform-tests/html/user-activation/propagation-crossorigin.sub.tentative.html +++ b/tests/wpt/web-platform-tests/html/user-activation/propagation-crossorigin.sub.tentative.html @@ -24,7 +24,7 @@ let num_children_to_report = 3; function finishLoadPhase() { - assert_true(num_children_to_load == 0); + assert_equals(num_children_to_load, 0); test(() => { assert_false(navigator.userActivation.isActive); @@ -35,7 +35,7 @@ } function finishReportPhase() { - assert_true(num_children_to_report == 0); + assert_equals(num_children_to_report, 0); test(() => { assert_true(navigator.userActivation.isActive); diff --git a/tests/wpt/web-platform-tests/html/user-activation/propagation-sameorigin.tentative.html b/tests/wpt/web-platform-tests/html/user-activation/propagation-sameorigin.tentative.html index 281e0ce6904..97c9077d5d9 100644 --- a/tests/wpt/web-platform-tests/html/user-activation/propagation-sameorigin.tentative.html +++ b/tests/wpt/web-platform-tests/html/user-activation/propagation-sameorigin.tentative.html @@ -23,7 +23,7 @@ let num_children_to_report = 3; function finishLoadPhase() { - assert_true(num_children_to_load == 0); + assert_equals(num_children_to_load, 0); test(() => { assert_false(navigator.userActivation.isActive); @@ -34,7 +34,7 @@ } function finishReportPhase() { - assert_true(num_children_to_report == 0); + assert_equals(num_children_to_report, 0); test(() => { assert_true(navigator.userActivation.isActive); diff --git a/tests/wpt/web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https.html b/tests/wpt/web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https.html index c0dc4d231ce..ef558861802 100644 --- a/tests/wpt/web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https.html +++ b/tests/wpt/web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https.html @@ -44,7 +44,7 @@ test(function() { var ev = new MessageEvent("test", { ports: [] }) assert_true(Array.isArray(ev.ports), "Array.isArray() should return true") assert_true(Object.isFrozen(ev.ports), "Object.isFrozen() should return true") - assert_true(ev.ports === ev.ports, "ev.ports should return the same object") + assert_equals(ev.ports, ev.ports, "ev.ports should return the same object") const oldPorts = ev.ports; ev.initMessageEvent("test", false, false, null, "", "", null, ev.ports); diff --git a/tests/wpt/web-platform-tests/infrastructure/testdriver/actions/multiDevice.html b/tests/wpt/web-platform-tests/infrastructure/testdriver/actions/multiDevice.html index 5cab1206dbe..6bc0fa218d8 100644 --- a/tests/wpt/web-platform-tests/infrastructure/testdriver/actions/multiDevice.html +++ b/tests/wpt/web-platform-tests/infrastructure/testdriver/actions/multiDevice.html @@ -28,7 +28,7 @@ async_test(t => { actions.send() .then(() => { - assert_true(text_box.value == "pass"); + assert_equals(text_box.value, "pass"); t.done(); }) .catch(t.unreached_func("Actions sequence failed")); diff --git a/tests/wpt/web-platform-tests/infrastructure/testdriver/send_keys.html b/tests/wpt/web-platform-tests/infrastructure/testdriver/send_keys.html index 2170347c972..71ca4405f48 100644 --- a/tests/wpt/web-platform-tests/infrastructure/testdriver/send_keys.html +++ b/tests/wpt/web-platform-tests/infrastructure/testdriver/send_keys.html @@ -15,7 +15,7 @@ async_test(t => { test_driver .send_keys(text_box, input_text) .then(() => { - assert_true(text_box.value == input_text); + assert_equals(text_box.value, input_text); t.done(); }) .catch(t.unreached_func("send keys failed")); diff --git a/tests/wpt/web-platform-tests/interfaces/html.idl b/tests/wpt/web-platform-tests/interfaces/html.idl index 20e2452e6c6..3bf41f95893 100644 --- a/tests/wpt/web-platform-tests/interfaces/html.idl +++ b/tests/wpt/web-platform-tests/interfaces/html.idl @@ -1582,6 +1582,8 @@ interface ElementInternals { readonly attribute NodeList labels; }; +ElementInternals includes ARIAMixin; + dictionary ValidityStateFlags { boolean valueMissing = false; boolean typeMismatch = false; diff --git a/tests/wpt/web-platform-tests/interfaces/service-workers.idl b/tests/wpt/web-platform-tests/interfaces/service-workers.idl index aac74741a01..d15ccdf3023 100644 --- a/tests/wpt/web-platform-tests/interfaces/service-workers.idl +++ b/tests/wpt/web-platform-tests/interfaces/service-workers.idl @@ -7,8 +7,8 @@ interface ServiceWorker : EventTarget { readonly attribute USVString scriptURL; readonly attribute ServiceWorkerState state; - void postMessage(any message, sequence transfer); - void postMessage(any message, optional PostMessageOptions options = {}); + undefined postMessage(any message, sequence transfer); + undefined postMessage(any message, optional PostMessageOptions options = {}); // event attribute EventHandler onstatechange; @@ -34,7 +34,7 @@ interface ServiceWorkerRegistration : EventTarget { readonly attribute USVString scope; readonly attribute ServiceWorkerUpdateViaCache updateViaCache; - [NewObject] Promise update(); + [NewObject] Promise update(); [NewObject] Promise unregister(); // event @@ -65,7 +65,7 @@ interface ServiceWorkerContainer : EventTarget { [NewObject] Promise getRegistration(optional USVString clientURL = ""); [NewObject] Promise> getRegistrations(); - void startMessages(); + undefined startMessages(); // events attribute EventHandler oncontrollerchange; @@ -81,9 +81,9 @@ dictionary RegistrationOptions { [SecureContext, Exposed=(Window,Worker)] interface NavigationPreloadManager { - Promise enable(); - Promise disable(); - Promise setHeaderValue(ByteString value); + Promise enable(); + Promise disable(); + Promise setHeaderValue(ByteString value); Promise getState(); }; @@ -98,7 +98,7 @@ interface ServiceWorkerGlobalScope : WorkerGlobalScope { [SameObject] readonly attribute ServiceWorkerRegistration registration; [SameObject] readonly attribute ServiceWorker serviceWorker; - [NewObject] Promise skipWaiting(); + [NewObject] Promise skipWaiting(); attribute EventHandler oninstall; attribute EventHandler onactivate; @@ -114,8 +114,8 @@ interface Client { readonly attribute FrameType frameType; readonly attribute DOMString id; readonly attribute ClientType type; - void postMessage(any message, sequence transfer); - void postMessage(any message, optional PostMessageOptions options = {}); + undefined postMessage(any message, sequence transfer); + undefined postMessage(any message, optional PostMessageOptions options = {}); }; [Exposed=ServiceWorker] @@ -140,7 +140,7 @@ interface Clients { [NewObject] Promise get(DOMString id); [NewObject] Promise> matchAll(optional ClientQueryOptions options = {}); [NewObject] Promise openWindow(USVString url); - [NewObject] Promise claim(); + [NewObject] Promise claim(); }; dictionary ClientQueryOptions { @@ -158,7 +158,7 @@ enum ClientType { [Exposed=ServiceWorker] interface ExtendableEvent : Event { constructor(DOMString type, optional ExtendableEventInit eventInitDict = {}); - void waitUntil(Promise f); + undefined waitUntil(Promise f); }; dictionary ExtendableEventInit : EventInit { @@ -173,9 +173,9 @@ interface FetchEvent : ExtendableEvent { readonly attribute DOMString clientId; readonly attribute DOMString resultingClientId; readonly attribute DOMString replacesClientId; - readonly attribute Promise handled; + readonly attribute Promise handled; - void respondWith(Promise r); + undefined respondWith(Promise r); }; dictionary FetchEventInit : ExtendableEventInit { @@ -184,7 +184,7 @@ dictionary FetchEventInit : ExtendableEventInit { DOMString clientId = ""; DOMString resultingClientId = ""; DOMString replacesClientId = ""; - Promise handled; + Promise handled; }; [Exposed=ServiceWorker] @@ -213,9 +213,9 @@ partial interface mixin WindowOrWorkerGlobalScope { interface Cache { [NewObject] Promise match(RequestInfo request, optional CacheQueryOptions options = {}); [NewObject] Promise> matchAll(optional RequestInfo request, optional CacheQueryOptions options = {}); - [NewObject] Promise add(RequestInfo request); - [NewObject] Promise addAll(sequence requests); - [NewObject] Promise put(RequestInfo request, Response response); + [NewObject] Promise add(RequestInfo request); + [NewObject] Promise addAll(sequence requests); + [NewObject] Promise put(RequestInfo request, Response response); [NewObject] Promise delete(RequestInfo request, optional CacheQueryOptions options = {}); [NewObject] Promise> keys(optional RequestInfo request, optional CacheQueryOptions options = {}); }; diff --git a/tests/wpt/web-platform-tests/interfaces/webrtc-stats.idl b/tests/wpt/web-platform-tests/interfaces/webrtc-stats.idl index 455ab8f18a3..23162010885 100644 --- a/tests/wpt/web-platform-tests/interfaces/webrtc-stats.idl +++ b/tests/wpt/web-platform-tests/interfaces/webrtc-stats.idl @@ -258,7 +258,6 @@ dictionary RTCDataChannelStats : RTCStats { DOMString label; DOMString protocol; unsigned short dataChannelIdentifier; - required DOMString transportId; required RTCDataChannelState state; unsigned long messagesSent; unsigned long long bytesSent; @@ -287,6 +286,7 @@ dictionary RTCTransportStats : RTCStats { }; dictionary RTCSctpTransportStats : RTCStats { + DOMString transportId; double smoothedRoundTripTime; unsigned long congestionWindow; unsigned long receiverWindow; diff --git a/tests/wpt/web-platform-tests/keyboard-map/navigator-keyboard-map.https.html b/tests/wpt/web-platform-tests/keyboard-map/navigator-keyboard-map.https.html index 9870c813c26..b3ff14f362f 100644 --- a/tests/wpt/web-platform-tests/keyboard-map/navigator-keyboard-map.https.html +++ b/tests/wpt/web-platform-tests/keyboard-map/navigator-keyboard-map.https.html @@ -23,10 +23,10 @@ promise_test(() => { return p.then(function(map) { assert_true(map instanceof KeyboardLayoutMap); for (var [k,v] of map) { - assert_true(typeof k === 'string'); - assert_true(k.length != 0); - assert_true(typeof v === 'string'); - assert_true(v.length != 0); + assert_equals(typeof k, 'string'); + assert_not_equals(k.length, 0); + assert_equals(typeof v, 'string'); + assert_not_equals(v.length, 0); } }); }, "navigator.keyboard.getLayoutMap() returns a Promise when successful"); diff --git a/tests/wpt/web-platform-tests/lint.ignore b/tests/wpt/web-platform-tests/lint.ignore index de8d1175bc9..9336f1ee574 100644 --- a/tests/wpt/web-platform-tests/lint.ignore +++ b/tests/wpt/web-platform-tests/lint.ignore @@ -732,6 +732,7 @@ MISSING DEPENDENCY: webxr/resources/webxr_util.js AHEM SYSTEM FONT: acid/acid3/test.html AHEM SYSTEM FONT: resource-timing/resources/all_resource_types.htm AHEM SYSTEM FONT: resource-timing/resources/iframe-reload-TAO.sub.html +AHEM SYSTEM FONT: html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.fontBoundingBox.ahem.html # TODO: The following should be deleted along with the Ahem web font cleanup # PR (https://github.com/web-platform-tests/wpt/pull/18702) diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/scripts/cramped-001.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/scripts/cramped-001.html index 029d0f6e9ac..06a0d5fa5ca 100644 --- a/tests/wpt/web-platform-tests/mathml/presentation-markup/scripts/cramped-001.html +++ b/tests/wpt/web-platform-tests/mathml/presentation-markup/scripts/cramped-001.html @@ -8,7 +8,7 @@ - + @@ -138,6 +138,14 @@ assert_cramped("mmultiscripts-005", false, "post-superscript"); }, "mmultiscripts"); + test(function() { + assert_true(MathMLFeatureDetection.has_mspace()); + assert_cramped("css-001", false); + assert_cramped("css-002", true); + assert_cramped("css-003", true); + assert_cramped("css-004", false); + }, "element with specified CSS math-style"); + done(); } @@ -588,5 +596,31 @@

    +

    + + + + + + + + + + + + + + + + + + + + + + + + +

    diff --git a/tests/wpt/web-platform-tests/mathml/relations/css-styling/attribute-mapping-002.html b/tests/wpt/web-platform-tests/mathml/relations/css-styling/attribute-mapping-002.html index 3ac942f8178..904ed0343fc 100644 --- a/tests/wpt/web-platform-tests/mathml/relations/css-styling/attribute-mapping-002.html +++ b/tests/wpt/web-platform-tests/mathml/relations/css-styling/attribute-mapping-002.html @@ -69,11 +69,11 @@ }, `scriptlevel on the ${tag} element is mapped to font-size: scriptlevel(...)`); test(function() { - assert_equals(style.getPropertyValue("math-style"), "inline", "no attribute"); + assert_equals(style.getPropertyValue("math-style"), "compact", "no attribute"); element.setAttribute("displaystyle", "true"); - assert_equals(style.getPropertyValue("math-style"), "display", "attribute specified"); + assert_equals(style.getPropertyValue("math-style"), "normal", "attribute specified"); element.setAttribute("displaystyle", "TrUe"); - assert_equals(style.getPropertyValue("math-style"), "display", "case insensitive"); + assert_equals(style.getPropertyValue("math-style"), "normal", "case insensitive"); }, `displaystyle on the ${tag} element is mapped to CSS math-style`); }); diff --git a/tests/wpt/web-platform-tests/mathml/relations/css-styling/presentational-hints-001-ref.html b/tests/wpt/web-platform-tests/mathml/relations/css-styling/presentational-hints-001-ref.html index 5751a59cb5a..af27310fb59 100644 --- a/tests/wpt/web-platform-tests/mathml/relations/css-styling/presentational-hints-001-ref.html +++ b/tests/wpt/web-platform-tests/mathml/relations/css-styling/presentational-hints-001-ref.html @@ -46,7 +46,7 @@

    displaystyle: - + X X diff --git a/tests/wpt/web-platform-tests/mathml/relations/css-styling/presentational-hints-001.html b/tests/wpt/web-platform-tests/mathml/relations/css-styling/presentational-hints-001.html index dc84cbd7b43..701dbef8613 100644 --- a/tests/wpt/web-platform-tests/mathml/relations/css-styling/presentational-hints-001.html +++ b/tests/wpt/web-platform-tests/mathml/relations/css-styling/presentational-hints-001.html @@ -56,7 +56,7 @@

    displaystyle: - + X X diff --git a/tests/wpt/web-platform-tests/media-source/mediasource-appendwindow.html b/tests/wpt/web-platform-tests/media-source/mediasource-appendwindow.html index 9add6340804..ba15bd63221 100644 --- a/tests/wpt/web-platform-tests/media-source/mediasource-appendwindow.html +++ b/tests/wpt/web-platform-tests/media-source/mediasource-appendwindow.html @@ -90,22 +90,22 @@ assert_true(sourceBuffer != null, "New SourceBuffer returned"); sourceBuffer.appendWindowStart = ""; - assert_true(sourceBuffer.appendWindowStart == 0, "appendWindowStart is 0"); + assert_equals(sourceBuffer.appendWindowStart, 0, "appendWindowStart is 0"); sourceBuffer.appendWindowStart = "10"; - assert_true(sourceBuffer.appendWindowStart == 10, "appendWindowStart is 10"); + assert_equals(sourceBuffer.appendWindowStart, 10, "appendWindowStart is 10"); sourceBuffer.appendWindowStart = null; - assert_true(sourceBuffer.appendWindowStart == 0, "appendWindowStart is 0"); + assert_equals(sourceBuffer.appendWindowStart, 0, "appendWindowStart is 0"); sourceBuffer.appendWindowStart = true; - assert_true(sourceBuffer.appendWindowStart == 1, "appendWindowStart is 1"); + assert_equals(sourceBuffer.appendWindowStart, 1, "appendWindowStart is 1"); sourceBuffer.appendWindowStart = false; - assert_true(sourceBuffer.appendWindowStart == 0, "appendWindowStart is 0"); + assert_equals(sourceBuffer.appendWindowStart, 0, "appendWindowStart is 0"); sourceBuffer.appendWindowEnd = "100"; - assert_true(sourceBuffer.appendWindowEnd == 100, "appendWindowEnd is 100"); + assert_equals(sourceBuffer.appendWindowEnd, 100, "appendWindowEnd is 100"); test.done(); diff --git a/tests/wpt/web-platform-tests/media-source/mediasource-timestamp-offset.html b/tests/wpt/web-platform-tests/media-source/mediasource-timestamp-offset.html index 05495b71920..8381aceeb04 100644 --- a/tests/wpt/web-platform-tests/media-source/mediasource-timestamp-offset.html +++ b/tests/wpt/web-platform-tests/media-source/mediasource-timestamp-offset.html @@ -110,8 +110,8 @@ assert_true(sourceBuffer != null, "New SourceBuffer returned"); mediaSource.removeSourceBuffer(sourceBuffer); - assert_true(mediaSource.sourceBuffers.length == 0, "MediaSource.sourceBuffers is empty"); - assert_true(mediaSource.activeSourceBuffers.length == 0, "MediaSource.activesourceBuffers is empty"); + assert_equals(mediaSource.sourceBuffers.length, 0, "MediaSource.sourceBuffers is empty"); + assert_equals(mediaSource.activeSourceBuffers.length, 0, "MediaSource.activesourceBuffers is empty"); assert_throws_dom("InvalidStateError", function() { diff --git a/tests/wpt/web-platform-tests/mediacapture-image/getPhotoCapabilities.html b/tests/wpt/web-platform-tests/mediacapture-image/getPhotoCapabilities.html index 9e2392de04d..94962a03f4d 100644 --- a/tests/wpt/web-platform-tests/mediacapture-image/getPhotoCapabilities.html +++ b/tests/wpt/web-platform-tests/mediacapture-image/getPhotoCapabilities.html @@ -19,7 +19,7 @@ image_capture_test(async (t, imageCaptureTest) => { let mockCapabilities = imageCaptureTest.mockImageCapture().state(); let capturer = new ImageCapture(stream.getVideoTracks()[0]); - assert_true(typeof capturer.getPhotoCapabilities == 'function'); + assert_equals(typeof capturer.getPhotoCapabilities, 'function'); let capabilities = await capturer.getPhotoCapabilities(); diff --git a/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-getUserMedia.https.html b/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-getUserMedia.https.html index 693f3bd11cf..56d402a256d 100644 --- a/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-getUserMedia.https.html +++ b/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-getUserMedia.https.html @@ -15,9 +15,9 @@ + + Navigation Timing 2 WPT + + + + + + + + + +

    Description

    +

    This test validates the values of the window.performance.getEntriesByType("navigation")[0].redirectCount and the + window.performance.getEntriesByType("navigation")[0].redirectStart/End times for a cross-origin server side redirect navigation when the final + document is the same as the original origin.

    + + + + + diff --git a/tests/wpt/web-platform-tests/navigation-timing/nav2_test_redirect_chain_xserver_partial_opt_in.html b/tests/wpt/web-platform-tests/navigation-timing/nav2_test_redirect_chain_xserver_partial_opt_in.html index db499c3ed34..0feb3bfa7f1 100644 --- a/tests/wpt/web-platform-tests/navigation-timing/nav2_test_redirect_chain_xserver_partial_opt_in.html +++ b/tests/wpt/web-platform-tests/navigation-timing/nav2_test_redirect_chain_xserver_partial_opt_in.html @@ -11,13 +11,6 @@ diff --git a/tests/wpt/web-platform-tests/presentation-api/controlling-ua/PresentationRequest_onconnectionavailable-manual.https.html b/tests/wpt/web-platform-tests/presentation-api/controlling-ua/PresentationRequest_onconnectionavailable-manual.https.html index 4c2ec083247..d06daae11c0 100644 --- a/tests/wpt/web-platform-tests/presentation-api/controlling-ua/PresentationRequest_onconnectionavailable-manual.https.html +++ b/tests/wpt/web-platform-tests/presentation-api/controlling-ua/PresentationRequest_onconnectionavailable-manual.https.html @@ -57,7 +57,7 @@ connection = c; assert_equals(connection.state, 'connecting', 'The initial state of the presentation connection is "connecting".'); assert_true(!!connection.id, 'The connection ID is set.'); - assert_true(typeof connection.id === 'string', 'The connection ID is a string.'); + assert_equals(typeof connection.id, 'string', 'The connection ID is a string.'); assert_true(connection instanceof PresentationConnection, 'The connection is an instance of PresentationConnection.'); const eventWatcher = new EventWatcher(t, request, 'connectionavailable'); diff --git a/tests/wpt/web-platform-tests/presentation-api/controlling-ua/defaultRequest_success-manual.https.html b/tests/wpt/web-platform-tests/presentation-api/controlling-ua/defaultRequest_success-manual.https.html index 0a2eebe8893..840b72b8495 100644 --- a/tests/wpt/web-platform-tests/presentation-api/controlling-ua/defaultRequest_success-manual.https.html +++ b/tests/wpt/web-platform-tests/presentation-api/controlling-ua/defaultRequest_success-manual.https.html @@ -52,7 +52,7 @@ // check the presentation connection and its attributes assert_equals(connection.state, 'connecting', 'The initial state of the presentation connection is "connecting".'); assert_true(!!connection.id, 'The connection ID is set.'); - assert_true(typeof connection.id === 'string', 'The connection ID is a string.'); + assert_equals(typeof connection.id, 'string', 'The connection ID is a string.'); assert_true(connection instanceof PresentationConnection, 'The connection is an instance of PresentationConnection.'); }); }); diff --git a/tests/wpt/web-platform-tests/presentation-api/controlling-ua/startNewPresentation_success-manual.https.html b/tests/wpt/web-platform-tests/presentation-api/controlling-ua/startNewPresentation_success-manual.https.html index a5759f00deb..c9378c0e680 100644 --- a/tests/wpt/web-platform-tests/presentation-api/controlling-ua/startNewPresentation_success-manual.https.html +++ b/tests/wpt/web-platform-tests/presentation-api/controlling-ua/startNewPresentation_success-manual.https.html @@ -69,7 +69,7 @@ // Check the initial state of the presentation connection assert_equals(connection.state, 'connecting', 'Check the initial state of the presentation connection.'); assert_true(!!connection.id, 'The connection ID is set.'); - assert_true(typeof connection.id === 'string', 'The connection ID is a string.'); + assert_equals(typeof connection.id, 'string', 'The connection ID is a string.'); assert_true(connection instanceof PresentationConnection, 'The connection is an instance of PresentationConnection.'); var eventWatcher = new EventWatcher(t, connection, 'connect'); diff --git a/tests/wpt/web-platform-tests/resource-timing/resources/webperftestharness.js b/tests/wpt/web-platform-tests/resource-timing/resources/webperftestharness.js index 8e04e52f9c5..869ef3d74f7 100644 --- a/tests/wpt/web-platform-tests/resource-timing/resources/webperftestharness.js +++ b/tests/wpt/web-platform-tests/resource-timing/resources/webperftestharness.js @@ -62,26 +62,26 @@ function test_namespace(child_name, skip_root) if (skip_root === undefined) { var msg = 'window.performance is defined'; // The window.performance attribute provides a hosting area for performance related attributes. - wp_test(function () { assert_true(performanceNamespace !== undefined, msg); }, msg); + wp_test(function () { assert_not_equals(performanceNamespace, undefined, msg); }, msg); } if (child_name !== undefined) { var msg2 = 'window.performance.' + child_name + ' is defined'; // The window.performance attribute provides a hosting area for performance related attributes. - wp_test(function() { assert_true(performanceNamespace[child_name] !== undefined, msg2); }, msg2); + wp_test(function() { assert_not_equals(performanceNamespace[child_name], undefined, msg2); }, msg2); } } function test_attribute_exists(parent_name, attribute_name, properties) { var msg = 'window.performance.' + parent_name + '.' + attribute_name + ' is defined.'; - wp_test(function() { assert_true(performanceNamespace[parent_name][attribute_name] !== undefined, msg); }, msg, properties); + wp_test(function() { assert_not_equals(performanceNamespace[parent_name][attribute_name], undefined, msg); }, msg, properties); } function test_enum(parent_name, enum_name, value, properties) { var msg = 'window.performance.' + parent_name + '.' + enum_name + ' is defined.'; - wp_test(function() { assert_true(performanceNamespace[parent_name][enum_name] !== undefined, msg); }, msg, properties); + wp_test(function() { assert_not_equals(performanceNamespace[parent_name][enum_name], undefined, msg); }, msg, properties); msg = 'window.performance.' + parent_name + '.' + enum_name + ' = ' + value; wp_test(function() { assert_equals(performanceNamespace[parent_name][enum_name], value, msg); }, msg, properties); @@ -148,7 +148,7 @@ function test_greater_or_equals(value, greater_than, msg, properties) function test_not_equals(value, notequals, msg, properties) { - wp_test(function() { assert_true(value !== notequals, msg); }, msg, properties); + wp_test(function() { assert_not_equals(value, notequals, msg); }, msg, properties); } function test_tao_pass(entry) { diff --git a/tests/wpt/web-platform-tests/resource-timing/resources/webperftestharnessextension.js b/tests/wpt/web-platform-tests/resource-timing/resources/webperftestharnessextension.js index 8bc74bf811e..f131d4d1622 100644 --- a/tests/wpt/web-platform-tests/resource-timing/resources/webperftestharnessextension.js +++ b/tests/wpt/web-platform-tests/resource-timing/resources/webperftestharnessextension.js @@ -27,7 +27,7 @@ function test_method_exists(method, method_name, properties) msg = 'performance.' + method.name + ' is supported!'; else msg = 'performance.' + method_name + ' is supported!'; - wp_test(function() { assert_true(typeof method === 'function', msg); }, msg, properties); + wp_test(function() { assert_equals(typeof method, 'function', msg); }, msg, properties); } function test_noless_than(value, greater_than, msg, properties) diff --git a/tests/wpt/web-platform-tests/resources/chromium/generic_sensor_mocks.js b/tests/wpt/web-platform-tests/resources/chromium/generic_sensor_mocks.js index ac02c097fb2..ff11ca1ab0b 100644 --- a/tests/wpt/web-platform-tests/resources/chromium/generic_sensor_mocks.js +++ b/tests/wpt/web-platform-tests/resources/chromium/generic_sensor_mocks.js @@ -46,7 +46,9 @@ var GenericSensorTest = (() => { this.readingData_ = null; this.requestedFrequencies_ = []; let rv = handle.mapBuffer(offset, size); - assert_equals(rv.result, Mojo.RESULT_OK, "Failed to map shared buffer"); + if (rv.result != Mojo.RESULT_OK) { + throw new Error("MockSensor(): Failed to map shared buffer"); + } this.buffer_ = new Float64Array(rv.buffer); this.buffer_.fill(0); this.binding_ = new mojo.Binding(device.mojom.Sensor, this, @@ -64,8 +66,6 @@ var GenericSensorTest = (() => { // Adds configuration for the sensor and starts reporting fake data // through setSensorReading function. async addConfiguration(configuration) { - assert_not_equals(configuration, null, "Invalid sensor configuration."); - this.requestedFrequencies_.push(configuration.frequency); // Sort using descending order. this.requestedFrequencies_.sort( @@ -151,8 +151,10 @@ var GenericSensorTest = (() => { // |buffer_| is a TypedArray, so we need to make sure pass an // array to set(). const reading = this.readingData_.next().value; - assert_true(Array.isArray(reading), "The readings passed to " + - "setSensorReading() must be arrays."); + if (!Array.isArray(reading)) { + throw new TypeError("startReading(): The readings passed to " + + "setSensorReading() must be arrays"); + } this.buffer_.set(reading, 2); } // For all tests sensor reading should have monotonically @@ -173,7 +175,9 @@ var GenericSensorTest = (() => { } getSamplingFrequency() { - assert_true(this.requestedFrequencies_.length > 0); + if (this.requestedFrequencies_.length == 0) { + throw new Error("getSamplingFrequency(): No configured frequency"); + } return this.requestedFrequencies_[0]; } @@ -191,7 +195,9 @@ var GenericSensorTest = (() => { this.sharedBufferSizeInBytes_ = this.readingSizeInBytes_ * (device.mojom.SensorType.MAX_VALUE + 1); const rv = Mojo.createSharedBuffer(this.sharedBufferSizeInBytes_); - assert_equals(rv.result, Mojo.RESULT_OK, "Failed to create buffer"); + if (rv.result != Mojo.RESULT_OK) { + throw new Error("MockSensorProvider: Failed to map shared buffer"); + } this.sharedBufferHandle_ = rv.handle; this.activeSensors_ = new Map(); this.resolveFuncs_ = new Map(); @@ -251,8 +257,9 @@ var GenericSensorTest = (() => { } const rv = this.sharedBufferHandle_.duplicateBufferHandle(); - - assert_equals(rv.result, Mojo.RESULT_OK); + if (rv.result != Mojo.RESULT_OK) { + throw new Error("getSensor(): failed to duplicate Mojo buffer handler"); + } const defaultConfig = { frequency: DEFAULT_FREQUENCY }; // Consider sensor traits to meet assertions in C++ code (see @@ -337,7 +344,9 @@ var GenericSensorTest = (() => { // Returns mock sensor that was created in getSensor to the layout test. getCreatedSensor(sensorType) { const type = this.mojomSensorType_.get(sensorType); - assert_equals(typeof type, "number", "A sensor type must be specified."); + if (typeof type != "number") { + throw new TypeError(`getCreatedSensor(): Invalid sensor type ${sensorType}`); + } if (this.activeSensors_.has(type)) { return Promise.resolve(this.activeSensors_.get(type)); @@ -377,10 +386,15 @@ var GenericSensorTest = (() => { throw new Error('Call reset() before initialize().'); // Grant sensor permissions for Chromium testdriver. - for (const entry of ['accelerometer', 'gyroscope', - 'magnetometer', 'ambient-light-sensor']) { - await test_driver.set_permission({ name: entry }, 'granted', false); - }; + // testdriver.js only works in the top-level browsing context, so do + // nothing if we're in e.g. an iframe. + if (window.parent === window) { + for (const entry + of ['accelerometer', 'gyroscope', 'magnetometer', + 'ambient-light-sensor']) { + await test_driver.set_permission({name: entry}, 'granted', false); + } + } testInternal.sensorProvider = new MockSensorProvider; testInternal.initialized = true; diff --git a/tests/wpt/web-platform-tests/resources/test/tests/unit/assert_object_equals.html b/tests/wpt/web-platform-tests/resources/test/tests/unit/assert_object_equals.html index 19296b8293f..313d77b9771 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/unit/assert_object_equals.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/unit/assert_object_equals.html @@ -43,7 +43,7 @@ test(function() { var expected = {}; Object.defineProperty(actual, 'a', { value: 1, enumerable: false }); - assert_true(actual.a !== expected.a); + assert_not_equals(actual.a, expected.a); assert_object_equals(actual, expected); }, 'non-enumerable properties in actual value ignored'); @@ -52,7 +52,7 @@ test(function() { var expected = {}; Object.defineProperty(expected, 'a', { value: 1, enumerable: false }); - assert_true(actual.a !== expected.a); + assert_not_equals(actual.a, expected.a); assert_object_equals(actual, expected); }, 'non-enumerable properties in expected value ignored'); diff --git a/tests/wpt/web-platform-tests/resources/test/tests/unit/basic.html b/tests/wpt/web-platform-tests/resources/test/tests/unit/basic.html index d907c7bb9fb..d52082f2e07 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/unit/basic.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/unit/basic.html @@ -28,7 +28,7 @@ WebIDL2.parse("I'm a syntax error"); throw new Error("Web IDL didn't throw"); } catch (e) { - assert_true(e.name === "WebIDLParseError"); + assert_equals(e.name, "WebIDLParseError"); } }, 'WebIDL2 parse method should bail on incorrect WebIDL'); test(function() { diff --git a/tests/wpt/web-platform-tests/scroll-animations/finish-animation.html b/tests/wpt/web-platform-tests/scroll-animations/finish-animation.html index ab80458b033..126659802e0 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/finish-animation.html +++ b/tests/wpt/web-platform-tests/scroll-animations/finish-animation.html @@ -236,7 +236,7 @@ assert_equals(animation.currentTime, null); const resolvedFinishPromise = animation.finished; - assert_true(originalFinishPromise != resolvedFinishPromise, + assert_not_equals(originalFinishPromise, resolvedFinishPromise, 'Canceling an animation should create a new finished promise'); animation.finish(); diff --git a/tests/wpt/web-platform-tests/scroll-animations/pause-animation.html b/tests/wpt/web-platform-tests/scroll-animations/pause-animation.html index 07c72aad07c..9bddfedd436 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/pause-animation.html +++ b/tests/wpt/web-platform-tests/scroll-animations/pause-animation.html @@ -139,7 +139,7 @@ promise_test(async t => { assert_equals(animation.currentTime, null); const readyPromise = animation.ready; - assert_true(originalReadyPromise != readyPromise, + assert_not_equals(originalReadyPromise, readyPromise, 'Canceling an animation should create a new ready promise'); animation.pause(); diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/client-navigate-worker.js b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/client-navigate-worker.js index d14921fef74..a96c53bced9 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/client-navigate-worker.js +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/client-navigate-worker.js @@ -77,7 +77,7 @@ self.onmessage = function(e) { .then(client => client.navigate("redirect.py?Redirect=" + url)) .then(client => { clientUrl = (client && client.url) || "" - assert_true(client === null); + assert_equals(client, null); }) .catch(unreached_rejection(t)); }, "Redirecting to another origin should resolve with null"); diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-request-xhr-iframe.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-request-xhr-iframe.https.html index 65fa5171b3d..4e8116c0c41 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-request-xhr-iframe.https.html +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-request-xhr-iframe.https.html @@ -161,7 +161,7 @@ function form_data_test() { '\r\n' + 'file content\r\n' + '--' + boundary + '--\r\n'; - assert_true(response.body === expected_body, "form data response content is as expected"); + assert_equals(response.body, expected_body, "form data response content is as expected"); }); } diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/testharness-helpers.js b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/testharness-helpers.js index 7b7b5efe69b..b1a5b960e06 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/testharness-helpers.js +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/testharness-helpers.js @@ -28,7 +28,7 @@ self.assert_object_equals = function(actual, expected, description) { assert_equals(actual, expected, prefix); return; } - assert_true(typeof expected === 'object', prefix); + assert_equals(typeof expected, 'object', prefix); assert_equals(object_stack.indexOf(actual), -1, prefix + ' must not contain cyclic references.'); @@ -107,7 +107,7 @@ function assert_array_objects_equals(actual, expected, description) { // FIXME: Remove assert_will_be_idl_attribute once we complete the transition // of moving the DOM attributes to prototype chains. (http://crbug.com/43394) function assert_will_be_idl_attribute(object, attribute_name, description) { - assert_true(typeof object === "object", description); + assert_equals(typeof object, "object", description); assert_true("hasOwnProperty" in object, description); diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/unregister-immediately-helpers.js b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/unregister-immediately-helpers.js index 86fb24d8f98..91a30de5b77 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/unregister-immediately-helpers.js +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/unregister-immediately-helpers.js @@ -14,6 +14,6 @@ async function assert_no_registrations_exist() { async function add_controlled_iframe(test, url) { const frame = await with_iframe(url); test.add_cleanup(() => { frame.remove(); }); - assert_true(frame.contentWindow.navigator.serviceWorker.controller !== null); + assert_not_equals(frame.contentWindow.navigator.serviceWorker.controller, null); return frame; } diff --git a/tests/wpt/web-platform-tests/shadow-dom/untriaged/events/event-dispatch/test-002.html b/tests/wpt/web-platform-tests/shadow-dom/untriaged/events/event-dispatch/test-002.html index 8ea42cad733..512bee77b35 100644 --- a/tests/wpt/web-platform-tests/shadow-dom/untriaged/events/event-dispatch/test-002.html +++ b/tests/wpt/web-platform-tests/shadow-dom/untriaged/events/event-dispatch/test-002.html @@ -39,7 +39,7 @@ A_05_05_02_T01.step(unit(function (ctx) { roots.volumeShadowRoot.addEventListener('mouseover', A_05_05_02_T01.step_func(function(event) { invoked = true; - assert_true(event.relatedTarget === roots.volumeShadowRoot, + assert_equals(event.relatedTarget, roots.volumeShadowRoot, 'Wrong relatedTarget'); }), false); diff --git a/tests/wpt/web-platform-tests/speech-api/webspeech.js b/tests/wpt/web-platform-tests/speech-api/webspeech.js index 6eeb5d9447d..f2f51b694c6 100644 --- a/tests/wpt/web-platform-tests/speech-api/webspeech.js +++ b/tests/wpt/web-platform-tests/speech-api/webspeech.js @@ -51,7 +51,7 @@ function CountTest(name, min, max) { this.asyncTest.step(function() { notes.innerHTML += cTest.name + ' occurred ' + cTest.sum + ' times.
    '; if (cTest.min == cTest.max) { - assert_true(cTest.sum == cTest.min, cTest.name + ' occurred ' + + assert_equals(cTest.sum, cTest.min, cTest.name + ' occurred ' + cTest.sum + ' times and should have occurred ' + cTest.min + ' times.'); } else { diff --git a/tests/wpt/web-platform-tests/storage/estimate-indexeddb.https.any.js b/tests/wpt/web-platform-tests/storage/estimate-indexeddb.https.any.js index c62f5a96c1a..b0c6b944dd6 100644 --- a/tests/wpt/web-platform-tests/storage/estimate-indexeddb.https.any.js +++ b/tests/wpt/web-platform-tests/storage/estimate-indexeddb.https.any.js @@ -50,7 +50,7 @@ test(t => { promise_test(async t => { const estimate = await navigator.storage.estimate(); - assert_true(typeof estimate === 'object'); + assert_equals(typeof estimate, 'object'); assert_true('usage' in estimate); assert_equals(typeof estimate.usage, 'number'); assert_true('quota' in estimate); diff --git a/tests/wpt/web-platform-tests/storage/storagemanager-estimate.https.any.js b/tests/wpt/web-platform-tests/storage/storagemanager-estimate.https.any.js index d1d2e21924c..c2f5c569dc5 100644 --- a/tests/wpt/web-platform-tests/storage/storagemanager-estimate.https.any.js +++ b/tests/wpt/web-platform-tests/storage/storagemanager-estimate.https.any.js @@ -6,7 +6,7 @@ test(function(t) { promise_test(function(t) { return navigator.storage.estimate().then(function(result) { - assert_true(typeof result === 'object'); + assert_equals(typeof result, 'object'); assert_true('usage' in result); assert_equals(typeof result.usage, 'number'); assert_true('quota' in result); diff --git a/tests/wpt/web-platform-tests/svg/path/interfaces/SVGAnimatedPathData-removed.svg b/tests/wpt/web-platform-tests/svg/path/interfaces/SVGAnimatedPathData-removed.svg index d321b8b0011..c8d187cd3d2 100644 --- a/tests/wpt/web-platform-tests/svg/path/interfaces/SVGAnimatedPathData-removed.svg +++ b/tests/wpt/web-platform-tests/svg/path/interfaces/SVGAnimatedPathData-removed.svg @@ -11,14 +11,14 @@ diff --git a/tests/wpt/web-platform-tests/svg/shapes/line-getPointAtLength.svg b/tests/wpt/web-platform-tests/svg/shapes/line-getPointAtLength.svg index 51b12cac06d..472a64480ae 100644 --- a/tests/wpt/web-platform-tests/svg/shapes/line-getPointAtLength.svg +++ b/tests/wpt/web-platform-tests/svg/shapes/line-getPointAtLength.svg @@ -12,8 +12,8 @@ diff --git a/tests/wpt/web-platform-tests/touch-events/multi-touch-interactions.js b/tests/wpt/web-platform-tests/touch-events/multi-touch-interactions.js index 955e32792da..7a8a6b21646 100644 --- a/tests/wpt/web-platform-tests/touch-events/multi-touch-interactions.js +++ b/tests/wpt/web-platform-tests/touch-events/multi-touch-interactions.js @@ -96,8 +96,8 @@ function run() { if(!touchstart_received) { // Check event ordering TA: 1.6.1 test_touchstart.step(function() { - assert_true(touchmove_received==0, "touchstart precedes touchmove"); - assert_true(touchend_received==0, "touchstart precedes touchend"); + assert_equals(touchmove_received, 0, "touchstart precedes touchmove"); + assert_equals(touchend_received, 0, "touchstart precedes touchend"); }); test_touchstart.done(); test_mousedown.done(); // If we got here, then the mouse event test is not needed. @@ -137,7 +137,7 @@ function run() { // TA: 1.3.4.3 test(function() { - assert_true(ev.touches.length==ev.changedTouches.length, "touches and changedTouches have the same length"); + assert_equals(ev.touches.length, ev.changedTouches.length, "touches and changedTouches have the same length"); }, "touchstart #" + touchstart_received + ": touches and changedTouches have the same length"); } else { // TA: 1.3.3.6 @@ -156,7 +156,7 @@ function run() { test(function() { var diff_in_touches = ev.touches.length - last_touches.length; assert_true(diff_in_touches > 0, "touches.length is larger than last received touches.length"); - assert_true(diff_in_touches == ev.changedTouches.length, "change in touches.length equals changedTouches.length"); + assert_equals(diff_in_touches, ev.changedTouches.length, "change in touches.length equals changedTouches.length"); }, "touchstart #" + touchstart_received + ": change in touches.length is valid"); // TA: 1.3.4.5 @@ -219,7 +219,7 @@ function run() { // TA: 1.4.4.2 test(function() { - assert_true(ev.touches.length==last_touches.length, "length of touches is same as length of last received touches"); + assert_equals(ev.touches.length, last_touches.length, "length of touches is same as length of last received touches"); check_list_subset_of_targetlist(ev.touches, "touches", last_touches, "last received touches"); }, "touchmove #" + touchmove_received + ": touches must be same as last received touches"); diff --git a/tests/wpt/web-platform-tests/trusted-types/trusted-types-reporting.tentative.html b/tests/wpt/web-platform-tests/trusted-types/trusted-types-reporting.tentative.html index 5cefedb7b8a..5d9cd8b04ea 100644 --- a/tests/wpt/web-platform-tests/trusted-types/trusted-types-reporting.tentative.html +++ b/tests/wpt/web-platform-tests/trusted-types/trusted-types-reporting.tentative.html @@ -68,7 +68,7 @@ } } function expect_blocked_uri(s) { return e => { - assert_true(e.blockedURI === s, + assert_equals(e.blockedURI, s, `expected "${e.blockedURI}" to be "${s}".`); return e; } } diff --git a/tests/wpt/web-platform-tests/uievents/mouse/layout_change_should_fire_mouseover-manual.html b/tests/wpt/web-platform-tests/uievents/mouse/layout_change_should_fire_mouseover-manual.html index f36fadb697b..1e3662500f2 100644 --- a/tests/wpt/web-platform-tests/uievents/mouse/layout_change_should_fire_mouseover-manual.html +++ b/tests/wpt/web-platform-tests/uievents/mouse/layout_change_should_fire_mouseover-manual.html @@ -60,7 +60,7 @@ function checkEventSequence() { var result = eventList.join(); - assert_true(result == 'mouseover,mouseenter'); + assert_equals(result, 'mouseover,mouseenter'); testMouseOver.done(); } diff --git a/tests/wpt/web-platform-tests/uievents/mouse/mouseevent_move_button-manual.html b/tests/wpt/web-platform-tests/uievents/mouse/mouseevent_move_button-manual.html index 0520b6bee42..d057ecd85e7 100644 --- a/tests/wpt/web-platform-tests/uievents/mouse/mouseevent_move_button-manual.html +++ b/tests/wpt/web-platform-tests/uievents/mouse/mouseevent_move_button-manual.html @@ -52,31 +52,31 @@ }); on_event(lightgreen, "mousedown", function (event) { - test.step(function() {assert_true(button === -1, "There must only be one mouse down event.");}); - test.step(function() {assert_true(event.button != 0, "Must not be primary button.");}); + test.step(function() {assert_equals(button, -1, "There must only be one mouse down event.");}); + test.step(function() {assert_not_equals(event.button, 0, "Must not be primary button.");}); button = event.button; }); on_event(lightyellow, "click", function (event) { - test.step(function() {assert_true(event.button === button, "Button must be the same as mousedown.");}); + test.step(function() {assert_equals(event.button, button, "Button must be the same as mousedown.");}); }); on_event(lightyellow, "mousemove", function (event) { if (button != -1) { - test.step(function() {assert_true(event.button === 0, "Button must be un-initialized for mousemove.");}); + test.step(function() {assert_equals(event.button, 0, "Button must be un-initialized for mousemove.");}); } }); on_event(lightgreen, "mouseleave", function (event) { if (button != -1) { - test.step(function() {assert_true(event.button === 0, "Button must be un-initialized for mouseleave.");}); + test.step(function() {assert_equals(event.button, 0, "Button must be un-initialized for mouseleave.");}); } }); on_event(lightblue, "mouseenter", function (event) { if (button != -1) { - test.step(function() {assert_true(event.button === 0, "Button must be un-initialized for mouseenter.");}); + test.step(function() {assert_equals(event.button, 0, "Button must be un-initialized for mouseenter.");}); } }); on_event(lightblue, "mouseup", function (event) { if (button != -1) { - test.step(function() {assert_true(event.button === button, "Button must be the same as mousedown.");}); + test.step(function() {assert_equals(event.button, button, "Button must be the same as mousedown.");}); test.done(); } }); diff --git a/tests/wpt/web-platform-tests/uievents/order-of-events/mouse-events/mouseover-out-manual.html b/tests/wpt/web-platform-tests/uievents/order-of-events/mouse-events/mouseover-out-manual.html index 1d96fd303ad..ca65c3ff8de 100644 --- a/tests/wpt/web-platform-tests/uievents/order-of-events/mouse-events/mouseover-out-manual.html +++ b/tests/wpt/web-platform-tests/uievents/order-of-events/mouse-events/mouseover-out-manual.html @@ -64,14 +64,14 @@ var outer_out = 0; inner.addEventListener("mouseover", t.step_func(function(e) { - assert_true(inner_over == inner_out, "mouseover is received before mouseout"); + assert_equals(inner_over, inner_out, "mouseover is received before mouseout"); switch (inner_over) { case 0: - assert_true(outer_own_over == 1, "should have triggered a mouseover in the outer before"); + assert_equals(outer_own_over, 1, "should have triggered a mouseover in the outer before"); break; case 1: - assert_true(outer_own_over == 1, "should have not triggered a mouseover in the outer before"); + assert_equals(outer_own_over, 1, "should have not triggered a mouseover in the outer before"); break; default: assert_true(false, "should not get more than two mouseovers"); @@ -81,11 +81,11 @@ inner.addEventListener("mouseover", t.step_func(function(e) { }), false); inner.addEventListener("mouseout", t.step_func(function(e) { - assert_true(inner_over == inner_out + 1, "mouseout is received after mouseover"); + assert_equals(inner_over, inner_out + 1, "mouseout is received after mouseover"); switch (inner_out) { case 0: - assert_true(outer_own_out == 1, "mouseout should have been received in the parent when hovering over this element"); + assert_equals(outer_own_out, 1, "mouseout should have been received in the parent when hovering over this element"); break; case 1: break; @@ -98,10 +98,10 @@ inner.addEventListener("mouseout", t.step_func(function(e) { outer.addEventListener("mouseover", t.step_func(function(e) { if (e.target == outer) { - assert_true(outer_own_over == outer_own_out, "outer: mouseover is received before mouseout"); + assert_equals(outer_own_over, outer_own_out, "outer: mouseover is received before mouseout"); outer_own_over++; } else { - assert_true(outer_over - outer_own_over == inner_over - 1, "mouseover: should only receive this via bubbling"); + assert_equals(outer_over - outer_own_over, inner_over - 1, "mouseover: should only receive this via bubbling"); } outer_over++; @@ -109,15 +109,15 @@ outer.addEventListener("mouseover", t.step_func(function(e) { outer.addEventListener('mouseout', t.step_func(function(e) { if (e.target == outer) { - assert_true(outer_own_over == outer_own_out + 1, "outer: mouseout is received after mouseover"); + assert_equals(outer_own_over, outer_own_out + 1, "outer: mouseout is received after mouseover"); if (outer_own_out == 1) { - assert_true(inner_out == 2, "inner should be done now"); + assert_equals(inner_out, 2, "inner should be done now"); t.done(); } outer_own_out++; } else { - assert_true(outer_out - outer_own_out == inner_out - 1, "mouseout: should only receive this via bubbling"); + assert_equals(outer_out - outer_own_out, inner_out - 1, "mouseout: should only receive this via bubbling"); } outer_out++; diff --git a/tests/wpt/web-platform-tests/url/url-searchparams.any.js b/tests/wpt/web-platform-tests/url/url-searchparams.any.js index 34d4a4b0689..9bba12e89ce 100644 --- a/tests/wpt/web-platform-tests/url/url-searchparams.any.js +++ b/tests/wpt/web-platform-tests/url/url-searchparams.any.js @@ -7,7 +7,7 @@ function runURLSearchParamTests() { var url = bURL('http://example.org/?a=b') assert_true("searchParams" in url) var searchParams = url.searchParams - assert_true(url.searchParams === searchParams, 'Object identity should hold.') + assert_equals(url.searchParams, searchParams, 'Object identity should hold.') }, 'URL.searchParams getter') test(function() { diff --git a/tests/wpt/web-platform-tests/user-timing/resources/webperftestharness.js b/tests/wpt/web-platform-tests/user-timing/resources/webperftestharness.js index 4a8e2de69fc..0433dfcc6df 100644 --- a/tests/wpt/web-platform-tests/user-timing/resources/webperftestharness.js +++ b/tests/wpt/web-platform-tests/user-timing/resources/webperftestharness.js @@ -58,25 +58,25 @@ function test_namespace(child_name, skip_root) { if (skip_root === undefined) { var msg = 'window.performance is defined'; - wp_test(function () { assert_true(performanceNamespace !== undefined, msg); }, msg); + wp_test(function () { assert_not_equals(performanceNamespace, undefined, msg); }, msg); } if (child_name !== undefined) { var msg2 = 'window.performance.' + child_name + ' is defined'; - wp_test(function() { assert_true(performanceNamespace[child_name] !== undefined, msg2); }, msg2); + wp_test(function() { assert_not_equals(performanceNamespace[child_name], undefined, msg2); }, msg2); } } function test_attribute_exists(parent_name, attribute_name, properties) { var msg = 'window.performance.' + parent_name + '.' + attribute_name + ' is defined.'; - wp_test(function() { assert_true(performanceNamespace[parent_name][attribute_name] !== undefined, msg); }, msg, properties); + wp_test(function() { assert_not_equals(performanceNamespace[parent_name][attribute_name], undefined, msg); }, msg, properties); } function test_enum(parent_name, enum_name, value, properties) { var msg = 'window.performance.' + parent_name + '.' + enum_name + ' is defined.'; - wp_test(function() { assert_true(performanceNamespace[parent_name][enum_name] !== undefined, msg); }, msg, properties); + wp_test(function() { assert_not_equals(performanceNamespace[parent_name][enum_name], undefined, msg); }, msg, properties); msg = 'window.performance.' + parent_name + '.' + enum_name + ' = ' + value; wp_test(function() { assert_equals(performanceNamespace[parent_name][enum_name], value, msg); }, msg, properties); @@ -133,5 +133,5 @@ function test_greater_or_equals(value, greater_than, msg, properties) function test_not_equals(value, notequals, msg, properties) { - wp_test(function() { assert_true(value !== notequals, msg); }, msg, properties); + wp_test(function() { assert_not_equals(value, notequals, msg); }, msg, properties); } diff --git a/tests/wpt/web-platform-tests/user-timing/resources/webperftestharnessextension.js b/tests/wpt/web-platform-tests/user-timing/resources/webperftestharnessextension.js index b682f02544e..07699efafb5 100644 --- a/tests/wpt/web-platform-tests/user-timing/resources/webperftestharnessextension.js +++ b/tests/wpt/web-platform-tests/user-timing/resources/webperftestharnessextension.js @@ -27,7 +27,7 @@ function test_method_exists(method, method_name, properties) msg = 'performance.' + method.name + ' is supported!'; else msg = 'performance.' + method_name + ' is supported!'; - wp_test(function() { assert_true(typeof method === 'function', msg); }, msg, properties); + wp_test(function() { assert_equals(typeof method, 'function', msg); }, msg, properties); } function test_method_throw_exception(func_str, exception, msg) diff --git a/tests/wpt/web-platform-tests/vibration/api-is-present.html b/tests/wpt/web-platform-tests/vibration/api-is-present.html index 8f6a7e0bb3b..70aa4047e11 100644 --- a/tests/wpt/web-platform-tests/vibration/api-is-present.html +++ b/tests/wpt/web-platform-tests/vibration/api-is-present.html @@ -19,7 +19,7 @@ diff --git a/tests/wpt/web-platform-tests/wasm/webapi/abort.any.js b/tests/wpt/web-platform-tests/wasm/webapi/abort.any.js index 8de88701c01..f5ddd353aa9 100644 --- a/tests/wpt/web-platform-tests/wasm/webapi/abort.any.js +++ b/tests/wpt/web-platform-tests/wasm/webapi/abort.any.js @@ -31,7 +31,7 @@ for (const method of methods) { return WebAssembly[method](response); }) .catch(err => { - assert_true(err.name === "AbortError"); + assert_equals(err.name, "AbortError"); }); }, `${method}() asynchronously racing with abort should succeed or reject with AbortError`); } diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/Animation/onremove.html b/tests/wpt/web-platform-tests/web-animations/interfaces/Animation/onremove.html index d7709949f2a..1a41a3d21c1 100644 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/Animation/onremove.html +++ b/tests/wpt/web-platform-tests/web-animations/interfaces/Animation/onremove.html @@ -24,7 +24,7 @@ async_test(t => { assert_equals(animA.replaceState, 'removed'); assert_equals(event.currentTime, 1); assert_true(finishedTimelineTime != null, 'finished event fired'); - assert_true(event.timelineTime == finishedTimelineTime, + assert_equals(event.timelineTime, finishedTimelineTime, 'timeline time is set'); }); diff --git a/tests/wpt/web-platform-tests/web-animations/timing-model/animations/finishing-an-animation.html b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/finishing-an-animation.html index 5a41abd7b08..fbf6558f781 100644 --- a/tests/wpt/web-platform-tests/web-animations/timing-model/animations/finishing-an-animation.html +++ b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/finishing-an-animation.html @@ -311,7 +311,7 @@ promise_test(async t => { assert_equals(animation.currentTime, null); const resolvedFinishPromise = animation.finished; - assert_true(originalFinishPromise != resolvedFinishPromise, + assert_not_equals(originalFinishPromise, resolvedFinishPromise, 'Canceling an animation should create a new finished promise'); animation.finish(); diff --git a/tests/wpt/web-platform-tests/web-animations/timing-model/animations/pausing-an-animation.html b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/pausing-an-animation.html index 4884163c1d3..dd9522cb353 100644 --- a/tests/wpt/web-platform-tests/web-animations/timing-model/animations/pausing-an-animation.html +++ b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/pausing-an-animation.html @@ -100,7 +100,7 @@ promise_test(async t => { assert_equals(animation.currentTime, null); const readyPromise = animation.ready; - assert_true(originalReadyPromise != readyPromise, + assert_not_equals(originalReadyPromise, readyPromise, 'Canceling an animation should create a new ready promise'); animation.pause(); diff --git a/tests/wpt/web-platform-tests/web-animations/timing-model/timelines/document-timelines.html b/tests/wpt/web-platform-tests/web-animations/timing-model/timelines/document-timelines.html index 4023bba5561..c71d73331c1 100644 --- a/tests/wpt/web-platform-tests/web-animations/timing-model/timelines/document-timelines.html +++ b/tests/wpt/web-platform-tests/web-animations/timing-model/timelines/document-timelines.html @@ -17,7 +17,7 @@ async_test(t => { // load fires. We expect this code to be run before document load and hence // the above assertion is sufficient. // If the following assertion fails, this test needs to be redesigned. - assert_true(document.readyState !== 'complete', + assert_not_equals(document.readyState, 'complete', 'Test is running prior to document load'); // Test that the document timeline's current time is measured from diff --git a/tests/wpt/web-platform-tests/web-locks/clientids.tentative.https.html b/tests/wpt/web-platform-tests/web-locks/clientids.tentative.https.html index 02dabfa606a..c5d066d1555 100644 --- a/tests/wpt/web-platform-tests/web-locks/clientids.tentative.https.html +++ b/tests/wpt/web-platform-tests/web-locks/clientids.tentative.https.html @@ -35,7 +35,7 @@ promise_test(async t => { // NOTE: Not assert_equals(), as we don't want log the randomly generated // clientIds, since they would not match any failure expectation files. - assert_true(lock_client_id === sw_client_id, + assert_equals(lock_client_id, sw_client_id, 'clientIds should match, but are different'); await registration.unregister(); diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-promises.https.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-promises.https.html index 8f83aac4baa..079b57b959a 100644 --- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-promises.https.html +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-promises.https.html @@ -35,7 +35,7 @@ node2.port.onmessage = resolve; }); context.close(); - assert_true(e.data == "ok", + assert_equals(e.data, "ok", `Microtask checkpoints are performed in between render quantum`); }, "test"); diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-constantsourcenode-interface/test-constantsourcenode.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-constantsourcenode-interface/test-constantsourcenode.html index 7cefde8f285..f789fe5e940 100644 --- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-constantsourcenode-interface/test-constantsourcenode.html +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-constantsourcenode-interface/test-constantsourcenode.html @@ -8,13 +8,13 @@ test(function(t) { var ac = new AudioContext(); var csn = ac.createConstantSource(); - assert_true(csn.offset.value == 1.0, "Default offset is 1.0"); + assert_equals(csn.offset.value, 1.0, "Default offset is 1.0"); csn = new ConstantSourceNode(ac); - assert_true(csn.offset.value == 1.0, "Default offset is 1.0"); + assert_equals(csn.offset.value, 1.0, "Default offset is 1.0"); csn = new ConstantSourceNode(ac, {offset: -0.25}); - assert_true(csn.offset.value == -0.25, "Offset can be set during construction"); + assert_equals(csn.offset.value, -0.25, "Offset can be set during construction"); }, "ConstantSourceNode can be constructed"); test(function(t) { @@ -44,7 +44,7 @@ async_test(function(t) { csn.stop(1024/44100) csn.onended = function(e) { t.step(function() { - assert_true(e.type == "ended", "Event type should be 'ended', received: " + e.type); + assert_equals(e.type, "ended", "Event type should be 'ended', received: " + e.type); }); t.done(); } @@ -63,9 +63,9 @@ async_test(function(t) { var result = e.renderedBuffer.getChannelData(0); for (var i = 0; i < 2048; ++i) { if (i >= 512 && i < 1024) { - assert_true(result[i] == 1.0, "sample " + i + " should equal 1.0"); + assert_equals(result[i], 1.0, "sample " + i + " should equal 1.0"); } else { - assert_true(result[i] == 0.0, "sample " + i + " should equal 0.0"); + assert_equals(result[i], 0.0, "sample " + i + " should equal 0.0"); } } }); @@ -86,7 +86,7 @@ async_test(function(t) { t.step(function() { var result = e.renderedBuffer.getChannelData(0); for (var i = 0; i < 2048; ++i) { - assert_true(result[i] == 0.25, "sample " + i + " should equal 0.25"); + assert_equals(result[i], 0.25, "sample " + i + " should equal 0.25"); } }); t.done(); diff --git a/tests/wpt/web-platform-tests/webmessaging/event.source.htm b/tests/wpt/web-platform-tests/webmessaging/event.source.htm index e270d7def04..365a5feb476 100644 --- a/tests/wpt/web-platform-tests/webmessaging/event.source.htm +++ b/tests/wpt/web-platform-tests/webmessaging/event.source.htm @@ -42,7 +42,7 @@ ActualResult.push(e.origin, "AccessCookieDenied"); } - assert_true(e.source === TARGET.contentWindow); + assert_equals(e.source, TARGET.contentWindow); assert_array_equals(ActualResult, ExpectedResult, "ActualResult"); t.done(); }); diff --git a/tests/wpt/web-platform-tests/webmessaging/event.source.xorigin.sub.htm b/tests/wpt/web-platform-tests/webmessaging/event.source.xorigin.sub.htm index 6190c9624e7..7327f786673 100644 --- a/tests/wpt/web-platform-tests/webmessaging/event.source.xorigin.sub.htm +++ b/tests/wpt/web-platform-tests/webmessaging/event.source.xorigin.sub.htm @@ -42,7 +42,7 @@ ActualResult.push(e.origin, "AccessCookieDenied"); } - assert_true(e.source.parent === window); + assert_equals(e.source.parent, window); assert_array_equals(ActualResult, ExpectedResult, "ActualResult"); t.done(); }); diff --git a/tests/wpt/web-platform-tests/webrtc-insertable-streams/RTCPeerConnection-insertable-streams-audio.https.html b/tests/wpt/web-platform-tests/webrtc-insertable-streams/RTCPeerConnection-insertable-streams-audio.https.html index aecf671854c..3d419b2b9a7 100644 --- a/tests/wpt/web-platform-tests/webrtc-insertable-streams/RTCPeerConnection-insertable-streams-audio.https.html +++ b/tests/wpt/web-platform-tests/webrtc-insertable-streams/RTCPeerConnection-insertable-streams-audio.https.html @@ -33,7 +33,7 @@ async function testAudioFlow(t, negotiationFunction) { const ontrackPromise = new Promise(resolve => { callee.ontrack = t.step_func(() => { const audioReceiver = callee.getReceivers().find(r => r.track.kind === 'audio'); - assert_true(audioReceiver !== undefined); + assert_not_equals(audioReceiver, undefined); const receiverStreams = audioReceiver.createEncodedStreams(); @@ -151,7 +151,7 @@ promise_test(async t => { const ontrackPromise = new Promise(resolve => { callee.ontrack = t.step_func(() => { const audioReceiver = callee.getReceivers().find(r => r.track.kind === 'audio'); - assert_true(audioReceiver !== undefined); + assert_not_equals(audioReceiver, undefined); assert_throws_dom("InvalidStateError", () => audioReceiver.createEncodedStreams()); resolve(); }); diff --git a/tests/wpt/web-platform-tests/webrtc-insertable-streams/RTCPeerConnection-insertable-streams-errors.https.html b/tests/wpt/web-platform-tests/webrtc-insertable-streams/RTCPeerConnection-insertable-streams-errors.https.html index 8dab9566ab5..7eb0c717857 100644 --- a/tests/wpt/web-platform-tests/webrtc-insertable-streams/RTCPeerConnection-insertable-streams-errors.https.html +++ b/tests/wpt/web-platform-tests/webrtc-insertable-streams/RTCPeerConnection-insertable-streams-errors.https.html @@ -38,7 +38,7 @@ promise_test(async t => { const ontrackPromise = new Promise(resolve => { callee.ontrack = t.step_func(() => { const videoReceiver = callee.getReceivers().find(r => r.track.kind === 'video'); - assert_true(videoReceiver !== undefined); + assert_not_equals(videoReceiver, undefined); assert_throws_dom("InvalidStateError", () => videoReceiver.createEncodedStreams()); resolve(); }); diff --git a/tests/wpt/web-platform-tests/webrtc-insertable-streams/RTCPeerConnection-insertable-streams-video.https.html b/tests/wpt/web-platform-tests/webrtc-insertable-streams/RTCPeerConnection-insertable-streams-video.https.html index 4bb757d27b4..25a41d320ef 100644 --- a/tests/wpt/web-platform-tests/webrtc-insertable-streams/RTCPeerConnection-insertable-streams-video.https.html +++ b/tests/wpt/web-platform-tests/webrtc-insertable-streams/RTCPeerConnection-insertable-streams-video.https.html @@ -33,7 +33,7 @@ async function testVideoFlow(t, negotiationFunction) { const ontrackPromise = new Promise(resolve => { callee.ontrack = t.step_func(() => { const videoReceiver = callee.getReceivers().find(r => r.track.kind === 'video'); - assert_true(videoReceiver !== undefined); + assert_not_equals(videoReceiver, undefined); const receiverStreams = videoReceiver.createEncodedStreams(); diff --git a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-connectionState.https.html b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-connectionState.https.html index 5db8272df30..d7716a1d4da 100644 --- a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-connectionState.https.html +++ b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-connectionState.https.html @@ -285,7 +285,7 @@ pc2.onconnectionstatechange = t.unreached_func(); pc2.close(); - assert_true(pc2.connectionState === 'closed'); + assert_equals(pc2.connectionState, 'closed'); await new Promise(r => t.step_timeout(r, 100)); }, 'Closing a PeerConnection should not fire connectionstatechange event'); diff --git a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState.https.html b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState.https.html index d3126065b99..320b03dfc80 100644 --- a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState.https.html +++ b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState.https.html @@ -393,7 +393,7 @@ promise_test(async t => { pc2.oniceconnectionstatechange = t.unreached_func(); pc2.close(); - assert_true(pc2.iceConnectionState === 'closed'); + assert_equals(pc2.iceConnectionState, 'closed'); await new Promise(r => t.step_timeout(r, 100)); }, 'Closing a PeerConnection should not fire iceconnectionstatechange event'); diff --git a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-onnegotiationneeded.html b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-onnegotiationneeded.html index 2eda7b5b341..a87551a58c7 100644 --- a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-onnegotiationneeded.html +++ b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-onnegotiationneeded.html @@ -288,7 +288,7 @@ removeTrack 12. Update the negotiation-needed flag for connection. */ - async_test(async t => { + promise_test(async t => { const pc = new RTCPeerConnection(); t.add_cleanup(() => pc.close()); @@ -296,20 +296,20 @@ t.add_cleanup(() => stream.getTracks().forEach(track => track.stop())); const [track] = stream.getTracks(); const sender = pc.addTrack(track, stream); - pc.onnegotiationneeded = t.step_func(async () => { - pc.onnegotiationneeded = t.step_func(async () => { - assert_unreached('onnegotiationneeded misfired'); - }); - const offer = await pc.createOffer(); - await pc.setLocalDescription(offer); - const answer = await generateAnswer(offer); - await pc.setRemoteDescription(answer); - - pc.removeTrack(sender); - await new Promise(resolve => pc.onnegotiationneeded = resolve) - t.done(); + await new Promise(resolve => pc.onnegotiationneeded = resolve); + pc.onnegotiationneeded = t.step_func(() => { + assert_unreached('onnegotiationneeded misfired'); }); + + const offer = await pc.createOffer(); + await pc.setLocalDescription(offer); + + const answer = await generateAnswer(offer); + await pc.setRemoteDescription(answer); + + pc.removeTrack(sender); + await new Promise(resolve => pc.onnegotiationneeded = resolve) }, 'removeTrack should cause negotiationneeded to fire on the caller'); /* @@ -318,7 +318,7 @@ removeTrack 12. Update the negotiation-needed flag for connection. */ - async_test(async t => { + promise_test(async t => { const caller = new RTCPeerConnection(); t.add_cleanup(() => caller.close()); caller.addTransceiver('audio', {direction:'recvonly'}); @@ -332,18 +332,17 @@ const [track] = stream.getTracks(); const sender = callee.addTrack(track, stream); - callee.onnegotiationneeded = t.step_func(async () => { - callee.onnegotiationneeded = t.step_func(async () => { - assert_unreached('onnegotiationneeded misfired'); - }); - await callee.setRemoteDescription(offer); - const answer = await callee.createAnswer(); - callee.setLocalDescription(answer); - - callee.removeTrack(sender); - await new Promise(resolve => callee.onnegotiationneeded = resolve) - t.done(); + await new Promise(resolve => callee.onnegotiationneeded = resolve); + callee.onnegotiationneeded = t.step_func(() => { + assert_unreached('onnegotiationneeded misfired'); }); + + await callee.setRemoteDescription(offer); + const answer = await callee.createAnswer(); + callee.setLocalDescription(answer); + + callee.removeTrack(sender); + await new Promise(resolve => callee.onnegotiationneeded = resolve) }, 'removeTrack should cause negotiationneeded to fire on the callee'); /* diff --git a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-onsignalingstatechanged.https.html b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-onsignalingstatechanged.https.html index fa096c1fb60..ad92bf5fc60 100644 --- a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-onsignalingstatechanged.https.html +++ b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-onsignalingstatechanged.https.html @@ -49,7 +49,7 @@ promise_test(async t => { pc2.onsignalingstatechange = t.unreached_func(); pc2.close(); - assert_true(pc2.signalingState === 'closed'); + assert_equals(pc2.signalingState, 'closed'); await new Promise(r => t.step_timeout(r, 100)); }, 'Closing a PeerConnection should not fire signalingstatechange event'); diff --git a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-track-stats.https.html b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-track-stats.https.html index 83c9f1916cd..7b43e4e0bb4 100644 --- a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-track-stats.https.html +++ b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-track-stats.https.html @@ -235,7 +235,7 @@ t.add_cleanup(() => callee.close()); let receivingTrack; callee.ontrack = trackEvent => { - assert_true(receivingTrack == undefined, 'ontrack has not fired before'); + assert_equals(receivingTrack, undefined, 'ontrack has not fired before'); receivingTrack = trackEvent.track; }; return getUserMediaTracksAndStreams(1) @@ -396,7 +396,7 @@ assert_true(trackStats.objectDeleted); let outboundStats = findStatsByTypeAndMember(report, 'outbound-rtp', 'trackId', trackStats.id); - assert_true(outboundStats == null, + assert_equals(outboundStats, null, 'The outbound RTP stream should no longer reference the ' + 'original attachment'); t.done(); diff --git a/tests/wpt/web-platform-tests/webrtc/RTCRtpSender-encode-same-track-twice.https.html b/tests/wpt/web-platform-tests/webrtc/RTCRtpSender-encode-same-track-twice.https.html new file mode 100644 index 00000000000..568543da70f --- /dev/null +++ b/tests/wpt/web-platform-tests/webrtc/RTCRtpSender-encode-same-track-twice.https.html @@ -0,0 +1,66 @@ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webrtc/RTCSctpTransport-constructor.html b/tests/wpt/web-platform-tests/webrtc/RTCSctpTransport-constructor.html index 58c883d5337..484967f76b5 100644 --- a/tests/wpt/web-platform-tests/webrtc/RTCSctpTransport-constructor.html +++ b/tests/wpt/web-platform-tests/webrtc/RTCSctpTransport-constructor.html @@ -86,7 +86,7 @@ function validateSctpTransport(sctp) { assert_equals(sctp.state, 'connecting', 'RTCSctpTransport should be in the connecting state'); // Note: Yes, Number.POSITIVE_INFINITY is also a 'number' - assert_true(typeof sctp.maxMessageSize === 'number', + assert_equals(typeof sctp.maxMessageSize, 'number', 'Expect sctp.maxMessageSize to be a number'); } diff --git a/tests/wpt/web-platform-tests/webrtc/protocol/crypto-suite.https.html b/tests/wpt/web-platform-tests/webrtc/protocol/crypto-suite.https.html index f1b60561a14..f13f221b88d 100644 --- a/tests/wpt/web-platform-tests/webrtc/protocol/crypto-suite.https.html +++ b/tests/wpt/web-platform-tests/webrtc/protocol/crypto-suite.https.html @@ -45,7 +45,7 @@ const acceptableValues = { }; function verifyStat(name, transportStats) { - assert_true(typeof transportStats !== 'undefined'); + assert_not_equals(typeof transportStats, 'undefined'); assert_true(name in transportStats, 'Value present:'); assert_true(acceptableValues[name].has(transportStats[name])); } diff --git a/tests/wpt/web-platform-tests/webxr/dom-overlay/ar_dom_overlay.https.html b/tests/wpt/web-platform-tests/webxr/dom-overlay/ar_dom_overlay.https.html index 27837e12681..78a8ba2080a 100644 --- a/tests/wpt/web-platform-tests/webxr/dom-overlay/ar_dom_overlay.https.html +++ b/tests/wpt/web-platform-tests/webxr/dom-overlay/ar_dom_overlay.https.html @@ -53,7 +53,7 @@ let testBasicProperties = function(overlayElement, session, fakeDeviceController ["screen", "floating", "head-locked"]); // Verify SameObject property for domOverlayState - assert_true(session.domOverlayState === session.domOverlayState); + assert_equals(session.domOverlayState, session.domOverlayState); // The overlay element should have a transparent background. assert_equals(window.getComputedStyle(overlayElement).backgroundColor, diff --git a/tests/wpt/web-platform-tests/webxr/xrBoundedReferenceSpace_updates.https.html b/tests/wpt/web-platform-tests/webxr/xrBoundedReferenceSpace_updates.https.html index 3d504043665..bb4cb2c4c4c 100644 --- a/tests/wpt/web-platform-tests/webxr/xrBoundedReferenceSpace_updates.https.html +++ b/tests/wpt/web-platform-tests/webxr/xrBoundedReferenceSpace_updates.https.html @@ -27,7 +27,7 @@ let testFunction = function(session, fakeDeviceController, t) { t.step(() => { // A bounded space may be created if no bounds have been set but the system has the capability to support bounded-floor // A lack of bounds is indicated by an empty boundsGeometry - assert_true(referenceSpace.boundsGeometry.length == 0); + assert_equals(referenceSpace.boundsGeometry.length, 0); }); function onFrame(time, xrFrame) { diff --git a/tests/wpt/web-platform-tests/webxr/xrRigidTransform_inverse.https.html b/tests/wpt/web-platform-tests/webxr/xrRigidTransform_inverse.https.html index 3098fb64936..79acca9ae1a 100644 --- a/tests/wpt/web-platform-tests/webxr/xrRigidTransform_inverse.https.html +++ b/tests/wpt/web-platform-tests/webxr/xrRigidTransform_inverse.https.html @@ -93,10 +93,10 @@ let testFunction = { x: 0.0, y: 0.0, z: 1.0, w: 1.0 }); inverse_transform = transform.inverse; t.step(() => { - assert_true(transform.inverse === inverse_transform); - assert_true(inverse_transform.inverse === transform); - assert_true(transform.inverse.inverse === transform); - assert_true(transform.inverse.inverse.inverse === inverse_transform); + assert_equals(transform.inverse, inverse_transform); + assert_equals(inverse_transform.inverse, transform); + assert_equals(transform.inverse.inverse, transform); + assert_equals(transform.inverse.inverse.inverse, inverse_transform); }); resolve(); diff --git a/tests/wpt/web-platform-tests/workers/SharedWorkerPerformanceNow.html b/tests/wpt/web-platform-tests/workers/SharedWorkerPerformanceNow.html index a784293b342..1fd94632944 100644 --- a/tests/wpt/web-platform-tests/workers/SharedWorkerPerformanceNow.html +++ b/tests/wpt/web-platform-tests/workers/SharedWorkerPerformanceNow.html @@ -11,7 +11,7 @@ async_test(function(t) { const worker = new SharedWorker('support/WorkerSendingPerformanceNow.js'); worker.port.onmessage = t.step_func(event => { const results = event.data; - assert_true(results.length == 4); + assert_equals(results.length, 4); assert_equals(results[0], 'undefined', 'workerStart not defined on the Worker object'); assert_equals(results[1], 'object', 'self.performance is defined'); diff --git a/tests/wpt/web-platform-tests/workers/Worker-base64.any.js b/tests/wpt/web-platform-tests/workers/Worker-base64.any.js index 3aeab9045bb..6a46b477848 100644 --- a/tests/wpt/web-platform-tests/workers/Worker-base64.any.js +++ b/tests/wpt/web-platform-tests/workers/Worker-base64.any.js @@ -1,5 +1,5 @@ // META: global=worker test(() => { - assert_true(typeof atob === 'function'); - assert_true(typeof btoa === 'function'); + assert_equals(typeof atob, 'function'); + assert_equals(typeof btoa, 'function'); }, 'Tests that atob() / btoa() functions are exposed to workers'); diff --git a/tests/wpt/web-platform-tests/workers/WorkerPerformanceNow.html b/tests/wpt/web-platform-tests/workers/WorkerPerformanceNow.html index 467dad44e20..286832fd947 100644 --- a/tests/wpt/web-platform-tests/workers/WorkerPerformanceNow.html +++ b/tests/wpt/web-platform-tests/workers/WorkerPerformanceNow.html @@ -11,7 +11,7 @@ async_test(function(t) { const worker = new Worker('support/WorkerSendingPerformanceNow.js'); worker.onmessage = t.step_func_done(event => { const results = event.data; - assert_true(results.length == 4); + assert_equals(results.length, 4); assert_equals(results[0], 'undefined', 'workerStart not defined on the Worker object'); assert_equals(results[1], 'object', "self.performance is defined");