diff --git a/tests/wpt/meta-legacy-layout/css/CSS2/linebox/inline-negative-margin-001.html.ini b/tests/wpt/meta-legacy-layout/css/CSS2/linebox/inline-negative-margin-001.html.ini index a057f038339..5e3a96e5999 100644 --- a/tests/wpt/meta-legacy-layout/css/CSS2/linebox/inline-negative-margin-001.html.ini +++ b/tests/wpt/meta-legacy-layout/css/CSS2/linebox/inline-negative-margin-001.html.ini @@ -8,8 +8,5 @@ [[data-expected-height\] 3] expected: FAIL - [[data-expected-height\] 1] - expected: FAIL - - [[data-expected-height\] 2] + [[data-expected-height\] 4] expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-backgrounds/background-attachment-fixed-block-002.html.ini b/tests/wpt/meta-legacy-layout/css/css-backgrounds/background-attachment-fixed-block-002.html.ini new file mode 100644 index 00000000000..ca625acb04e --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-backgrounds/background-attachment-fixed-block-002.html.ini @@ -0,0 +1,2 @@ +[background-attachment-fixed-block-002.html] + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/css/css-backgrounds/background-attachment-fixed-inline-002.html.ini b/tests/wpt/meta-legacy-layout/css/css-backgrounds/background-attachment-fixed-inline-002.html.ini new file mode 100644 index 00000000000..8aed3b627cc --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-backgrounds/background-attachment-fixed-inline-002.html.ini @@ -0,0 +1,2 @@ +[background-attachment-fixed-inline-002.html] + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/css/css-backgrounds/background-attachment-local-block-002.html.ini b/tests/wpt/meta-legacy-layout/css/css-backgrounds/background-attachment-local-block-002.html.ini new file mode 100644 index 00000000000..3e8d684d0bc --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-backgrounds/background-attachment-local-block-002.html.ini @@ -0,0 +1,2 @@ +[background-attachment-local-block-002.html] + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/css/css-backgrounds/background-attachment-local-inline-002.html.ini b/tests/wpt/meta-legacy-layout/css/css-backgrounds/background-attachment-local-inline-002.html.ini new file mode 100644 index 00000000000..8a3017380d9 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-backgrounds/background-attachment-local-inline-002.html.ini @@ -0,0 +1,2 @@ +[background-attachment-local-inline-002.html] + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/css/css-text/parsing/text-spacing-computed.html.ini b/tests/wpt/meta-legacy-layout/css/css-text/parsing/text-spacing-computed.html.ini index 5aa68b9f2d9..45a3efb1821 100644 --- a/tests/wpt/meta-legacy-layout/css/css-text/parsing/text-spacing-computed.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-text/parsing/text-spacing-computed.html.ini @@ -43,3 +43,18 @@ [Property text-spacing value 'normal no-autospace'] expected: FAIL + + [Property text-spacing value 'normal normal'] + expected: FAIL + + [Property text-spacing value 'normal trim-start'] + expected: FAIL + + [Property text-spacing value 'no-autospace trim-start'] + expected: FAIL + + [Property text-spacing value 'trim-start normal '] + expected: FAIL + + [Property text-spacing value 'trim-start no-autospace'] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-text/parsing/text-spacing-valid.html.ini b/tests/wpt/meta-legacy-layout/css/css-text/parsing/text-spacing-valid.html.ini index 7b223b35219..7511f02e797 100644 --- a/tests/wpt/meta-legacy-layout/css/css-text/parsing/text-spacing-valid.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-text/parsing/text-spacing-valid.html.ini @@ -43,3 +43,18 @@ [e.style['text-spacing'\] = "normal no-autospace" should set the property value] expected: FAIL + + [e.style['text-spacing'\] = "normal normal" should set the property value] + expected: FAIL + + [e.style['text-spacing'\] = "normal trim-start" should set the property value] + expected: FAIL + + [e.style['text-spacing'\] = "no-autospace trim-start" should set the property value] + expected: FAIL + + [e.style['text-spacing'\] = "trim-start normal " should set the property value] + expected: FAIL + + [e.style['text-spacing'\] = "trim-start no-autospace" should set the property value] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-values/progress-computed.tentative.html.ini b/tests/wpt/meta-legacy-layout/css/css-values/progress-computed.tentative.html.ini index 47102f89bf6..9593c6f5110 100644 --- a/tests/wpt/meta-legacy-layout/css/css-values/progress-computed.tentative.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-values/progress-computed.tentative.html.ini @@ -64,3 +64,21 @@ [scale(progress(1000em from 10rem to 110em)) should be used-value-equivalent to scale(9.9)] expected: FAIL + + [calc(progress(sign(1001em - 10lh * progress(100px from 2rex to 10ex)) * 10em from 2rem to 12em) / 2) should be used-value-equivalent to 0.4] + expected: FAIL + + [calc(progress(sign(1001em - 10lh * progress(100px from 2rex to 10ex)) * 20em from 2rem to 12em) * 10) should be used-value-equivalent to 18] + expected: FAIL + + [calc(progress(sign(1001em - 10lh * progress(100px from 2rex to 10ex)) * 20em from 2rem to 12em) * 30) should be used-value-equivalent to 54] + expected: FAIL + + [calc(progress(sign(1001em - 10lh * progress(100px from 2rex to 10ex)) * 20em from 2rem to 12em) / 4) should be used-value-equivalent to 0.45] + expected: FAIL + + [calc(progress(sign(1001em - 10lh * progress(100px from 2rex to 10ex)) * 20em from 2rem to 12em) * 4) should be used-value-equivalent to 7] + expected: FAIL + + [calc(progress(sign(1001em - 10lh * progress(100px from 2rex to 10ex)) * 20em from 2rem to 12em) * 2) should be used-value-equivalent to 3.6] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini b/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini index d52a3e77a70..314dca9c1f5 100644 --- a/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini +++ b/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini @@ -1,6 +1,3 @@ [MediaQueryList-addListener-removeListener.html] [listeners are called when + + diff --git a/tests/wpt/tests/css/css-view-transitions/parsing/view-transition-class-computed.html b/tests/wpt/tests/css/css-view-transitions/parsing/view-transition-class-computed.html new file mode 100644 index 00000000000..74151c46da9 --- /dev/null +++ b/tests/wpt/tests/css/css-view-transitions/parsing/view-transition-class-computed.html @@ -0,0 +1,29 @@ + + + + +CSS View Transitions: view-transition-class with computed values + + + + + + + + +
+ + + diff --git a/tests/wpt/tests/css/css-view-transitions/parsing/view-transition-class-invalid.html b/tests/wpt/tests/css/css-view-transitions/parsing/view-transition-class-invalid.html new file mode 100644 index 00000000000..9d41589bf22 --- /dev/null +++ b/tests/wpt/tests/css/css-view-transitions/parsing/view-transition-class-invalid.html @@ -0,0 +1,24 @@ + + + + +CSS View Transitions Test: view-transition-class with invalid values + + + + + + + + + + + diff --git a/tests/wpt/tests/css/css-view-transitions/parsing/view-transition-class-valid.html b/tests/wpt/tests/css/css-view-transitions/parsing/view-transition-class-valid.html new file mode 100644 index 00000000000..480f40ca161 --- /dev/null +++ b/tests/wpt/tests/css/css-view-transitions/parsing/view-transition-class-valid.html @@ -0,0 +1,23 @@ + + + + +CSS View Transitions Test: view-transition-class with valid values + + + + + + + + + + + diff --git a/tests/wpt/tests/css/css-viewport/META.yml b/tests/wpt/tests/css/css-viewport/META.yml new file mode 100644 index 00000000000..0c4122a8a54 --- /dev/null +++ b/tests/wpt/tests/css/css-viewport/META.yml @@ -0,0 +1,4 @@ +spec: https://drafts.csswg.org/css-viewport/ +suggested_reviewers: + - AutomatedTester + - chrishtr diff --git a/tests/wpt/tests/css/css-viewport/computedStyle-zoom.html b/tests/wpt/tests/css/css-viewport/computedStyle-zoom.html new file mode 100644 index 00000000000..30ed78e30b6 --- /dev/null +++ b/tests/wpt/tests/css/css-viewport/computedStyle-zoom.html @@ -0,0 +1,75 @@ + +getComputedStyle for elements with css zoom + + + + + + + + + +
+
+
+
+
+
+ + diff --git a/tests/wpt/tests/css/cssom-view/image-x-y-zoom.html b/tests/wpt/tests/css/cssom-view/image-x-y-zoom.html new file mode 100644 index 00000000000..4717dcbd9d4 --- /dev/null +++ b/tests/wpt/tests/css/cssom-view/image-x-y-zoom.html @@ -0,0 +1,66 @@ + +x and y properties for image elements with css zoom + + + + + + + + + +
+ + +
+ +
+ + + +
+ + diff --git a/tests/wpt/tests/css/filter-effects/blur-text-ref.html b/tests/wpt/tests/css/filter-effects/blur-text-ref.html new file mode 100644 index 00000000000..3f57da1f706 --- /dev/null +++ b/tests/wpt/tests/css/filter-effects/blur-text-ref.html @@ -0,0 +1,6 @@ + + + +

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ac diam risus. Aenean condimentum velit in arcu gravida, vel placerat nibh eleifend. Phasellus purus dolor, interdum sed quam vel, auctor pretium odio. Aliquam urna tortor, dictum ut dapibus quis, euismod eget diam. Vestibulum ultrices dapibus ornare. Morbi tempor diam urna, nec sollicitudin nunc mollis sed. Curabitur id turpis leo. Mauris semper felis felis, sit amet pretium sem imperdiet sit amet. Vivamus tincidunt dictum sapien nec faucibus. Vivamus blandit magna sit amet interdum faucibus.

+ + diff --git a/tests/wpt/tests/css/filter-effects/blur-text.html b/tests/wpt/tests/css/filter-effects/blur-text.html new file mode 100644 index 00000000000..cfb692386bb --- /dev/null +++ b/tests/wpt/tests/css/filter-effects/blur-text.html @@ -0,0 +1,8 @@ + + +Blur text + + + +

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ac diam risus. Aenean condimentum velit in arcu gravida, vel placerat nibh eleifend. Phasellus purus dolor, interdum sed quam vel, auctor pretium odio. Aliquam urna tortor, dictum ut dapibus quis, euismod eget diam. Vestibulum ultrices dapibus ornare. Morbi tempor diam urna, nec sollicitudin nunc mollis sed. Curabitur id turpis leo. Mauris semper felis felis, sit amet pretium sem imperdiet sit amet. Vivamus tincidunt dictum sapien nec faucibus. Vivamus blandit magna sit amet interdum faucibus.

+ diff --git a/tests/wpt/tests/css/selectors/parsing/parse-part.html b/tests/wpt/tests/css/selectors/parsing/parse-part.html index 2fbec3670ce..c166fd7765b 100644 --- a/tests/wpt/tests/css/selectors/parsing/parse-part.html +++ b/tests/wpt/tests/css/selectors/parsing/parse-part.html @@ -31,9 +31,9 @@ test_invalid_selector(":part('foo')"); test_invalid_selector(":part([foo])"); test_invalid_selector('::part(foo) + ::part(bar)'); - test_invalid_selector("::part(foo):is(ul)"); - test_invalid_selector("::part(foo):is(nav ul)"); - test_invalid_selector("::part(foo):where(ul)"); - test_invalid_selector("::part(foo):where(nav ul)"); + test_valid_forgiving_selector("::part(foo):is(ul)"); + test_valid_forgiving_selector("::part(foo):is(nav ul)"); + test_valid_forgiving_selector("::part(foo):where(ul)"); + test_valid_forgiving_selector("::part(foo):where(nav ul)"); test_invalid_selector("::part(foo):has(li)"); diff --git a/tests/wpt/tests/dom/events/scrolling/scrollend-event-fires-on-visual-viewport.html b/tests/wpt/tests/dom/events/scrolling/scrollend-event-fires-on-visual-viewport.html new file mode 100644 index 00000000000..5e3af7966e7 --- /dev/null +++ b/tests/wpt/tests/dom/events/scrolling/scrollend-event-fires-on-visual-viewport.html @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + +
+ + + diff --git a/tests/wpt/tests/editing/crashtests/set-selection-range-after-updating-textarea-default-value.html b/tests/wpt/tests/editing/crashtests/set-selection-range-after-updating-textarea-default-value.html new file mode 100644 index 00000000000..421306fc961 --- /dev/null +++ b/tests/wpt/tests/editing/crashtests/set-selection-range-after-updating-textarea-default-value.html @@ -0,0 +1,16 @@ + + + + + + + diff --git a/tests/wpt/tests/editing/edit-context/edit-context-basics.tentative.html b/tests/wpt/tests/editing/edit-context/edit-context-basics.tentative.html index 0ed34580613..54d49dab4a6 100644 --- a/tests/wpt/tests/editing/edit-context/edit-context-basics.tentative.html +++ b/tests/wpt/tests/editing/edit-context/edit-context-basics.tentative.html @@ -115,8 +115,8 @@ editContext.updateSelection(0, 0); assert_equals(editContext.selectionStart, 0); assert_equals(editContext.selectionEnd, 0); - assert_throws_dom("IndexSizeError", function() { editContext.updateSelection(1, 0); }); - assert_equals(editContext.selectionStart, 0); + editContext.updateSelection(1, 0); + assert_equals(editContext.selectionStart, 1); assert_equals(editContext.selectionEnd, 0); editContext.updateSelection(0, 1); assert_equals(editContext.selectionStart, 0); @@ -151,17 +151,29 @@ assert_equals(actualRectArray[1].height, 400); }, 'updateCharacterBounds(), characterBounds(), and characterBoundsRangeStart should work properly'); + // The behavior in this test case is not well-defined in the spec. + // See https://github.com/w3c/edit-context/issues/88 + // test(function() { + // const editContext = new EditContext(); + // assert_not_equals(editContext, null); + // editContext.updateText(0, 3, "foo"); + // assert_equals(editContext.text, "foo"); + // assert_throws_dom("IndexSizeError", function() { editContext.updateSelection(10, 0); }); + // assert_equals(editContext.selectionStart, 0); + // assert_equals(editContext.selectionEnd, 0); + // assert_throws_dom("IndexSizeError", function() { editContext.updateText(10, 1, "h"); }); + // assert_equals(editContext.text, "foo"); + // }, 'Testing EditContext update text and selection with invalid values'); + test(function() { const editContext = new EditContext(); assert_not_equals(editContext, null); editContext.updateText(0, 3, "foo"); assert_equals(editContext.text, "foo"); - assert_throws_dom("IndexSizeError", function() { editContext.updateSelection(10, 0); }); - assert_equals(editContext.selectionStart, 0); + editContext.updateSelection(3, 0); + assert_equals(editContext.selectionStart, 3); assert_equals(editContext.selectionEnd, 0); - assert_throws_dom("IndexSizeError", function() { editContext.updateText(10, 1, "h"); }); - assert_equals(editContext.text, "foo"); - }, 'Testing EditContext update text and selection with invalid values'); + }, 'EditContext should allow a backwards selection'); diff --git a/tests/wpt/tests/editing/edit-context/edit-context-input.tentative.html b/tests/wpt/tests/editing/edit-context/edit-context-input.tentative.html index 3285453cc2c..3a65ab996cb 100644 --- a/tests/wpt/tests/editing/edit-context/edit-context-input.tentative.html +++ b/tests/wpt/tests/editing/edit-context/edit-context-input.tentative.html @@ -10,6 +10,9 @@ + + + + + +

2d.layer.malformed-operations-with-promises.createImageBitmap

+

Check that exceptions are thrown for operations that are malformed while layers are open.

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.malformed-operations-with-promises.toBlob.html b/tests/wpt/tests/html/canvas/element/layers/2d.layer.malformed-operations-with-promises.toBlob.html new file mode 100644 index 00000000000..6c69bb37842 --- /dev/null +++ b/tests/wpt/tests/html/canvas/element/layers/2d.layer.malformed-operations-with-promises.toBlob.html @@ -0,0 +1,34 @@ + + +Canvas test: 2d.layer.malformed-operations-with-promises.toBlob + + + + + + +

2d.layer.malformed-operations-with-promises.toBlob

+

Check that exceptions are thrown for operations that are malformed while layers are open.

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.malformed-operations.createPattern.html b/tests/wpt/tests/html/canvas/element/layers/2d.layer.malformed-operations.createPattern.html new file mode 100644 index 00000000000..f927b96524d --- /dev/null +++ b/tests/wpt/tests/html/canvas/element/layers/2d.layer.malformed-operations.createPattern.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.layer.malformed-operations.createPattern + + + + + + +

2d.layer.malformed-operations.createPattern

+

Check that exceptions are thrown for operations that are malformed while layers are open.

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.malformed-operations.drawImage.html b/tests/wpt/tests/html/canvas/element/layers/2d.layer.malformed-operations.drawImage.html new file mode 100644 index 00000000000..8bcc89d38e5 --- /dev/null +++ b/tests/wpt/tests/html/canvas/element/layers/2d.layer.malformed-operations.drawImage.html @@ -0,0 +1,35 @@ + + +Canvas test: 2d.layer.malformed-operations.drawImage + + + + + + +

2d.layer.malformed-operations.drawImage

+

Check that exceptions are thrown for operations that are malformed while layers are open.

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.malformed-operations.getImageData.html b/tests/wpt/tests/html/canvas/element/layers/2d.layer.malformed-operations.getImageData.html new file mode 100644 index 00000000000..5dc3fcc017c --- /dev/null +++ b/tests/wpt/tests/html/canvas/element/layers/2d.layer.malformed-operations.getImageData.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.layer.malformed-operations.getImageData + + + + + + +

2d.layer.malformed-operations.getImageData

+

Check that exceptions are thrown for operations that are malformed while layers are open.

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.putImageData.html b/tests/wpt/tests/html/canvas/element/layers/2d.layer.malformed-operations.putImageData.html similarity index 54% rename from tests/wpt/tests/html/canvas/element/layers/2d.layer.putImageData.html rename to tests/wpt/tests/html/canvas/element/layers/2d.layer.malformed-operations.putImageData.html index 1e4d3331d8f..fd4fc262c20 100644 --- a/tests/wpt/tests/html/canvas/element/layers/2d.layer.putImageData.html +++ b/tests/wpt/tests/html/canvas/element/layers/2d.layer.malformed-operations.putImageData.html @@ -1,34 +1,35 @@ -Canvas test: 2d.layer.putImageData +Canvas test: 2d.layer.malformed-operations.putImageData -

2d.layer.putImageData

-

Check that calling putImageData in a layer throws an exception.

+

2d.layer.malformed-operations.putImageData

+

Check that exceptions are thrown for operations that are malformed while layers are open.

Actual output:

-

FAIL (fallback content)

+

FAIL (fallback content)

diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.malformed-operations.toDataURL.html b/tests/wpt/tests/html/canvas/element/layers/2d.layer.malformed-operations.toDataURL.html new file mode 100644 index 00000000000..c9bb4f38750 --- /dev/null +++ b/tests/wpt/tests/html/canvas/element/layers/2d.layer.malformed-operations.toDataURL.html @@ -0,0 +1,33 @@ + + +Canvas test: 2d.layer.malformed-operations.toDataURL + + + + + + +

2d.layer.malformed-operations.toDataURL

+

Check that exceptions are thrown for operations that are malformed while layers are open.

+ + +

Actual output:

+

FAIL (fallback content)

+ + + + diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.createImageBitmap-expected.html b/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.createImageBitmap-expected.html deleted file mode 100644 index de03ea6392a..00000000000 --- a/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.createImageBitmap-expected.html +++ /dev/null @@ -1,32 +0,0 @@ - - -Canvas test: 2d.layer.render-opportunities.createImageBitmap -

2d.layer.render-opportunities.createImageBitmap

-

Check that layers state stack is flushed and rebuilt on frame renders.

- -

FAIL (fallback content)

-
- diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.createImageBitmap.html b/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.createImageBitmap.html deleted file mode 100644 index 9b3d79c9f92..00000000000 --- a/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.createImageBitmap.html +++ /dev/null @@ -1,32 +0,0 @@ - - - -Canvas test: 2d.layer.render-opportunities.createImageBitmap -

2d.layer.render-opportunities.createImageBitmap

-

Check that layers state stack is flushed and rebuilt on frame renders.

- -

FAIL (fallback content)

-
- diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.drawImage-expected.html b/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.drawImage-expected.html deleted file mode 100644 index 378f85636b8..00000000000 --- a/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.drawImage-expected.html +++ /dev/null @@ -1,32 +0,0 @@ - - -Canvas test: 2d.layer.render-opportunities.drawImage -

2d.layer.render-opportunities.drawImage

-

Check that layers state stack is flushed and rebuilt on frame renders.

- -

FAIL (fallback content)

-
- diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.drawImage.html b/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.drawImage.html deleted file mode 100644 index ea669f304f2..00000000000 --- a/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.drawImage.html +++ /dev/null @@ -1,34 +0,0 @@ - - - -Canvas test: 2d.layer.render-opportunities.drawImage -

2d.layer.render-opportunities.drawImage

-

Check that layers state stack is flushed and rebuilt on frame renders.

- -

FAIL (fallback content)

-
- diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.getImageData-expected.html b/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.getImageData-expected.html deleted file mode 100644 index 919a75911e7..00000000000 --- a/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.getImageData-expected.html +++ /dev/null @@ -1,32 +0,0 @@ - - -Canvas test: 2d.layer.render-opportunities.getImageData -

2d.layer.render-opportunities.getImageData

-

Check that layers state stack is flushed and rebuilt on frame renders.

- -

FAIL (fallback content)

-
- diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.getImageData.html b/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.getImageData.html deleted file mode 100644 index fce2e368a21..00000000000 --- a/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.getImageData.html +++ /dev/null @@ -1,32 +0,0 @@ - - - -Canvas test: 2d.layer.render-opportunities.getImageData -

2d.layer.render-opportunities.getImageData

-

Check that layers state stack is flushed and rebuilt on frame renders.

- -

FAIL (fallback content)

-
- diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.requestAnimationFrame-expected.html b/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.requestAnimationFrame-expected.html deleted file mode 100644 index 9ec5b605154..00000000000 --- a/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.requestAnimationFrame-expected.html +++ /dev/null @@ -1,35 +0,0 @@ - - - -Canvas test: 2d.layer.render-opportunities.requestAnimationFrame -

2d.layer.render-opportunities.requestAnimationFrame

-

Check that layers state stack is flushed and rebuilt on frame renders.

- -

FAIL (fallback content)

-
- - \ No newline at end of file diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.toBlob.html b/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.toBlob.html deleted file mode 100644 index f3d5fe904ee..00000000000 --- a/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.toBlob.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - -Canvas test: 2d.layer.render-opportunities.toBlob -

2d.layer.render-opportunities.toBlob

-

Check that layers state stack is flushed and rebuilt on frame renders.

- -

FAIL (fallback content)

-
- - \ No newline at end of file diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.toDataURL-expected.html b/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.toDataURL-expected.html deleted file mode 100644 index 49309991cb5..00000000000 --- a/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.toDataURL-expected.html +++ /dev/null @@ -1,32 +0,0 @@ - - -Canvas test: 2d.layer.render-opportunities.toDataURL -

2d.layer.render-opportunities.toDataURL

-

Check that layers state stack is flushed and rebuilt on frame renders.

- -

FAIL (fallback content)

-
- diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.toDataURL.html b/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.toDataURL.html deleted file mode 100644 index d9f433344d5..00000000000 --- a/tests/wpt/tests/html/canvas/element/layers/2d.layer.render-opportunities.toDataURL.html +++ /dev/null @@ -1,32 +0,0 @@ - - - -Canvas test: 2d.layer.render-opportunities.toDataURL -

2d.layer.render-opportunities.toDataURL

-

Check that layers state stack is flushed and rebuilt on frame renders.

- -

FAIL (fallback content)

-
- diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.unclosed-expected.html b/tests/wpt/tests/html/canvas/element/manual/layers/unclosed-layers-expected.html similarity index 73% rename from tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.unclosed-expected.html rename to tests/wpt/tests/html/canvas/element/manual/layers/unclosed-layers-expected.html index 625630f5e6b..04a6d07fdab 100644 --- a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.unclosed-expected.html +++ b/tests/wpt/tests/html/canvas/element/manual/layers/unclosed-layers-expected.html @@ -1,7 +1,6 @@ - -Canvas test: 2d.layer.unclosed -

2d.layer.unclosed

+Canvas test: unclosed-layers +

unclosed-layers

Check that layers are rendered even if not closed.

FAIL (fallback content)

@@ -15,9 +14,8 @@ ctx.globalAlpha = 0.5; ctx.beginLayer({filter: {name: 'dropShadow', dx: -2, dy: 2}}); - ctx.fillStyle = 'purple'; ctx.fillRect(40, 40, 75, 50); ctx.fillStyle = 'grey'; ctx.fillRect(50, 50, 75, 50); ctx.endLayer(); - + \ No newline at end of file diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.unclosed.html b/tests/wpt/tests/html/canvas/element/manual/layers/unclosed-layers.html similarity index 70% rename from tests/wpt/tests/html/canvas/element/layers/2d.layer.unclosed.html rename to tests/wpt/tests/html/canvas/element/manual/layers/unclosed-layers.html index 3d4530860f3..4ae110d4a67 100644 --- a/tests/wpt/tests/html/canvas/element/layers/2d.layer.unclosed.html +++ b/tests/wpt/tests/html/canvas/element/manual/layers/unclosed-layers.html @@ -1,8 +1,7 @@ - - -Canvas test: 2d.layer.unclosed -

2d.layer.unclosed

+ +Canvas test: unclosed-layers +

unclosed-layers

Check that layers are rendered even if not closed.

FAIL (fallback content)

@@ -19,4 +18,4 @@ ctx.fillRect(40, 40, 75, 50); ctx.fillStyle = 'grey'; ctx.fillRect(50, 50, 75, 50); - + \ No newline at end of file diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.unclosed-nested-expected.html b/tests/wpt/tests/html/canvas/element/manual/layers/unclosed-nested-layers-expected.html similarity index 82% rename from tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.unclosed-nested-expected.html rename to tests/wpt/tests/html/canvas/element/manual/layers/unclosed-nested-layers-expected.html index 5e90134a250..9a848b46d71 100644 --- a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.unclosed-nested-expected.html +++ b/tests/wpt/tests/html/canvas/element/manual/layers/unclosed-nested-layers-expected.html @@ -1,7 +1,6 @@ - -Canvas test: 2d.layer.unclosed-nested -

2d.layer.unclosed-nested

+Canvas test: unclosed-nested-layers +

unclosed-nested-layers

Check that layers are rendered even if not closed.

FAIL (fallback content)

diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.unclosed-nested.html b/tests/wpt/tests/html/canvas/element/manual/layers/unclosed-nested-layers.html similarity index 71% rename from tests/wpt/tests/html/canvas/element/layers/2d.layer.unclosed-nested.html rename to tests/wpt/tests/html/canvas/element/manual/layers/unclosed-nested-layers.html index c02aae4af11..beb1cf9aa1f 100644 --- a/tests/wpt/tests/html/canvas/element/layers/2d.layer.unclosed-nested.html +++ b/tests/wpt/tests/html/canvas/element/manual/layers/unclosed-nested-layers.html @@ -1,8 +1,7 @@ - - -Canvas test: 2d.layer.unclosed-nested -

2d.layer.unclosed-nested

+ +Canvas test: unclosed-nested-layers +

unclosed-nested-layers

Check that layers are rendered even if not closed.

FAIL (fallback content)

@@ -25,4 +24,4 @@ ctx.endLayer(); // Missing ctx.endLayer() here. - + \ No newline at end of file diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.convertToBlob.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.convertToBlob.html new file mode 100644 index 00000000000..0b3854c31d0 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.convertToBlob.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.layer.malformed-operations-with-promises.convertToBlob + + + + +

2d.layer.malformed-operations-with-promises.convertToBlob

+

Check that exceptions are thrown for operations that are malformed while layers are open.

+ + + diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.convertToBlob.worker.js b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.convertToBlob.worker.js new file mode 100644 index 00000000000..be0f4f2cdee --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.convertToBlob.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.malformed-operations-with-promises.convertToBlob +// Description:Check that exceptions are thrown for operations that are malformed while layers are open. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(200, 200); + var ctx = canvas.getContext('2d'); + + // Shouldn't throw on its own. + await canvas.convertToBlob(); + // Make sure the exception isn't caused by calling the function twice. + await canvas.convertToBlob(); + // Calling again inside a layer should throw. + ctx.beginLayer(); + await promise_rejects_dom(t, 'InvalidStateError', canvas.convertToBlob()); + t.done(); +}, "Check that exceptions are thrown for operations that are malformed while layers are open."); +done(); diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.createImageBitmap.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.createImageBitmap.html new file mode 100644 index 00000000000..085554d9f5b --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.createImageBitmap.html @@ -0,0 +1,27 @@ + + +OffscreenCanvas test: 2d.layer.malformed-operations-with-promises.createImageBitmap + + + + +

2d.layer.malformed-operations-with-promises.createImageBitmap

+

Check that exceptions are thrown for operations that are malformed while layers are open.

+ + + diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.createImageBitmap.worker.js b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.createImageBitmap.worker.js new file mode 100644 index 00000000000..b286b7a9e75 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations-with-promises.createImageBitmap.worker.js @@ -0,0 +1,23 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.malformed-operations-with-promises.createImageBitmap +// Description:Check that exceptions are thrown for operations that are malformed while layers are open. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +promise_test(async t => { + + var canvas = new OffscreenCanvas(200, 200); + var ctx = canvas.getContext('2d'); + + // Shouldn't throw on its own. + await createImageBitmap(canvas); + // Make sure the exception isn't caused by calling the function twice. + await createImageBitmap(canvas); + // Calling again inside a layer should throw. + ctx.beginLayer(); + await promise_rejects_dom(t, 'InvalidStateError', createImageBitmap(canvas)); + t.done(); +}, "Check that exceptions are thrown for operations that are malformed while layers are open."); +done(); diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.createPattern.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.createPattern.html new file mode 100644 index 00000000000..a206e64ceba --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.createPattern.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.layer.malformed-operations.createPattern + + + + +

2d.layer.malformed-operations.createPattern

+

Check that exceptions are thrown for operations that are malformed while layers are open.

+ + + diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.createPattern.worker.js b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.createPattern.worker.js new file mode 100644 index 00000000000..bcb42cba87e --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.createPattern.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.malformed-operations.createPattern +// Description:Check that exceptions are thrown for operations that are malformed while layers are open. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Check that exceptions are thrown for operations that are malformed while layers are open."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(200, 200); + var ctx = canvas.getContext('2d'); + + // Shouldn't throw on its own. + ctx.createPattern(canvas, 'repeat'); + // Make sure the exception isn't caused by calling the function twice. + ctx.createPattern(canvas, 'repeat'); + // Calling again inside a layer should throw. + ctx.beginLayer(); + assert_throws_dom("InvalidStateError", + () => ctx.createPattern(canvas, 'repeat')); + t.done(); +}); +done(); diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.drawImage.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.drawImage.html new file mode 100644 index 00000000000..e6a98721000 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.drawImage.html @@ -0,0 +1,36 @@ + + +OffscreenCanvas test: 2d.layer.malformed-operations.drawImage + + + + +

2d.layer.malformed-operations.drawImage

+

Check that exceptions are thrown for operations that are malformed while layers are open.

+ + + diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.drawImage.worker.js b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.drawImage.worker.js new file mode 100644 index 00000000000..b66cdee62e7 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.drawImage.worker.js @@ -0,0 +1,31 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.malformed-operations.drawImage +// Description:Check that exceptions are thrown for operations that are malformed while layers are open. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Check that exceptions are thrown for operations that are malformed while layers are open."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(200, 200); + var ctx = canvas.getContext('2d'); + + const canvas2 = new OffscreenCanvas(200, 200); + const ctx2 = canvas2.getContext('2d'); + // Shouldn't throw on its own. + ctx2.drawImage(canvas, 0, 0); + // Make sure the exception isn't caused by calling the function twice. + ctx2.drawImage(canvas, 0, 0); + // Calling again inside a layer should throw. + ctx.beginLayer(); + assert_throws_dom("InvalidStateError", + () => ctx2.drawImage(canvas, 0, 0)); + t.done(); +}); +done(); diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.getImageData.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.getImageData.html new file mode 100644 index 00000000000..87bc8c6ede5 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.getImageData.html @@ -0,0 +1,34 @@ + + +OffscreenCanvas test: 2d.layer.malformed-operations.getImageData + + + + +

2d.layer.malformed-operations.getImageData

+

Check that exceptions are thrown for operations that are malformed while layers are open.

+ + + diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.getImageData.worker.js b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.getImageData.worker.js new file mode 100644 index 00000000000..6a1a16fccb1 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.getImageData.worker.js @@ -0,0 +1,29 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.layer.malformed-operations.getImageData +// Description:Check that exceptions are thrown for operations that are malformed while layers are open. +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Check that exceptions are thrown for operations that are malformed while layers are open."); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(200, 200); + var ctx = canvas.getContext('2d'); + + // Shouldn't throw on its own. + ctx.getImageData(0, 0, 200, 200); + // Make sure the exception isn't caused by calling the function twice. + ctx.getImageData(0, 0, 200, 200); + // Calling again inside a layer should throw. + ctx.beginLayer(); + assert_throws_dom("InvalidStateError", + () => ctx.getImageData(0, 0, 200, 200)); + t.done(); +}); +done(); diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.putImageData.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.putImageData.html similarity index 56% rename from tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.putImageData.html rename to tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.putImageData.html index b46b80c1f46..e8059076bb0 100644 --- a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.putImageData.html +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.malformed-operations.putImageData.html @@ -1,35 +1,36 @@ -OffscreenCanvas test: 2d.layer.putImageData +OffscreenCanvas test: 2d.layer.malformed-operations.putImageData -

2d.layer.putImageData

-

Check that calling putImageData in a layer throws an exception.

+

2d.layer.malformed-operations.putImageData

+

Check that exceptions are thrown for operations that are malformed while layers are open.

-

2d.layer.transferToImageBitmap

-

Check that calling transferToImageBitmap in a layer throws an exception.

+

2d.layer.malformed-operations.transferToImageBitmap

+

Check that exceptions are thrown for operations that are malformed while layers are open.

- \ No newline at end of file diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.convertToBlob.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.convertToBlob.html deleted file mode 100644 index c9367532018..00000000000 --- a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.convertToBlob.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - -Canvas test: 2d.layer.render-opportunities.convertToBlob -

2d.layer.render-opportunities.convertToBlob

-

Check that layers state stack is flushed and rebuilt on frame renders.

- -

FAIL (fallback content)

-
- - \ No newline at end of file diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.convertToBlob.w.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.convertToBlob.w.html deleted file mode 100644 index c1f9c1e2c0b..00000000000 --- a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.convertToBlob.w.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - -Canvas test: 2d.layer.render-opportunities.convertToBlob -

2d.layer.render-opportunities.convertToBlob

-

Check that layers state stack is flushed and rebuilt on frame renders.

- -

FAIL (fallback content)

-
- - - diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.createImageBitmap-expected.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.createImageBitmap-expected.html deleted file mode 100644 index de03ea6392a..00000000000 --- a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.createImageBitmap-expected.html +++ /dev/null @@ -1,32 +0,0 @@ - - -Canvas test: 2d.layer.render-opportunities.createImageBitmap -

2d.layer.render-opportunities.createImageBitmap

-

Check that layers state stack is flushed and rebuilt on frame renders.

- -

FAIL (fallback content)

-
- diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.createImageBitmap.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.createImageBitmap.html deleted file mode 100644 index 1523f9f3bb0..00000000000 --- a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.createImageBitmap.html +++ /dev/null @@ -1,35 +0,0 @@ - - - -Canvas test: 2d.layer.render-opportunities.createImageBitmap -

2d.layer.render-opportunities.createImageBitmap

-

Check that layers state stack is flushed and rebuilt on frame renders.

- -

FAIL (fallback content)

-
- diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.createImageBitmap.w.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.createImageBitmap.w.html deleted file mode 100644 index 600287782b1..00000000000 --- a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.createImageBitmap.w.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - -Canvas test: 2d.layer.render-opportunities.createImageBitmap -

2d.layer.render-opportunities.createImageBitmap

-

Check that layers state stack is flushed and rebuilt on frame renders.

- -

FAIL (fallback content)

-
- - - diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.drawImage-expected.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.drawImage-expected.html deleted file mode 100644 index 378f85636b8..00000000000 --- a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.drawImage-expected.html +++ /dev/null @@ -1,32 +0,0 @@ - - -Canvas test: 2d.layer.render-opportunities.drawImage -

2d.layer.render-opportunities.drawImage

-

Check that layers state stack is flushed and rebuilt on frame renders.

- -

FAIL (fallback content)

-
- diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.drawImage.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.drawImage.html deleted file mode 100644 index d7eae8ddd7d..00000000000 --- a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.drawImage.html +++ /dev/null @@ -1,37 +0,0 @@ - - - -Canvas test: 2d.layer.render-opportunities.drawImage -

2d.layer.render-opportunities.drawImage

-

Check that layers state stack is flushed and rebuilt on frame renders.

- -

FAIL (fallback content)

-
- diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.drawImage.w.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.drawImage.w.html deleted file mode 100644 index 457e84d56e0..00000000000 --- a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.drawImage.w.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - -Canvas test: 2d.layer.render-opportunities.drawImage -

2d.layer.render-opportunities.drawImage

-

Check that layers state stack is flushed and rebuilt on frame renders.

- -

FAIL (fallback content)

-
- - - diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.getImageData-expected.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.getImageData-expected.html deleted file mode 100644 index 919a75911e7..00000000000 --- a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.getImageData-expected.html +++ /dev/null @@ -1,32 +0,0 @@ - - -Canvas test: 2d.layer.render-opportunities.getImageData -

2d.layer.render-opportunities.getImageData

-

Check that layers state stack is flushed and rebuilt on frame renders.

- -

FAIL (fallback content)

-
- diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.getImageData.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.getImageData.html deleted file mode 100644 index fe29b4be1a5..00000000000 --- a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.getImageData.html +++ /dev/null @@ -1,35 +0,0 @@ - - - -Canvas test: 2d.layer.render-opportunities.getImageData -

2d.layer.render-opportunities.getImageData

-

Check that layers state stack is flushed and rebuilt on frame renders.

- -

FAIL (fallback content)

-
- diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.getImageData.w.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.getImageData.w.html deleted file mode 100644 index 9eceff91daf..00000000000 --- a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.render-opportunities.getImageData.w.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - -Canvas test: 2d.layer.render-opportunities.getImageData -

2d.layer.render-opportunities.getImageData

-

Check that layers state stack is flushed and rebuilt on frame renders.

- -

FAIL (fallback content)

-
- - - diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.unclosed-nested.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.unclosed-nested.html deleted file mode 100644 index b7be6d82423..00000000000 --- a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.unclosed-nested.html +++ /dev/null @@ -1,31 +0,0 @@ - - - -Canvas test: 2d.layer.unclosed-nested -

2d.layer.unclosed-nested

-

Check that layers are rendered even if not closed.

- -

FAIL (fallback content)

-
- diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.unclosed-nested.w.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.unclosed-nested.w.html deleted file mode 100644 index e330e1710cf..00000000000 --- a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.unclosed-nested.w.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - -Canvas test: 2d.layer.unclosed-nested -

2d.layer.unclosed-nested

-

Check that layers are rendered even if not closed.

- -

FAIL (fallback content)

-
- - - diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.unclosed.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.unclosed.html deleted file mode 100644 index d2e599b2b99..00000000000 --- a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.unclosed.html +++ /dev/null @@ -1,25 +0,0 @@ - - - -Canvas test: 2d.layer.unclosed -

2d.layer.unclosed

-

Check that layers are rendered even if not closed.

- -

FAIL (fallback content)

-
- diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.unclosed.w.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.unclosed.w.html deleted file mode 100644 index 1da44c26c86..00000000000 --- a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.unclosed.w.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - -Canvas test: 2d.layer.unclosed -

2d.layer.unclosed

-

Check that layers are rendered even if not closed.

- -

FAIL (fallback content)

-
- - - diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.unclosed-expected.html b/tests/wpt/tests/html/canvas/offscreen/manual/layers/unclosed-layers-expected.html similarity index 77% rename from tests/wpt/tests/html/canvas/element/layers/2d.layer.unclosed-expected.html rename to tests/wpt/tests/html/canvas/offscreen/manual/layers/unclosed-layers-expected.html index 625630f5e6b..f6b05fc3f2b 100644 --- a/tests/wpt/tests/html/canvas/element/layers/2d.layer.unclosed-expected.html +++ b/tests/wpt/tests/html/canvas/offscreen/manual/layers/unclosed-layers-expected.html @@ -1,7 +1,6 @@ - -Canvas test: 2d.layer.unclosed -

2d.layer.unclosed

+Canvas test: unclosed-layers +

unclosed-layers

Check that layers are rendered even if not closed.

FAIL (fallback content)

@@ -20,4 +19,4 @@ ctx.fillStyle = 'grey'; ctx.fillRect(50, 50, 75, 50); ctx.endLayer(); - + \ No newline at end of file diff --git a/tests/wpt/tests/html/canvas/offscreen/manual/layers/unclosed-layers.html b/tests/wpt/tests/html/canvas/offscreen/manual/layers/unclosed-layers.html new file mode 100644 index 00000000000..6046f0f5780 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/manual/layers/unclosed-layers.html @@ -0,0 +1,34 @@ + + + +Canvas test: unclosed-layers +

unclosed-layers

+

Check that layers are rendered even if not closed.

+ +

FAIL (fallback content)

+
+ \ No newline at end of file diff --git a/tests/wpt/tests/html/canvas/offscreen/manual/layers/unclosed-layers.w.html b/tests/wpt/tests/html/canvas/offscreen/manual/layers/unclosed-layers.w.html new file mode 100644 index 00000000000..4616843a11a --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/manual/layers/unclosed-layers.w.html @@ -0,0 +1,49 @@ + + + +Canvas test: unclosed-layers +

unclosed-layers

+

Check that layers are rendered even if not closed.

+ +

FAIL (fallback content)

+
+ + \ No newline at end of file diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.unclosed-nested-expected.html b/tests/wpt/tests/html/canvas/offscreen/manual/layers/unclosed-nested-layers-expected.html similarity index 82% rename from tests/wpt/tests/html/canvas/element/layers/2d.layer.unclosed-nested-expected.html rename to tests/wpt/tests/html/canvas/offscreen/manual/layers/unclosed-nested-layers-expected.html index 5e90134a250..9a848b46d71 100644 --- a/tests/wpt/tests/html/canvas/element/layers/2d.layer.unclosed-nested-expected.html +++ b/tests/wpt/tests/html/canvas/offscreen/manual/layers/unclosed-nested-layers-expected.html @@ -1,7 +1,6 @@ - -Canvas test: 2d.layer.unclosed-nested -

2d.layer.unclosed-nested

+Canvas test: unclosed-nested-layers +

unclosed-nested-layers

Check that layers are rendered even if not closed.

FAIL (fallback content)

diff --git a/tests/wpt/tests/html/canvas/offscreen/manual/layers/unclosed-nested-layers.html b/tests/wpt/tests/html/canvas/offscreen/manual/layers/unclosed-nested-layers.html new file mode 100644 index 00000000000..eb9936c3620 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/manual/layers/unclosed-nested-layers.html @@ -0,0 +1,40 @@ + + + +Canvas test: unclosed-nested-layers +

unclosed-nested-layers

+

Check that layers are rendered even if not closed.

+ +

FAIL (fallback content)

+
+ \ No newline at end of file diff --git a/tests/wpt/tests/html/canvas/offscreen/manual/layers/unclosed-nested-layers.w.html b/tests/wpt/tests/html/canvas/offscreen/manual/layers/unclosed-nested-layers.w.html new file mode 100644 index 00000000000..8c6a69d87cc --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/manual/layers/unclosed-nested-layers.w.html @@ -0,0 +1,55 @@ + + + +Canvas test: unclosed-nested-layers +

unclosed-nested-layers

+

Check that layers are rendered even if not closed.

+ +

FAIL (fallback content)

+
+ + \ No newline at end of file diff --git a/tests/wpt/tests/html/canvas/tools/yaml-new/layers.yaml b/tests/wpt/tests/html/canvas/tools/yaml-new/layers.yaml index d255a834f6c..34f16ce5151 100644 --- a/tests/wpt/tests/html/canvas/tools/yaml-new/layers.yaml +++ b/tests/wpt/tests/html/canvas/tools/yaml-new/layers.yaml @@ -402,98 +402,11 @@ ctx.clip(); ctx.drawImage(canvas3, 0, 0); -- name: 2d.layer.unclosed - desc: Check that layers are rendered even if not closed. - size: [200, 200] - code: | - {% set ns = namespace(ctx='ctx') %} - {% if canvas_type == 'worker' %} - // `transferToImageBitmap` is used to transfer the test result to the - // worker's parent, but `transferToImageBitmap` can't be called on canvas - // with unclosed layers. We can however draw to a separate offscreen canvas - // and write it to the main canvas using `drawImage`. - const canvas2 = new OffscreenCanvas({{ size[0] }}, {{ size[1] }}); - const ctx2 = canvas2.getContext('2d'); - {% set ns.ctx = 'ctx2' %} - {% endif %} - - {{ ns.ctx }}.fillStyle = 'purple'; - {{ ns.ctx }}.fillRect(60, 60, 75, 50); - {{ ns.ctx }}.globalAlpha = 0.5; - - {{ ns.ctx }}.beginLayer({filter: {name: 'dropShadow', dx: -2, dy: 2}}); - {{ ns.ctx }}.fillRect(40, 40, 75, 50); - {{ ns.ctx }}.fillStyle = 'grey'; - {{ ns.ctx }}.fillRect(50, 50, 75, 50); - - {% if canvas_type == 'worker' %} - ctx.drawImage(canvas2, 0, 0); - {% endif %} - reference: | - ctx.fillStyle = 'purple'; - ctx.fillRect(60, 60, 75, 50); - ctx.globalAlpha = 0.5; - - ctx.beginLayer({filter: {name: 'dropShadow', dx: -2, dy: 2}}); - ctx.fillStyle = 'purple'; - ctx.fillRect(40, 40, 75, 50); - ctx.fillStyle = 'grey'; - ctx.fillRect(50, 50, 75, 50); - ctx.endLayer(); - -- name: 2d.layer.unclosed-nested - desc: Check that layers are rendered even if not closed. - size: [200, 200] - code: | - {% set ns = namespace(ctx='ctx') %} - {% if canvas_type == 'worker' %} - // `transferToImageBitmap` is used to transfer the test result to the - // worker's parent, but `transferToImageBitmap` can't be called on canvas - // with unclosed layers. We can however draw to a separate offscreen canvas - // and write it to the main canvas using `drawImage`. - const canvas2 = new OffscreenCanvas({{ size[0] }}, {{ size[1] }}); - const ctx2 = canvas2.getContext('2d'); - {% set ns.ctx = 'ctx2' %} - {% endif %} - - {{ ns.ctx }}.fillStyle = 'rgba(0, 0, 255, 1)'; - {{ ns.ctx }}.fillRect(60, 60, 75, 50); - {{ ns.ctx }}.globalAlpha = 0.5; - - {{ ns.ctx }}.beginLayer(); - {{ ns.ctx }}.fillStyle = 'rgba(225, 0, 0, 1)'; - {{ ns.ctx }}.fillRect(50, 50, 75, 50); - - {{ ns.ctx }}.beginLayer(); - {{ ns.ctx }}.fillStyle = 'rgba(0, 255, 0, 1)'; - {{ ns.ctx }}.fillRect(70, 70, 75, 50); - - {{ ns.ctx }}.endLayer(); - // Missing {{ ns.ctx }}.endLayer() here. - - {% if canvas_type == 'worker' %} - ctx.drawImage(canvas2, 0, 0); - {% endif %} - reference: | - const canvas1 = document.createElement('canvas'); - const ctx1 = canvas1.getContext('2d'); - ctx1.fillStyle = 'rgba(0,255,0,1)'; - ctx1.fillRect(70,70,75,50); - - const canvas2 = document.createElement('canvas'); - const ctx2 = canvas2.getContext('2d'); - ctx2.fillStyle = 'rgba(225,0,0,1)'; - ctx2.fillRect(50,50,75,50); - ctx2.drawImage(canvas1, 0, 0); - - ctx.fillStyle = 'rgba(0,0,255,1)'; - ctx.fillRect(60,60,75,50); - ctx.globalAlpha = 0.5; - ctx.drawImage(canvas2, 0, 0); - -- name: 2d.layer.render-opportunities +- name: 2d.layer.flush-on-frame-presentation desc: Check that layers state stack is flushed and rebuilt on frame renders. size: [200, 200] + canvasType: ['HTMLCanvas'] + test_type: "promise" code: | ctx.fillStyle = 'purple'; ctx.fillRect(60, 60, 75, 50); @@ -505,7 +418,7 @@ ctx.fillRect(50, 50, 75, 50); // Force a flush and restoration of the state stack: - {{ flush_canvas }} + await new Promise(resolve => requestAnimationFrame(resolve)); ctx.fillRect(70, 70, 75, 50); ctx.fillStyle = 'orange'; @@ -533,61 +446,72 @@ ctx.endLayer(); ctx.fillRect(80, 40, 75, 50); - variants: - convertToBlob: - test_type: "promise" - canvasType: ['OffscreenCanvas', 'Worker'] - flush_canvas: |- - await canvas.convertToBlob(); - createImageBitmap: - flush_canvas: createImageBitmap(canvas); - drawImage: - flush_canvas: |- - const canvas2 = new OffscreenCanvas({{ size[0] }}, {{ size[1] }}); - const ctx2 = canvas2.getContext('2d'); - ctx2.drawImage(canvas, 0, 0); - getImageData: - flush_canvas: ctx.getImageData(0, 0, {{ size[0] }}, {{ size[1] }}); - requestAnimationFrame: - canvasType: ['HTMLCanvas'] - test_type: "promise" - flush_canvas: |- - await new Promise(resolve => requestAnimationFrame(resolve)); - toBlob: - test_type: "promise" - canvasType: ['HTMLCanvas'] - flush_canvas: |- - await new Promise(resolve => canvas.toBlob(resolve)); - toDataURL: - canvasType: ['HTMLCanvas'] - flush_canvas: canvas.toDataURL(); -- name: 2d.layer.putImageData - desc: Check that calling putImageData in a layer throws an exception. +- name: 2d.layer.malformed-operations + desc: >- + Check that exceptions are thrown for operations that are malformed while + layers are open. + size: [200, 200] code: | - const canvas2 = new OffscreenCanvas({{ size[0] }}, {{ size[1] }}); - const ctx2 = canvas2.getContext('2d') - const data = ctx2.getImageData(0, 0, 1, 1); - // `putImageData` shouldn't throw on it's own. - ctx.putImageData(data, 0, 0); + {{ setup }} + // Shouldn't throw on its own. + {{ operation }}; // Make sure the exception isn't caused by calling the function twice. - ctx.putImageData(data, 0, 0); - // Calling again inside a layer should throw. - ctx.beginLayer(); - assert_throws_dom("InvalidStateError", () => ctx.putImageData(data, 0, 0)); - -- name: 2d.layer.transferToImageBitmap - desc: Check that calling transferToImageBitmap in a layer throws an exception. - canvasType: ['OffscreenCanvas', 'Worker'] - code: | - // `transferToImageBitmap` shouldn't throw on it's own. - canvas.transferToImageBitmap(); - // Make sure the exception isn't caused by calling the function twice. - canvas.transferToImageBitmap(); + {{ operation }}; // Calling again inside a layer should throw. ctx.beginLayer(); assert_throws_dom("InvalidStateError", - () => canvas.transferToImageBitmap()); + () => {{ operation }}); + variants: + createPattern: + operation: ctx.createPattern(canvas, 'repeat') + drawImage: + setup: |- + const canvas2 = new OffscreenCanvas({{ size[0] }}, {{ size[1] }}); + const ctx2 = canvas2.getContext('2d'); + operation: |- + ctx2.drawImage(canvas, 0, 0) + getImageData: + operation: ctx.getImageData(0, 0, {{ size[0] }}, {{ size[1] }}) + putImageData: + setup: |- + const canvas2 = new OffscreenCanvas({{ size[0] }}, {{ size[1] }}); + const ctx2 = canvas2.getContext('2d') + const data = ctx2.getImageData(0, 0, 1, 1); + operation: |- + ctx.putImageData(data, 0, 0) + toDataURL: + canvasType: ['HTMLCanvas'] + operation: canvas.toDataURL() + transferToImageBitmap: + canvasType: ['OffscreenCanvas', 'Worker'] + operation: canvas.transferToImageBitmap() + +- name: 2d.layer.malformed-operations-with-promises + desc: >- + Check that exceptions are thrown for operations that are malformed while + layers are open. + size: [200, 200] + test_type: "promise" + code: | + // Shouldn't throw on its own. + await {{ operation }}; + // Make sure the exception isn't caused by calling the function twice. + await {{ operation }}; + // Calling again inside a layer should throw. + ctx.beginLayer(); + await promise_rejects_dom(t, 'InvalidStateError', {{ operation }}); + variants: + convertToBlob: + canvasType: ['OffscreenCanvas', 'Worker'] + operation: |- + canvas.convertToBlob() + createImageBitmap: + operation: createImageBitmap(canvas) + toBlob: + canvasType: ['HTMLCanvas'] + operation: |- + new Promise(resolve => canvas.toBlob(resolve)) - name: 2d.layer.several-complex desc: >- diff --git a/tests/wpt/tests/html/dom/render-blocking/parser-inserted-async-inline-module-with-import.html b/tests/wpt/tests/html/dom/render-blocking/parser-inserted-async-inline-module-with-import.html new file mode 100644 index 00000000000..50a2add2770 --- /dev/null +++ b/tests/wpt/tests/html/dom/render-blocking/parser-inserted-async-inline-module-with-import.html @@ -0,0 +1,21 @@ + + +Parser-inserted async inline module script elements with "blocking=render" are render-blocking + + + + + +
some text
+ + diff --git a/tests/wpt/tests/html/dom/render-blocking/parser-inserted-inline-module-with-import.html b/tests/wpt/tests/html/dom/render-blocking/parser-inserted-inline-module-with-import.html new file mode 100644 index 00000000000..af2ac46aaf5 --- /dev/null +++ b/tests/wpt/tests/html/dom/render-blocking/parser-inserted-inline-module-with-import.html @@ -0,0 +1,21 @@ + + +Parser-inserted module script elements with "blocking=render" are render-blocking + + + + + +
some text
+ + diff --git a/tests/wpt/tests/html/dom/render-blocking/script-inserted-inline-module-with-import.html b/tests/wpt/tests/html/dom/render-blocking/script-inserted-inline-module-with-import.html new file mode 100644 index 00000000000..576c0b321a1 --- /dev/null +++ b/tests/wpt/tests/html/dom/render-blocking/script-inserted-inline-module-with-import.html @@ -0,0 +1,25 @@ + + +Script-inserted module script elements with "blocking=render" are render-blocking + + + + +
some text
+ + diff --git a/tests/wpt/tests/html/rendering/bidi-rendering/slot-direction.window.js b/tests/wpt/tests/html/rendering/bidi-rendering/slot-direction.window.js new file mode 100644 index 00000000000..673f6c0b0fc --- /dev/null +++ b/tests/wpt/tests/html/rendering/bidi-rendering/slot-direction.window.js @@ -0,0 +1,72 @@ +// https://html.spec.whatwg.org/multipage/rendering.html#bidi-rendering +// https://github.com/whatwg/html/pull/9796 +// https://github.com/whatwg/html/pull/9880 + +for (let t of [ + { + description: " inherits direction from parent", + shadow_tree: ` +
+ +
+ `, + host_dir: "rtl", + }, + { + description: " inherits CSS direction from parent", + shadow_tree: ` +
+ +
+ `, + host_dir: "rtl", + }, + { + description: "", + shadow_tree: ` + + `, + host_dir: "rtl", + }, + { + description: "", + shadow_tree: ` + + `, + host_dir: "ltr", + }, + { + description: " resolving to LTR", + shadow_tree: ` + + `, + host_dir: "rtl", + host_contents: "A", + }, + { + description: " resolving to RTL", + shadow_tree: ` + + `, + host_dir: "ltr", + host_contents: "\u0627", + }, +]) { + test(() => { + let host = document.createElement("div"); + document.body.appendChild(host); + host.dir = t.host_dir; + if ("host_contents" in t) { + host.innerHTML = t.host_contents; + } + + let root = host.attachShadow({mode: "open"}); + root.innerHTML = t.shadow_tree; + + for (let e of Array.from(root.querySelectorAll("[data-expected]"))) { + assert_equals(getComputedStyle(e).direction, e.getAttribute("data-expected"), `direction of ${e.nodeName}`); + } + + host.remove(); + }, ` element sets CSS direction property: ${t.description}`); +} diff --git a/tests/wpt/tests/html/rendering/bidi-rendering/slot-no-isolate-001-ref.html b/tests/wpt/tests/html/rendering/bidi-rendering/slot-no-isolate-001-ref.html new file mode 100644 index 00000000000..6675f0a1664 --- /dev/null +++ b/tests/wpt/tests/html/rendering/bidi-rendering/slot-no-isolate-001-ref.html @@ -0,0 +1,8 @@ + +HTML Rendering: slot element has unicode-bidi: isolate + + + +
ב-א
+ +
normal
diff --git a/tests/wpt/tests/html/rendering/bidi-rendering/slot-no-isolate-001.html b/tests/wpt/tests/html/rendering/bidi-rendering/slot-no-isolate-001.html new file mode 100644 index 00000000000..bb2e927c08b --- /dev/null +++ b/tests/wpt/tests/html/rendering/bidi-rendering/slot-no-isolate-001.html @@ -0,0 +1,22 @@ + +HTML Rendering: slot element has unicode-bidi: isolate + + + + + + +
א-ב
+ +
+ + diff --git a/tests/wpt/tests/html/rendering/non-replaced-elements/flow-content-0/slot-element-focusable.tentative.html b/tests/wpt/tests/html/rendering/non-replaced-elements/flow-content-0/slot-element-focusable.tentative.html new file mode 100644 index 00000000000..b6d2449e890 --- /dev/null +++ b/tests/wpt/tests/html/rendering/non-replaced-elements/flow-content-0/slot-element-focusable.tentative.html @@ -0,0 +1,51 @@ + +CSS Test (Display): <slot> elements should be focusable + + + + + + + + + + + + + + + diff --git a/tests/wpt/tests/html/rendering/non-replaced-elements/flow-content-0/slot-element-tabbable.tentative.html b/tests/wpt/tests/html/rendering/non-replaced-elements/flow-content-0/slot-element-tabbable.tentative.html new file mode 100644 index 00000000000..22c2324d020 --- /dev/null +++ b/tests/wpt/tests/html/rendering/non-replaced-elements/flow-content-0/slot-element-tabbable.tentative.html @@ -0,0 +1,58 @@ + +CSS Test (Display): <slot> elements should be tabbable + + + + + + + + + + + + + + + +
+ + + diff --git a/tests/wpt/tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-resize-ref.html b/tests/wpt/tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-resize-ref.html new file mode 100644 index 00000000000..e77bb69d7fd --- /dev/null +++ b/tests/wpt/tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-resize-ref.html @@ -0,0 +1,13 @@ + +CSS Test Reference + +
diff --git a/tests/wpt/tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-resize.html b/tests/wpt/tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-resize.html new file mode 100644 index 00000000000..6a34a7465c2 --- /dev/null +++ b/tests/wpt/tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-resize.html @@ -0,0 +1,15 @@ + +resize property on fieldset + + +
diff --git a/tests/wpt/tests/html/rendering/widgets/input-checkbox-switch.tentative.window.js b/tests/wpt/tests/html/rendering/widgets/input-checkbox-switch.tentative.window.js index 7e5095a3378..84198eda100 100644 --- a/tests/wpt/tests/html/rendering/widgets/input-checkbox-switch.tentative.window.js +++ b/tests/wpt/tests/html/rendering/widgets/input-checkbox-switch.tentative.window.js @@ -6,6 +6,15 @@ test(t => { assert_equals(getComputedStyle(input).appearance, "auto"); }, "Default appearance value"); +test(t => { + const input = document.body.appendChild(document.createElement("input")); + t.add_cleanup(() => input.remove()); + input.type = "checkbox"; + input.switch = true; + input.style.display = "none" + assert_equals(getComputedStyle(input).display, "none"); +}, "Default appearance value: display:none"); + test(t => { const input = document.body.appendChild(document.createElement("input")); t.add_cleanup(() => input.remove()); @@ -14,3 +23,12 @@ test(t => { input.style.appearance = "none"; assert_equals(getComputedStyle(input).appearance, "none"); }, "appearance:none should work"); + +test(t => { + const input = document.body.appendChild(document.createElement("input")); + t.add_cleanup(() => input.remove()); + input.type = "checkbox"; + input.switch = true; + input.style.appearance = "none"; + assert_equals(getComputedStyle(input).display, "inline"); +}, "appearance:none should work: display gets its initial value"); diff --git a/tests/wpt/tests/html/semantics/embedded-content/the-canvas-element/canvas-descendants-focusability-003.tentative.html b/tests/wpt/tests/html/semantics/embedded-content/the-canvas-element/canvas-descendants-focusability-003.tentative.html index 98d60cfe989..cd42d1e6b7a 100644 --- a/tests/wpt/tests/html/semantics/embedded-content/the-canvas-element/canvas-descendants-focusability-003.tentative.html +++ b/tests/wpt/tests/html/semantics/embedded-content/the-canvas-element/canvas-descendants-focusability-003.tentative.html @@ -7,7 +7,8 @@ + explicit 'display: none' style, but can if they are not rendered because of + a 'display: contents' style.">
@@ -16,11 +17,11 @@ - -
-
- - + +
+
+ +
diff --git a/tests/wpt/tests/html/semantics/forms/the-select-element/select-in-table-crash.html b/tests/wpt/tests/html/semantics/forms/the-select-element/select-in-table-crash.html new file mode 100644 index 00000000000..d1f1cee2177 --- /dev/null +++ b/tests/wpt/tests/html/semantics/forms/the-select-element/select-in-table-crash.html @@ -0,0 +1,4 @@ + + + +
diff --git a/tests/wpt/tests/html/webappapis/scripting/events/event-handler-onmove.html b/tests/wpt/tests/html/webappapis/scripting/events/event-handler-onmove-01.tentative.html similarity index 100% rename from tests/wpt/tests/html/webappapis/scripting/events/event-handler-onmove.html rename to tests/wpt/tests/html/webappapis/scripting/events/event-handler-onmove-01.tentative.html diff --git a/tests/wpt/tests/html/webappapis/scripting/events/event-handler-onmove-02.tentative.html b/tests/wpt/tests/html/webappapis/scripting/events/event-handler-onmove-02.tentative.html new file mode 100644 index 00000000000..a751f39d309 --- /dev/null +++ b/tests/wpt/tests/html/webappapis/scripting/events/event-handler-onmove-02.tentative.html @@ -0,0 +1,24 @@ + +Window Object 'onmove' + + + + + + + + diff --git a/tests/wpt/tests/interfaces/FedCM.idl b/tests/wpt/tests/interfaces/FedCM.idl index a42a2f7f6a6..4070d50fcd7 100644 --- a/tests/wpt/tests/interfaces/FedCM.idl +++ b/tests/wpt/tests/interfaces/FedCM.idl @@ -26,6 +26,7 @@ dictionary IdentityCredentialDisconnectOptions : IdentityProviderConfig { interface IdentityCredential : Credential { static Promise disconnect(optional IdentityCredentialDisconnectOptions options = {}); readonly attribute USVString? token; + readonly attribute boolean isAutoSelected; }; dictionary DisconnectedAccount { diff --git a/tests/wpt/tests/interfaces/css-scroll-snap-2.idl b/tests/wpt/tests/interfaces/css-scroll-snap-2.idl new file mode 100644 index 00000000000..50cbf6940a6 --- /dev/null +++ b/tests/wpt/tests/interfaces/css-scroll-snap-2.idl @@ -0,0 +1,33 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content was automatically extracted by Reffy into webref +// (https://github.com/w3c/webref) +// Source: CSS Scroll Snap Module Level 2 (https://drafts.csswg.org/css-scroll-snap-2/) + +[Exposed=Window] +interface SnapEvent : Event { + constructor(DOMString type, optional SnapEventInit eventInitDict = {}); + readonly attribute EventTarget? target; + readonly attribute SnapTargetList snappedTargets; + readonly attribute SnapTargetList snapTargets; + readonly attribute boolean invokedProgrammatically; + readonly attribute boolean smoothlyScrolled; +}; + +[Exposed=Window] +interface SnapTargetList { + readonly attribute SnapTargetArray x; + readonly attribute SnapTargetArray y; +}; + +[Exposed=Window] +interface SnapTargetArray { + readonly attribute unsigned long length; + getter EventTarget? item (unsigned long index); +}; + +dictionary SnapEventInit : EventModifierInit { + sequence snappedTargetsX = []; + sequence snappedTargetsY = []; + sequence snapTargetsListX = []; + sequence snapTargetsListY = []; +}; diff --git a/tests/wpt/tests/interfaces/cssom-view.idl b/tests/wpt/tests/interfaces/cssom-view.idl index 4e531a26824..3f64113f572 100644 --- a/tests/wpt/tests/interfaces/cssom-view.idl +++ b/tests/wpt/tests/interfaces/cssom-view.idl @@ -104,6 +104,9 @@ dictionary ScrollIntoViewOptions : ScrollOptions { dictionary CheckVisibilityOptions { boolean checkOpacity = false; boolean checkVisibilityCSS = false; + boolean contentVisibilityAuto = false; + boolean opacityProperty = false; + boolean visibilityProperty = false; }; partial interface Element { diff --git a/tests/wpt/tests/interfaces/gamepad-extensions.idl b/tests/wpt/tests/interfaces/gamepad-extensions.idl index d7d750654fd..81776a46ec9 100644 --- a/tests/wpt/tests/interfaces/gamepad-extensions.idl +++ b/tests/wpt/tests/interfaces/gamepad-extensions.idl @@ -9,38 +9,6 @@ enum GamepadHand { "right" }; -[Exposed=Window] -interface GamepadHapticActuator { - readonly attribute GamepadHapticActuatorType type; - boolean canPlayEffectType(GamepadHapticEffectType type); - Promise playEffect( - GamepadHapticEffectType type, - optional GamepadEffectParameters params = {}); - Promise pulse(double value, double duration); - Promise reset(); -}; - -enum GamepadHapticsResult { - "complete", - "preempted" -}; - -enum GamepadHapticActuatorType { - "vibration", - "dual-rumble" -}; - -enum GamepadHapticEffectType { - "dual-rumble" -}; - -dictionary GamepadEffectParameters { - double duration = 0.0; - double startDelay = 0.0; - double strongMagnitude = 0.0; - double weakMagnitude = 0.0; -}; - [Exposed=Window] interface GamepadPose { readonly attribute boolean hasOrientation; @@ -67,5 +35,9 @@ partial interface Gamepad { readonly attribute FrozenArray hapticActuators; readonly attribute GamepadPose? pose; readonly attribute FrozenArray? touchEvents; - [SameObject] readonly attribute GamepadHapticActuator? vibrationActuator; +}; + +[Exposed=Window] +partial interface GamepadHapticActuator { + Promise pulse(double value, double duration); }; diff --git a/tests/wpt/tests/interfaces/gamepad.idl b/tests/wpt/tests/interfaces/gamepad.idl index bbc62da3c44..77a22c1d858 100644 --- a/tests/wpt/tests/interfaces/gamepad.idl +++ b/tests/wpt/tests/interfaces/gamepad.idl @@ -12,6 +12,7 @@ interface Gamepad { readonly attribute GamepadMappingType mapping; readonly attribute FrozenArray axes; readonly attribute FrozenArray buttons; + [SameObject] readonly attribute GamepadHapticActuator vibrationActuator; }; [Exposed=Window, SecureContext] @@ -27,6 +28,32 @@ enum GamepadMappingType { "xr-standard", }; +[Exposed=Window] +interface GamepadHapticActuator { + [SameObject] readonly attribute FrozenArray effects; + Promise playEffect( + GamepadHapticEffectType type, + optional GamepadEffectParameters params = {} + ); + Promise reset(); +}; + +enum GamepadHapticsResult { + "complete", + "preempted" +}; + +enum GamepadHapticEffectType { + "dual-rumble" +}; + +dictionary GamepadEffectParameters { + unsigned long long duration = 0; + unsigned long long startDelay = 0; + double strongMagnitude = 0.0; + double weakMagnitude = 0.0; +}; + [Exposed=Window] partial interface Navigator { sequence getGamepads(); diff --git a/tests/wpt/tests/interfaces/mediasession.idl b/tests/wpt/tests/interfaces/mediasession.idl index 2cca3674a5e..57c62dfbc9d 100644 --- a/tests/wpt/tests/interfaces/mediasession.idl +++ b/tests/wpt/tests/interfaces/mediasession.idl @@ -72,7 +72,7 @@ dictionary MediaImage { }; dictionary MediaPositionState { - double duration; + unrestricted double duration; double playbackRate; double position; }; diff --git a/tests/wpt/tests/interfaces/webnn.idl b/tests/wpt/tests/interfaces/webnn.idl index ef57f3bb913..721ee788bda 100644 --- a/tests/wpt/tests/interfaces/webnn.idl +++ b/tests/wpt/tests/interfaces/webnn.idl @@ -508,7 +508,7 @@ partial interface MLGraphBuilder { }; partial interface MLGraphBuilder { - MLOperand reshape(MLOperand input, sequence newShape); + MLOperand reshape(MLOperand input, sequence newShape); }; partial interface MLGraphBuilder { diff --git a/tests/wpt/tests/lint.ignore b/tests/wpt/tests/lint.ignore index e9f91d80f0d..2c0bc36c49e 100644 --- a/tests/wpt/tests/lint.ignore +++ b/tests/wpt/tests/lint.ignore @@ -234,6 +234,7 @@ SET TIMEOUT: png/apng/fcTL-dispose-previous-final.html SET TIMEOUT: png/apng/fcTL-dispose-previous-first.html SET TIMEOUT: png/apng/fcTL-dispose-previous.html SET TIMEOUT: png/apng/fdAT-16bit.html +SET TIMEOUT: png/apng/fDAT-inherits-cICP.html SET TIMEOUT: png/apng/fdAT-1bit-PLTE-tRNS.html SET TIMEOUT: png/apng/fdAT-1bit-PLTE.html SET TIMEOUT: png/apng/fdAT-2bit-PLTE-tRNS.html diff --git a/tests/wpt/tests/long-animation-frame/tentative/loaf-source-location-redirect.html b/tests/wpt/tests/long-animation-frame/tentative/loaf-source-location-redirect.html index ba2478e6224..a6bfd68f809 100644 --- a/tests/wpt/tests/long-animation-frame/tentative/loaf-source-location-redirect.html +++ b/tests/wpt/tests/long-animation-frame/tentative/loaf-source-location-redirect.html @@ -47,7 +47,7 @@ function test_source_location_with_redirect({path, type, name}) { script.crossOrigin = "anonymous"; document.body.appendChild(script); t.add_cleanup(() => script.remove()); - }, script => script.duration >= VERY_LONG_FRAME_DURATION, t); + }, script => script.duration >= VERY_LONG_FRAME_DURATION - 5, t); const result = script.sourceLocation.startsWith(postRedirectURL) ? "post-redirect" : diff --git a/tests/wpt/tests/mediacapture-insertable-streams/MediaStreamTrackProcessor-maxBufferSize.worker.js b/tests/wpt/tests/mediacapture-insertable-streams/MediaStreamTrackProcessor-maxBufferSize.worker.js new file mode 100644 index 00000000000..3c64e590c44 --- /dev/null +++ b/tests/wpt/tests/mediacapture-insertable-streams/MediaStreamTrackProcessor-maxBufferSize.worker.js @@ -0,0 +1,82 @@ +// META: title=MediaStreamTrackProcessor maxBufferSize +importScripts("/resources/testharness.js"); + +function makeVideoFrame(timestamp) { + const canvas = new OffscreenCanvas(100, 100); + const ctx = canvas.getContext('2d'); + return new VideoFrame(canvas, {timestamp}); +} + +promise_test(async t => { + // The generator will be used as the source for the processor to + // produce frames in a controlled manner. + const generator = new VideoTrackGenerator(); + t.add_cleanup(() => generator.track.stop()); + // Use a larger maxBufferSize than the default to ensure no frames + // will be dropped. + const processor = new MediaStreamTrackProcessor({track: generator.track, maxBufferSize:10}); + const reader = processor.readable.getReader(); + const writer = generator.writable.getWriter(); + + let numReads = 0; + let resolve = null; + const promise = new Promise(r => resolve = r); + + const numOperations = 4; + // Issue reads without waiting for the frames to arrive. + for (let i = 0; i < numOperations; i++) { + reader.read().then(dv=> { + dv.value.close(); + if (++numReads == numOperations) + resolve(); + }); + } + + // Write video frames in different tasks to "slowly" settle the pending read + // requests. + for (let i = 0; it.step_timeout(r, 0)); + } + + return promise; + +}, "Tests that multiple read requests are eventually settled"); + +promise_test(async t => { + // The generator will be used as the source for the processor to + // produce frames in a controlled manner. + const generator = new VideoTrackGenerator(); + t.add_cleanup(() => generator.track.stop()); + // Use a larger maxBufferSize than the default to ensure no frames + // will be dropped. + const processor = new MediaStreamTrackProcessor({track: generator.track, maxBufferSize:10}); + const reader = processor.readable.getReader(); + const writer = generator.writable.getWriter(); + + const numOperations = 4; + // Write video frames as fast as we can with "slower" reads. + // requests. + for (let i = 0; i resolve = r); + + // Issue reads without waiting for the frames to arrive. + for (let i = 0; i < numOperations; i++) { + await new Promise(r=>t.step_timeout(r, 50)); + reader.read().then(dv=> { + dv.value.close(); + if (++numReads == numOperations) + resolve(); + }); + } + + return promise; + +}, "Tests that multiple write requests are buffered"); + +done(); diff --git a/tests/wpt/tests/mediacapture-insertable-streams/MediaStreamTrackGenerator-audio.https.html b/tests/wpt/tests/mediacapture-insertable-streams/tentative/MediaStreamTrackGenerator-audio.https.html similarity index 98% rename from tests/wpt/tests/mediacapture-insertable-streams/MediaStreamTrackGenerator-audio.https.html rename to tests/wpt/tests/mediacapture-insertable-streams/tentative/MediaStreamTrackGenerator-audio.https.html index c2f0bfc011f..83a4f21b4ac 100644 --- a/tests/wpt/tests/mediacapture-insertable-streams/MediaStreamTrackGenerator-audio.https.html +++ b/tests/wpt/tests/mediacapture-insertable-streams/tentative/MediaStreamTrackGenerator-audio.https.html @@ -15,7 +15,7 @@ - + - + - + - +

If prompted, use the accept button to give permission to use your audio and video devices.

diff --git a/tests/wpt/tests/mediacapture-insertable-streams/dedicated-worker.js b/tests/wpt/tests/mediacapture-insertable-streams/tentative/dedicated-worker.js similarity index 100% rename from tests/wpt/tests/mediacapture-insertable-streams/dedicated-worker.js rename to tests/wpt/tests/mediacapture-insertable-streams/tentative/dedicated-worker.js diff --git a/tests/wpt/tests/mediacapture-insertable-streams/service-worker.js b/tests/wpt/tests/mediacapture-insertable-streams/tentative/service-worker.js similarity index 100% rename from tests/wpt/tests/mediacapture-insertable-streams/service-worker.js rename to tests/wpt/tests/mediacapture-insertable-streams/tentative/service-worker.js diff --git a/tests/wpt/tests/mediacapture-insertable-streams/shared-worker.js b/tests/wpt/tests/mediacapture-insertable-streams/tentative/shared-worker.js similarity index 100% rename from tests/wpt/tests/mediacapture-insertable-streams/shared-worker.js rename to tests/wpt/tests/mediacapture-insertable-streams/tentative/shared-worker.js diff --git a/tests/wpt/tests/orientation-sensor/resources/sensor-data.js b/tests/wpt/tests/orientation-sensor/resources/sensor-data.js index d0b280fa6c4..a2886e7553b 100644 --- a/tests/wpt/tests/orientation-sensor/resources/sensor-data.js +++ b/tests/wpt/tests/orientation-sensor/resources/sensor-data.js @@ -15,9 +15,13 @@ const kRelativeOrientationSensorData = { }; const kOrientationReadings = { - readings: [{quaternion: [1, 0, 0, 0]}], - expectedReadings: [{quaternion: [1, 0, 0, 0]}], - expectedRemappedReadings: [{quaternion: [-0.70710678, 0.70710678, 0, 0]}] + // WebDriver input data must be given in Euler angles according to + // https://w3c.github.io/deviceorientation/#parse-orientation-data-reading-algorithm + // and converted to quaternions via + // https://w3c.github.io/orientation-sensor/#create-a-quaternion-from-euler-angles. + readings: [{alpha: 0, beta: -180, gamma: 0}], + expectedReadings: [{quaternion: [-1, 0, 0, 0]}], + expectedRemappedReadings: [{quaternion: [0.70710678, -0.70710678, 0, 0]}] }; const kRotationMatrix = [1, 0, 0, 0, diff --git a/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-attributes.tentative.window.js b/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-attributes.tentative.window.js index 2fabf45f351..44495fa981b 100644 --- a/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-attributes.tentative.window.js +++ b/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-attributes.tentative.window.js @@ -38,14 +38,12 @@ promise_test(async t => { await assertBFCacheEligibility(rc1, /*shouldRestoreFromBFCache=*/ false); await assertNotRestoredReasonsEquals( rc1, - /*preventedBackForwardCache=*/ "yes", /*url=*/ rc1_url, /*src=*/ null, /*id=*/ null, /*name=*/ null, - /*reasons=*/['websocket'], + /*reasons=*/[{'reason': 'websocket'}], /*children=*/[{ - 'preventedBackForwardCache': "masked", 'url': null, 'src': rc1_child_url, // Id and name should be empty. diff --git a/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-bfcache-reasons-stay.tentative.window.js b/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-bfcache-reasons-stay.tentative.window.js index 897a9900268..28dbc38575a 100644 --- a/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-bfcache-reasons-stay.tentative.window.js +++ b/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-bfcache-reasons-stay.tentative.window.js @@ -26,12 +26,11 @@ promise_test(async t => { await assertBFCacheEligibility(rc1, /*shouldRestoreFromBFCache=*/ false); await assertNotRestoredReasonsEquals( rc1, - /*preventedBackForwardCache=*/ "yes", /*url=*/ rc1_url, /*src=*/ null, /*id=*/ null, /*name=*/ null, - /*reasons=*/['websocket'], + /*reasons=*/[{'reason': 'websocket'}], /*children=*/ []); // This time no blocking feature is used, so the page is restored @@ -39,11 +38,10 @@ promise_test(async t => { await assertBFCacheEligibility(rc1, /*shouldRestoreFromBFCache=*/ true); await assertNotRestoredReasonsEquals( rc1, - /*preventedBackForwardCache=*/ "yes", /*url=*/ rc1_url, /*src=*/ null, /*id=*/ null, /*name=*/ null, - /*reasons=*/['websocket'], + /*reasons=*/[{'reason': 'websocket'}], /*children=*/ []); }); diff --git a/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-cross-origin-bfcache.tentative.window.js b/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-cross-origin-bfcache.tentative.window.js index 42769cf458b..42bda12919d 100644 --- a/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-cross-origin-bfcache.tentative.window.js +++ b/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-cross-origin-bfcache.tentative.window.js @@ -44,14 +44,12 @@ promise_test(async t => { await assertBFCacheEligibility(rc1, /*shouldRestoreFromBFCache=*/ false); await assertNotRestoredReasonsEquals( rc1, - /*preventedBackForwardCache=*/ "no", /*url=*/ rc1_url, /*src=*/ null, /*id=*/ null, /*name=*/ null, - /*reasons=*/[], + /*reasons=*/[{'reason': "masked"}], /*children=*/[{ - 'preventedBackForwardCache': "masked", 'url': null, 'src': rc1_child_url, 'id': 'test-id', diff --git a/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-fetch.tentative.window.js b/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-fetch.tentative.window.js index 5cd35c7ba36..c8f53a660fa 100644 --- a/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-fetch.tentative.window.js +++ b/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-fetch.tentative.window.js @@ -31,11 +31,10 @@ promise_test(async t => { await assertBFCacheEligibility(rc1, /*shouldRestoreFromBFCache=*/ false); await assertNotRestoredReasonsEquals( rc1, - /*blocked=*/ "yes", /*url=*/ rc1_url, /*src=*/ null, /*id=*/ null, /*name=*/ null, - /*reasons=*/['fetch'], + /*reasons=*/[{'reason': 'fetch'}], /*children=*/[]); }); \ No newline at end of file diff --git a/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-not-bfcached.tentative.window.js b/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-not-bfcached.tentative.window.js index 0dc1519d1bb..1cf1d55d90f 100644 --- a/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-not-bfcached.tentative.window.js +++ b/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-not-bfcached.tentative.window.js @@ -27,11 +27,10 @@ promise_test(async t => { await assertBFCacheEligibility(rc1, /*shouldRestoreFromBFCache=*/ false); await assertNotRestoredReasonsEquals( rc1, - /*preventedBackForwardCache=*/ "yes", /*url=*/ rc1_url, /*src=*/ null, /*id=*/ null, /*name=*/ null, - /*reasons=*/['websocket'], + /*reasons=*/[{'reason': 'websocket'}], /*children=*/ []); }); \ No newline at end of file diff --git a/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-reload.tentative.window.js b/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-reload.tentative.window.js index 58584390cd3..1a8972778d2 100644 --- a/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-reload.tentative.window.js +++ b/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-reload.tentative.window.js @@ -26,14 +26,13 @@ promise_test(async t => { // Check the BFCache result and the reported reasons. await assertBFCacheEligibility(rc1, /*shouldRestoreFromBFCache=*/ false); await assertNotRestoredReasonsEquals( - rc1, - /*preventedBackForwardCache=*/ "yes", - /*url=*/ rc1_url, - /*src=*/ null, - /*id=*/ null, - /*name=*/ null, - /*reasons=*/['websocket'], - /*children=*/ []); + rc1, + /*url=*/ rc1_url, + /*src=*/ null, + /*id=*/ null, + /*name=*/ null, + /*reasons=*/[{'reason': 'websocket'}], + /*children=*/ []); // Reload. await rc1.navigate(() => { diff --git a/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-same-origin-bfcache.tentative.window.js b/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-same-origin-bfcache.tentative.window.js index 44b44a865c0..89d66b070ed 100644 --- a/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-same-origin-bfcache.tentative.window.js +++ b/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-same-origin-bfcache.tentative.window.js @@ -38,21 +38,18 @@ promise_test(async t => { await assertBFCacheEligibility(rc1, /*shouldRestoreFromBFCache=*/ false); await assertNotRestoredReasonsEquals( rc1, - /*preventedBackForwardCache=*/ "no", /*url=*/ rc1_url, /*src=*/ null, /*id=*/ null, /*name=*/ null, /*reasons=*/[], /*children=*/[{ - 'preventedBackForwardCache': "yes", 'url': rc1_child_url, 'src': rc1_child_url, 'id': 'test-id', 'name': '', - 'reasons': ['websocket'], + 'reasons': [{'reason': 'websocket'}], 'children': [{ - 'preventedBackForwardCache': "no", 'url': rc1_grand_child_url, 'src': rc1_grand_child_url, 'id': '', diff --git a/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-same-origin-replace.tentative.window.js b/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-same-origin-replace.tentative.window.js index c833db75139..1162bfaf760 100644 --- a/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-same-origin-replace.tentative.window.js +++ b/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-same-origin-replace.tentative.window.js @@ -34,11 +34,10 @@ promise_test(async t => { // Reasons are not reset for same-origin replace. await assertNotRestoredReasonsEquals( rc1, - /*preventedBackForwardCache=*/ "yes", /*url=*/ rc1_url, /*src=*/ null, /*id=*/ null, /*name=*/ null, - /*reasons=*/['websocket'], + /*reasons=*/[{'reason': 'websocket'}], /*children=*/ []); }); diff --git a/tests/wpt/tests/performance-timeline/not-restored-reasons/test-helper.js b/tests/wpt/tests/performance-timeline/not-restored-reasons/test-helper.js index a172546512a..97695cd0ace 100644 --- a/tests/wpt/tests/performance-timeline/not-restored-reasons/test-helper.js +++ b/tests/wpt/tests/performance-timeline/not-restored-reasons/test-helper.js @@ -1,23 +1,25 @@ // META: script=../../html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js async function assertNotRestoredReasonsEquals( - remoteContextHelper, blocked, url, src, id, name, reasons, children) { + remoteContextHelper, url, src, id, name, reasons, children) { let result = await remoteContextHelper.executeScript(() => { return performance.getEntriesByType('navigation')[0].notRestoredReasons; }); assertReasonsStructEquals( - result, blocked, url, src, id, name, reasons, children); + result, url, src, id, name, reasons, children); } function assertReasonsStructEquals( - result, blocked, url, src, id, name, reasons, children) { - assert_equals(result.preventedBackForwardCache, blocked); + result, url, src, id, name, reasons, children) { assert_equals(result.url, url); assert_equals(result.src, src); assert_equals(result.id, id); assert_equals(result.name, name); + // Reasons should match. - matchReasons(new Set(reasons), new Set(result.reasons)); + let expected = new Set(reasons); + let actual = new Set(result.reasons); + matchReasons(extractReason(expected), extractReason(actual)); // Children should match. if (children == null) { @@ -25,7 +27,7 @@ function assertReasonsStructEquals( } else { for (let j = 0; j < children.length; j++) { assertReasonsStructEquals( - result.children[0], children[0].preventedBackForwardCache, children[0].url, + result.children[0], children[0].url, children[0].src, children[0].id, children[0].name, children[0].reasons, children[0].children); } diff --git a/tests/wpt/tests/png/apng/fDAT-inherits-cICP.html b/tests/wpt/tests/png/apng/fDAT-inherits-cICP.html new file mode 100644 index 00000000000..14f0e501e7f --- /dev/null +++ b/tests/wpt/tests/png/apng/fDAT-inherits-cICP.html @@ -0,0 +1,22 @@ + + + +PNG Third Edition: animated PNG, fdAT inherits colorspace from cICP + + + + + + + + + +

Test passes if you see a lime green rectangle, and no red.

+ +
+ diff --git a/tests/wpt/tests/png/apng/support/062.png b/tests/wpt/tests/png/apng/support/062.png new file mode 100644 index 00000000000..e50902adb9f Binary files /dev/null and b/tests/wpt/tests/png/apng/support/062.png differ diff --git a/tests/wpt/tests/pointerevents/pointerevent_after_target_removed.html b/tests/wpt/tests/pointerevents/pointerevent_after_target_removed.html index f1970e72efd..7b2a4eeb800 100644 --- a/tests/wpt/tests/pointerevents/pointerevent_after_target_removed.html +++ b/tests/wpt/tests/pointerevents/pointerevent_after_target_removed.html @@ -104,12 +104,24 @@ setup(); // Tests for dispatched pointer events. - addPromiseTest("pointerdown", "pointer", [ - "pointerover@child", "pointerenter@parent", "pointerenter@child", - "pointerdown@child", "(child-removed)", "pointerover@parent", "pointerup@parent", - "pointerdown@parent", "pointerup@parent", - "pointerout@parent", "pointerleave@parent" - ]); + addPromiseTest("pointerdown", "pointer", + pointer_type == "mouse" + // `pointerup` after removing the child should not cause `pointerover` + // on the parent if the pointer type is hoverable because pointer boundary + // events should be fired only when the hoverable pointer is actually + // moved. + ? [ + "pointerover@child", "pointerenter@parent", "pointerenter@child", + "pointerdown@child", "(child-removed)", "pointerup@parent", + "pointerover@parent", "pointerdown@parent", "pointerup@parent", + "pointerout@parent", "pointerleave@parent" + ] + : [ + "pointerover@child", "pointerenter@parent", "pointerenter@child", + "pointerdown@child", "(child-removed)", "pointerover@parent", "pointerup@parent", + "pointerdown@parent", "pointerup@parent", + "pointerout@parent", "pointerleave@parent" + ]); addPromiseTest("pointerup", "pointer", [ "pointerover@child", "pointerenter@parent", "pointerenter@child", "pointerdown@child", "pointerup@child", "(child-removed)", diff --git a/tests/wpt/tests/pointerevents/pointerevent_attributes.html b/tests/wpt/tests/pointerevents/pointerevent_attributes.html new file mode 100644 index 00000000000..7675dd5afda --- /dev/null +++ b/tests/wpt/tests/pointerevents/pointerevent_attributes.html @@ -0,0 +1,295 @@ + + + + Pointer Events properties tests + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ +
+ + diff --git a/tests/wpt/tests/pointerevents/pointerevent_attributes_hoverable_pointers.html b/tests/wpt/tests/pointerevents/pointerevent_attributes_hoverable_pointers.html deleted file mode 100644 index c8443d99ff3..00000000000 --- a/tests/wpt/tests/pointerevents/pointerevent_attributes_hoverable_pointers.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - Pointer Events properties tests - - - - - - - - - - - - - - -

Pointer Events hoverable pointer attributes test

-

-

- Test Description: This test checks the properties of hoverable pointer events. If you are using hoverable pen don't leave the range of digitizer while doing the instructions. -
    -
  1. Move your pointer over the black square and click on it.
  2. -
  3. Then move it off the black square so that it disappears.
  4. -
  5. When red square appears move your pointer over the red square and click on it.
  6. -
  7. Then move it off the red square.
  8. -
- - Test passes if the proper behavior of the events is observed. -

-
- -
-
-

The following pointer types were detected: .

-

Refresh the page to run the tests again with a different pointer type.

-
-
- - diff --git a/tests/wpt/tests/pointerevents/pointerevent_attributes_hoverable_rightbutton.html b/tests/wpt/tests/pointerevents/pointerevent_attributes_hoverable_rightbutton.html deleted file mode 100644 index 9a449ed753d..00000000000 --- a/tests/wpt/tests/pointerevents/pointerevent_attributes_hoverable_rightbutton.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - Pointer Events properties tests - - - - - - - - - - - - - - -

Pointer Events hoverable pointer attributes test

-

-
- - - diff --git a/tests/wpt/tests/pointerevents/pointerevent_attributes_nohover_pointers.html b/tests/wpt/tests/pointerevents/pointerevent_attributes_nohover_pointers.html deleted file mode 100644 index 3441417c46a..00000000000 --- a/tests/wpt/tests/pointerevents/pointerevent_attributes_nohover_pointers.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - Pointer Events properties tests - - - - - - - - - - - - - -
-
- -
- -
- -
- - diff --git a/tests/wpt/tests/pointerevents/pointerup_button_value_matches_corresponding_pointerdown.html b/tests/wpt/tests/pointerevents/pointerup_button_value_matches_corresponding_pointerdown.html new file mode 100644 index 00000000000..1fb13f37d40 --- /dev/null +++ b/tests/wpt/tests/pointerevents/pointerup_button_value_matches_corresponding_pointerdown.html @@ -0,0 +1,34 @@ + +Button value of corresponding pointerup/pointerdown are equivalent + + + + + + + + + + diff --git a/tests/wpt/tests/pointerevents/resources/pointerevent_attributes_hoverable_pointers-iframe.html b/tests/wpt/tests/pointerevents/resources/pointerevent_attributes_hoverable_pointers-iframe.html deleted file mode 100644 index 5e55868282c..00000000000 --- a/tests/wpt/tests/pointerevents/resources/pointerevent_attributes_hoverable_pointers-iframe.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - -
- - diff --git a/tests/wpt/tests/service-workers/service-worker/fetch-canvas-tainting-video-with-range-request.https.html b/tests/wpt/tests/service-workers/service-worker/fetch-canvas-tainting-video-with-range-request.https.html index 28c30718047..8fef9c34fa3 100644 --- a/tests/wpt/tests/service-workers/service-worker/fetch-canvas-tainting-video-with-range-request.https.html +++ b/tests/wpt/tests/service-workers/service-worker/fetch-canvas-tainting-video-with-range-request.https.html @@ -18,6 +18,7 @@ // byte range). Then the