diff --git a/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini b/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini index 3605e8f3fc9..76b44d9e9cf 100644 --- a/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini +++ b/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini @@ -4,7 +4,7 @@ expected: TIMEOUT [Opening a blob URL in a new window immediately before revoking it works.] - expected: TIMEOUT + expected: FAIL [Fetching a blob URL immediately before revoking it works in an iframe.] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-transitions/properties-value-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-transitions/properties-value-001.html.ini index c495e1becc7..9f3318c0ca0 100644 --- a/tests/wpt/metadata-layout-2020/css/css-transitions/properties-value-001.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-transitions/properties-value-001.html.ini @@ -326,3 +326,153 @@ [margin-right length(mm) / values] expected: FAIL + [color color(rgba) / values] + expected: FAIL + + [font-size length(pt) / values] + expected: FAIL + + [font-size length(pc) / values] + expected: FAIL + + [font-size length(px) / values] + expected: FAIL + + [font-size length(em) / values] + expected: FAIL + + [font-size length(ex) / values] + expected: FAIL + + [font-size length(mm) / values] + expected: FAIL + + [font-size length(cm) / values] + expected: FAIL + + [font-size length(in) / values] + expected: FAIL + + [font-size percentage(%) / values] + expected: FAIL + + [font-weight font-weight(keyword) / values] + expected: FAIL + + [font-weight font-weight(numeric) / values] + expected: FAIL + + [line-height number(integer) / values] + expected: FAIL + + [line-height number(decimal) / values] + expected: FAIL + + [line-height length(pt) / values] + expected: FAIL + + [line-height length(pc) / values] + expected: FAIL + + [line-height length(px) / values] + expected: FAIL + + [line-height length(em) / values] + expected: FAIL + + [line-height length(ex) / values] + expected: FAIL + + [line-height length(mm) / values] + expected: FAIL + + [line-height length(cm) / values] + expected: FAIL + + [line-height length(in) / values] + expected: FAIL + + [line-height percentage(%) / values] + expected: FAIL + + [letter-spacing length(pt) / values] + expected: FAIL + + [letter-spacing length(pc) / values] + expected: FAIL + + [letter-spacing length(px) / values] + expected: FAIL + + [letter-spacing length(em) / values] + expected: FAIL + + [letter-spacing length(ex) / values] + expected: FAIL + + [letter-spacing length(mm) / values] + expected: FAIL + + [letter-spacing length(cm) / values] + expected: FAIL + + [letter-spacing length(in) / values] + expected: FAIL + + [word-spacing length(pt) / values] + expected: FAIL + + [word-spacing length(pc) / values] + expected: FAIL + + [word-spacing length(px) / values] + expected: FAIL + + [word-spacing length(em) / values] + expected: FAIL + + [word-spacing length(ex) / values] + expected: FAIL + + [word-spacing length(mm) / values] + expected: FAIL + + [word-spacing length(cm) / values] + expected: FAIL + + [word-spacing length(in) / values] + expected: FAIL + + [word-spacing percentage(%) / values] + expected: FAIL + + [text-indent length(pt) / values] + expected: FAIL + + [text-indent length(pc) / values] + expected: FAIL + + [text-indent length(px) / values] + expected: FAIL + + [text-indent length(em) / values] + expected: FAIL + + [text-indent length(ex) / values] + expected: FAIL + + [text-indent length(mm) / values] + expected: FAIL + + [text-indent length(cm) / values] + expected: FAIL + + [text-indent length(in) / values] + expected: FAIL + + [text-indent percentage(%) / values] + expected: FAIL + + [text-shadow shadow(shadow) / values] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-transitions/properties-value-inherit-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-transitions/properties-value-inherit-001.html.ini index 1ec7e33c39a..875c9062562 100644 --- a/tests/wpt/metadata-layout-2020/css/css-transitions/properties-value-inherit-001.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-transitions/properties-value-inherit-001.html.ini @@ -236,156 +236,6 @@ [margin-right length(mm) / events] expected: FAIL - [max-height length(ex) / events] - expected: FAIL - - [max-height length(mm) / events] - expected: FAIL - - [max-height length(cm) / events] - expected: FAIL - - [max-height length(in) / events] - expected: FAIL - - [max-height percentage(%) / events] - expected: FAIL - - [max-width length(pt) / events] - expected: FAIL - - [max-width length(pc) / events] - expected: FAIL - - [max-width length(px) / events] - expected: FAIL - - [max-width length(em) / events] - expected: FAIL - - [max-width length(ex) / events] - expected: FAIL - - [max-width length(mm) / events] - expected: FAIL - - [max-width length(cm) / events] - expected: FAIL - - [max-width length(in) / events] - expected: FAIL - - [max-width percentage(%) / events] - expected: FAIL - - [top length(pt) / events] - expected: FAIL - - [top length(pc) / events] - expected: FAIL - - [top length(px) / events] - expected: FAIL - - [top length(em) / events] - expected: FAIL - - [top length(ex) / events] - expected: FAIL - - [top length(mm) / events] - expected: FAIL - - [top length(cm) / events] - expected: FAIL - - [top length(in) / events] - expected: FAIL - - [top percentage(%) / events] - expected: FAIL - - [right length(pt) / events] - expected: FAIL - - [right length(pc) / events] - expected: FAIL - - [right length(px) / events] - expected: FAIL - - [right length(em) / events] - expected: FAIL - - [right length(ex) / events] - expected: FAIL - - [right length(mm) / events] - expected: FAIL - - [right length(cm) / events] - expected: FAIL - - [right length(in) / events] - expected: FAIL - - [right percentage(%) / events] - expected: FAIL - - [bottom length(pt) / events] - expected: FAIL - - [bottom length(pc) / events] - expected: FAIL - - [bottom length(px) / events] - expected: FAIL - - [bottom length(em) / events] - expected: FAIL - - [bottom length(ex) / events] - expected: FAIL - - [bottom length(mm) / events] - expected: FAIL - - [bottom length(cm) / events] - expected: FAIL - - [bottom length(in) / events] - expected: FAIL - - [bottom percentage(%) / events] - expected: FAIL - - [left length(pt) / events] - expected: FAIL - - [left length(pc) / events] - expected: FAIL - - [left length(px) / events] - expected: FAIL - - [left length(em) / events] - expected: FAIL - - [left length(ex) / events] - expected: FAIL - - [left length(mm) / events] - expected: FAIL - - [left length(cm) / events] - expected: FAIL - - [left length(in) / events] - expected: FAIL - - [left percentage(%) / events] - expected: FAIL - [color color(rgba) / events] expected: FAIL @@ -506,3 +356,126 @@ [word-spacing percentage(%) / events] expected: FAIL + [background-color color(rgba) / events] + expected: FAIL + + [border-top-width length(pt) / events] + expected: FAIL + + [border-top-width length(pc) / events] + expected: FAIL + + [border-top-width length(px) / events] + expected: FAIL + + [border-top-width length(em) / events] + expected: FAIL + + [border-top-width length(ex) / events] + expected: FAIL + + [border-top-width length(mm) / events] + expected: FAIL + + [border-top-width length(cm) / events] + expected: FAIL + + [border-top-width length(in) / events] + expected: FAIL + + [border-right-width length(pt) / events] + expected: FAIL + + [border-right-width length(pc) / events] + expected: FAIL + + [border-right-width length(px) / events] + expected: FAIL + + [border-right-width length(em) / events] + expected: FAIL + + [border-right-width length(ex) / events] + expected: FAIL + + [border-right-width length(mm) / events] + expected: FAIL + + [border-right-width length(cm) / events] + expected: FAIL + + [border-right-width length(in) / events] + expected: FAIL + + [border-bottom-width length(pt) / events] + expected: FAIL + + [border-bottom-width length(pc) / events] + expected: FAIL + + [border-bottom-width length(px) / events] + expected: FAIL + + [border-bottom-width length(em) / events] + expected: FAIL + + [border-bottom-width length(ex) / events] + expected: FAIL + + [border-bottom-width length(mm) / events] + expected: FAIL + + [border-bottom-width length(cm) / events] + expected: FAIL + + [border-bottom-width length(in) / events] + expected: FAIL + + [border-left-width length(pt) / events] + expected: FAIL + + [border-left-width length(pc) / events] + expected: FAIL + + [border-left-width length(px) / events] + expected: FAIL + + [border-left-width length(em) / events] + expected: FAIL + + [border-left-width length(ex) / events] + expected: FAIL + + [border-left-width length(mm) / events] + expected: FAIL + + [border-left-width length(cm) / events] + expected: FAIL + + [border-left-width length(in) / events] + expected: FAIL + + [border-top-color color(rgba) / events] + expected: FAIL + + [border-right-color color(rgba) / events] + expected: FAIL + + [border-bottom-color color(rgba) / events] + expected: FAIL + + [border-left-color color(rgba) / events] + expected: FAIL + + [padding-bottom length(pt) / events] + expected: FAIL + + [padding-bottom length(pc) / events] + expected: FAIL + + [padding-bottom length(px) / events] + expected: FAIL + + [padding-bottom length(em) / events] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-transitions/properties-value-inherit-002.html.ini b/tests/wpt/metadata-layout-2020/css/css-transitions/properties-value-inherit-002.html.ini index 492f1b2bd2e..d28d3e209d3 100644 --- a/tests/wpt/metadata-layout-2020/css/css-transitions/properties-value-inherit-002.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-transitions/properties-value-inherit-002.html.ini @@ -326,3 +326,153 @@ [margin-right length(mm) / values] expected: FAIL + [max-height length(ex) / values] + expected: FAIL + + [max-height length(mm) / values] + expected: FAIL + + [max-height length(cm) / values] + expected: FAIL + + [max-height length(in) / values] + expected: FAIL + + [max-height percentage(%) / values] + expected: FAIL + + [max-width length(pt) / values] + expected: FAIL + + [max-width length(pc) / values] + expected: FAIL + + [max-width length(px) / values] + expected: FAIL + + [max-width length(em) / values] + expected: FAIL + + [max-width length(ex) / values] + expected: FAIL + + [max-width length(mm) / values] + expected: FAIL + + [max-width length(cm) / values] + expected: FAIL + + [max-width length(in) / values] + expected: FAIL + + [max-width percentage(%) / values] + expected: FAIL + + [top length(pt) / values] + expected: FAIL + + [top length(pc) / values] + expected: FAIL + + [top length(px) / values] + expected: FAIL + + [top length(em) / values] + expected: FAIL + + [top length(ex) / values] + expected: FAIL + + [top length(mm) / values] + expected: FAIL + + [top length(cm) / values] + expected: FAIL + + [top length(in) / values] + expected: FAIL + + [top percentage(%) / values] + expected: FAIL + + [right length(pt) / values] + expected: FAIL + + [right length(pc) / values] + expected: FAIL + + [right length(px) / values] + expected: FAIL + + [right length(em) / values] + expected: FAIL + + [right length(ex) / values] + expected: FAIL + + [right length(mm) / values] + expected: FAIL + + [right length(cm) / values] + expected: FAIL + + [right length(in) / values] + expected: FAIL + + [right percentage(%) / values] + expected: FAIL + + [bottom length(pt) / values] + expected: FAIL + + [bottom length(pc) / values] + expected: FAIL + + [bottom length(px) / values] + expected: FAIL + + [bottom length(em) / values] + expected: FAIL + + [bottom length(ex) / values] + expected: FAIL + + [bottom length(mm) / values] + expected: FAIL + + [bottom length(cm) / values] + expected: FAIL + + [bottom length(in) / values] + expected: FAIL + + [bottom percentage(%) / values] + expected: FAIL + + [left length(pt) / values] + expected: FAIL + + [left length(pc) / values] + expected: FAIL + + [left length(px) / values] + expected: FAIL + + [left length(em) / values] + expected: FAIL + + [left length(ex) / values] + expected: FAIL + + [left length(mm) / values] + expected: FAIL + + [left length(cm) / values] + expected: FAIL + + [left length(in) / values] + expected: FAIL + + [left percentage(%) / values] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-variables/variables-substitute-guaranteed-invalid.html.ini b/tests/wpt/metadata-layout-2020/css/css-variables/variables-substitute-guaranteed-invalid.html.ini index 5170c0bda67..bb401d84139 100644 --- a/tests/wpt/metadata-layout-2020/css/css-variables/variables-substitute-guaranteed-invalid.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-variables/variables-substitute-guaranteed-invalid.html.ini @@ -8,3 +8,12 @@ [A custom property referencing a non-existent variable is treated as unset] expected: FAIL + [Custom properties in a cycle become guaranteed-invalid] + expected: FAIL + + [A custom property referencing a cycle becomes guaranteed-invalid] + expected: FAIL + + [A custom property referencing a non-existent variable becomes guaranteed-invalid] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/fetch/api/basic/request-upload.any.js.ini b/tests/wpt/metadata-layout-2020/fetch/api/basic/request-upload.any.js.ini index 48e19d0d7ad..aa10334f02d 100644 --- a/tests/wpt/metadata-layout-2020/fetch/api/basic/request-upload.any.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/api/basic/request-upload.any.js.ini @@ -1,7 +1,14 @@ [request-upload.any.html] + expected: TIMEOUT [Fetch with POST with ReadableStream] expected: FAIL + [Fetch with POST with text body on 421 response should be retried once on new connection.] + expected: FAIL + + [Fetch with POST with ReadableStream on 421 response should return the response and not retry.] + expected: TIMEOUT + [request-upload.any.serviceworker.html] expected: ERROR @@ -10,6 +17,13 @@ expected: ERROR [request-upload.any.worker.html] + expected: TIMEOUT [Fetch with POST with ReadableStream] expected: FAIL + [Fetch with POST with text body on 421 response should be retried once on new connection.] + expected: FAIL + + [Fetch with POST with ReadableStream on 421 response should return the response and not retry.] + expected: TIMEOUT + diff --git a/tests/wpt/metadata-layout-2020/fetch/content-length/parsing.window.js.ini b/tests/wpt/metadata-layout-2020/fetch/content-length/parsing.window.js.ini index b5f23753298..e2400d925c3 100644 --- a/tests/wpt/metadata-layout-2020/fetch/content-length/parsing.window.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/content-length/parsing.window.js.ini @@ -41,3 +41,45 @@ [Content-Length%3A%20] expected: FAIL + [Input: "Content-Length: 42,42". Expected: 42.] + expected: FAIL + + [Input: "Content-Length: 42\\r\\nContent-Length: 42,42". Expected: 42.] + expected: FAIL + + [Input: "Content-Length: 30,30". Expected: 30.] + expected: FAIL + + [Input: "Content-Length: 30\\r\\nContent-Length: 30,30". Expected: 30.] + expected: FAIL + + [Input: "Content-Length: aaaah\\r\\nContent-Length: aaaah". Expected: 42.] + expected: FAIL + + [Input: "Content-Length: aaaah, aaaah". Expected: 42.] + expected: FAIL + + [Input: "Content-Length: aaaah". Expected: 42.] + expected: FAIL + + [Input: "Content-Length: 42s". Expected: 42.] + expected: FAIL + + [Input: "Content-Length: 30s". Expected: 42.] + expected: FAIL + + [Input: "Content-Length: -1". Expected: 42.] + expected: FAIL + + [Input: "Content-Length: 0x20". Expected: 42.] + expected: FAIL + + [Input: "Content-Length: 030\\r\\nContent-Length: 30". Expected: network error.] + expected: FAIL + + [Input: "Content-Length: \\"30\\"". Expected: 42.] + expected: FAIL + + [Input: "Content-Length: ". Expected: 42.] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini index 68c587d606f..c04c160bf1d 100644 --- a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini @@ -309,12 +309,9 @@ [Response: combined response Content-Type: text/html;" \\" text/plain ";charset=GBK] expected: NOTRUN - [ + diff --git a/tests/wpt/web-platform-tests/content-security-policy/inheritance/support/javascript-url-srcdoc-cross-origin-iframe-inheritance-helper.sub.html b/tests/wpt/web-platform-tests/content-security-policy/inheritance/support/javascript-url-srcdoc-cross-origin-iframe-inheritance-helper.sub.html new file mode 100644 index 00000000000..afe4753cf93 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/inheritance/support/javascript-url-srcdoc-cross-origin-iframe-inheritance-helper.sub.html @@ -0,0 +1,24 @@ + + + + + + diff --git a/tests/wpt/web-platform-tests/content-security-policy/inheritance/support/navigate-parent-to-blob.html b/tests/wpt/web-platform-tests/content-security-policy/inheritance/support/navigate-parent-to-blob.html new file mode 100644 index 00000000000..df4a4438935 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/inheritance/support/navigate-parent-to-blob.html @@ -0,0 +1,23 @@ + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/content-security-policy/inheritance/support/postmessage-top.html b/tests/wpt/web-platform-tests/content-security-policy/inheritance/support/postmessage-top.html new file mode 100644 index 00000000000..4f83a58dd4a --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/inheritance/support/postmessage-top.html @@ -0,0 +1,4 @@ + + diff --git a/tests/wpt/web-platform-tests/content-security-policy/support/checkReport.sub.js b/tests/wpt/web-platform-tests/content-security-policy/support/checkReport.sub.js index f188d18207e..ecbc6923909 100644 --- a/tests/wpt/web-platform-tests/content-security-policy/support/checkReport.sub.js +++ b/tests/wpt/web-platform-tests/content-security-policy/support/checkReport.sub.js @@ -70,7 +70,7 @@ assert_equals("false", reportExists, data.error); } else { if(reportExists != "" && reportExists == "false" && data["csp-report"]) { - assert_unreached("CSP report sent, but not expecting one: " + JSON.stringify(data["csp-report"])); + assert_unreached("CSP report sent, but not expecting one"); } // Firefox expands 'self' or origins in a policy to the actual origin value // so "www.example.com" becomes "http://www.example.com:80". diff --git a/tests/wpt/web-platform-tests/css/CSS2/floats/floats-placement-004.html b/tests/wpt/web-platform-tests/css/CSS2/floats/floats-placement-004.html new file mode 100644 index 00000000000..bbfc9196c86 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/CSS2/floats/floats-placement-004.html @@ -0,0 +1,9 @@ + + + +

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

+
+
+
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-env/env-in-custom-properties.tentative.html b/tests/wpt/web-platform-tests/css/css-env/env-in-custom-properties.tentative.html index 6dadcc586b0..24afe2963b9 100644 --- a/tests/wpt/web-platform-tests/css/css-env/env-in-custom-properties.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-env/env-in-custom-properties.tentative.html @@ -28,8 +28,8 @@ test(() => { const style = window.getComputedStyle(child); - assert_equals(style.getPropertyValue("--var1"), " inherited"); - }, 'Substitution of unrecognized env() causes unset'); + assert_equals(style.getPropertyValue("--var1"), ""); + }, 'Substitution of unrecognized env() causes guaranteed-invalid'); diff --git a/tests/wpt/web-platform-tests/css/css-position/sticky/position-sticky-scrollIntoView.html b/tests/wpt/web-platform-tests/css/css-position/sticky/position-sticky-scrollIntoView.html new file mode 100644 index 00000000000..6fb4723529e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-position/sticky/position-sticky-scrollIntoView.html @@ -0,0 +1,41 @@ + +Scrolling to sticky position elements uses their unshifted position + + + + + + + + + +

Title 1

+
+

Title 2

+
+

Title 3

+
+ + + + diff --git a/tests/wpt/web-platform-tests/css/css-position/sticky/position-sticky-top-and-bottom.html b/tests/wpt/web-platform-tests/css/css-position/sticky/position-sticky-top-and-bottom.html new file mode 100644 index 00000000000..c790eaaf3ee --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-position/sticky/position-sticky-top-and-bottom.html @@ -0,0 +1,57 @@ + +position:sticky elements can be constrained by top and bottom exceeding container size + + + + + + + + + +
+
+
+
+
+
+
+ + + diff --git a/tests/wpt/web-platform-tests/css/css-properties-values-api/unit-cycles.html b/tests/wpt/web-platform-tests/css/css-properties-values-api/unit-cycles.html index 5301b6fcc77..f8eba17f218 100644 --- a/tests/wpt/web-platform-tests/css/css-properties-values-api/unit-cycles.html +++ b/tests/wpt/web-platform-tests/css/css-properties-values-api/unit-cycles.html @@ -4,7 +4,7 @@ @@ -62,18 +62,18 @@ test(function() { CSS.registerProperty({name: '--registered-2-e', syntax: '', initialValue: '5px', inherits: false}); computedStyle = getComputedStyle(test2); - assert_equals(computedStyle.getPropertyValue('--registered-2-a'), ''); + assert_equals(computedStyle.getPropertyValue('--registered-2-a'), '1px'); assert_equals(computedStyle.getPropertyValue('--unregistered-2-a'), ''); - assert_equals(computedStyle.getPropertyValue('--registered-2-b'), '30px'); - assert_equals(computedStyle.getPropertyValue('--registered-2-c'), '3px'); + assert_equals(computedStyle.getPropertyValue('--registered-2-b'), '1px'); + assert_equals(computedStyle.getPropertyValue('--registered-2-c'), '1px'); assert_equals(computedStyle.getPropertyValue('--registered-2-d'), '40px'); assert_equals(computedStyle.getPropertyValue('--registered-2-e'), '5px'); - assert_equals(computedStyle.getPropertyValue('--unregistered-2-b'), '50px'); - assert_equals(computedStyle.getPropertyValue('--unregistered-2-c'), ''); + assert_equals(computedStyle.getPropertyValue('--unregistered-2-b'), '1px'); + assert_equals(computedStyle.getPropertyValue('--unregistered-2-c'), '1px'); assert_equals(computedStyle.getPropertyValue('--unregistered-2-d'), '60px'); assert_equals(computedStyle.getPropertyValue('--unregistered-2-e'), ''); - assert_equals(computedStyle.left, '70px'); + assert_equals(computedStyle.left, '1px'); assert_equals(computedStyle.top, '80px'); }, "A var() cycle between a registered properties and an unregistered property is handled correctly."); @@ -136,7 +136,7 @@ test(function() { assert_equals(computedStyle.getPropertyValue('--unregistered-4-a'), ''); assert_equals(computedStyle.getPropertyValue('--registered-4-b'), 'meow'); - assert_equals(computedStyle.getPropertyValue('--registered-4-c'), 'circle'); + assert_equals(computedStyle.getPropertyValue('--registered-4-c'), ''); assert_equals(computedStyle.getPropertyValue('--unregistered-4-b'), 'woof'); assert_equals(computedStyle.getPropertyValue('--unregistered-4-c'), ''); assert_equals(computedStyle.transitionProperty, 'water'); @@ -174,9 +174,10 @@ test(function() { let computedStyle = getComputedStyle(test5); assert_equals(computedStyle.getPropertyValue('--registered-5-a'), ''); assert_equals(computedStyle.getPropertyValue('--registered-5-b'), ''); - assert_equals(computedStyle.getPropertyValue('--registered-5-c'), 'foo'); - assert_equals(computedStyle.getPropertyValue('--registered-5-d'), 'bar'); - assert_equals(computedStyle.getPropertyValue('--registered-5-e'), 'baz'); + assert_equals(computedStyle.getPropertyValue('--registered-5-c'), ''); + assert_equals(computedStyle.getPropertyValue('--registered-5-d'), ''); + assert_equals(computedStyle.getPropertyValue('--registered-5-e'), ''); assert_equals(computedStyle.getPropertyValue('color'), 'rgb(0, 128, 0)'); -}, "Invalid at computed-value time triggers 'unset' behavior"); +}, "Custom properties with universal syntax become guaranteed-invalid when " + + "invalid at computed-value time"); diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/support/common.js b/tests/wpt/web-platform-tests/css/css-scroll-snap/support/common.js index 65feec3b6b6..038ef07a6d9 100644 --- a/tests/wpt/web-platform-tests/css/css-scroll-snap/support/common.js +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/support/common.js @@ -19,14 +19,7 @@ async function keyPress(target, key) { code = KEY_CODE_MAP[key]; // First move pointer on target and click to ensure it receives the key. - let actions = new test_driver.Actions() - .pointerMove(0, 0, {origin: target}) - .pointerDown() - .pointerUp() - .keyDown(code) - .keyUp(code); - - return actions.send(); + return test_driver.send_keys(target, code); } // Use rAF to wait for the value of the getter function passed to not change for diff --git a/tests/wpt/web-platform-tests/css/css-variables/variable-substitution-variable-declaration.html b/tests/wpt/web-platform-tests/css/css-variables/variable-substitution-variable-declaration.html index 678d05a1acc..0b0ab1f0f0f 100644 --- a/tests/wpt/web-platform-tests/css/css-variables/variable-substitution-variable-declaration.html +++ b/tests/wpt/web-platform-tests/css/css-variables/variable-substitution-variable-declaration.html @@ -140,7 +140,7 @@ { element: "target10", propertyName: "--varA", expectedPropertyValue: "" }, { element: "target10", propertyName: "--varB", expectedPropertyValue: "" }, - { element: "target10", propertyName: "--varC", expectedPropertyValue: " another good one" }, + { element: "target10", propertyName: "--varC", expectedPropertyValue: "" }, ]; testcases.forEach(function (testcase) { diff --git a/tests/wpt/web-platform-tests/css/css-variables/variables-substitute-guaranteed-invalid.html b/tests/wpt/web-platform-tests/css/css-variables/variables-substitute-guaranteed-invalid.html index c30e8746db5..4abfe28d1f2 100644 --- a/tests/wpt/web-platform-tests/css/css-variables/variables-substitute-guaranteed-invalid.html +++ b/tests/wpt/web-platform-tests/css/css-variables/variables-substitute-guaranteed-invalid.html @@ -30,15 +30,15 @@ let cs = getComputedStyle(target1); assert_equals(cs.getPropertyValue('--var1'), ''); assert_equals(cs.getPropertyValue('--var2'), ''); - }, 'Custom properties in a cycle are guaranteed-invalid'); + }, 'Custom properties in a cycle become guaranteed-invalid'); test( function () { let cs = getComputedStyle(target1); - assert_equals(cs.getPropertyValue('--var3'), ' inherited'); - }, 'A custom property referencing a cycle is treated as unset'); + assert_equals(cs.getPropertyValue('--var3'), ''); + }, 'A custom property referencing a cycle becomes guaranteed-invalid'); test( function () { let cs = getComputedStyle(target1); - assert_equals(cs.getPropertyValue('--var4'), ' inherited'); - }, 'A custom property referencing a non-existent variable is treated as unset'); + assert_equals(cs.getPropertyValue('--var4'), ''); + }, 'A custom property referencing a non-existent variable becomes guaranteed-invalid'); diff --git a/tests/wpt/web-platform-tests/editing/run/caretnavigation.html b/tests/wpt/web-platform-tests/editing/run/caretnavigation.html index defe7fecfc2..c0a8eca4ac2 100644 --- a/tests/wpt/web-platform-tests/editing/run/caretnavigation.html +++ b/tests/wpt/web-platform-tests/editing/run/caretnavigation.html @@ -28,12 +28,7 @@ const KEY_CODE_MAP = { */ function keyPress(target, key) { const code = KEY_CODE_MAP[key]; - - let actions = new test_driver.Actions() - .keyDown(code) - .keyUp(code); - - return actions.send(); + return test_driver.send_keys(target, code); } diff --git a/tests/wpt/web-platform-tests/fetch/api/basic/request-upload.any.js b/tests/wpt/web-platform-tests/fetch/api/basic/request-upload.any.js index 1412816a3c2..82b1ac93c99 100644 --- a/tests/wpt/web-platform-tests/fetch/api/basic/request-upload.any.js +++ b/tests/wpt/web-platform-tests/fetch/api/basic/request-upload.any.js @@ -1,5 +1,7 @@ // META: global=window,worker // META: script=../resources/utils.js +// META: script=/common/utils.js +// META: script=/common/get-host-info.sub.js function testUpload(desc, url, method, createBody, expectedBody) { const requestInit = {"method": method} @@ -123,3 +125,30 @@ testUploadFailure("Fetch with POST with ReadableStream containing Blob", url, controller.close(); }}) }); + +promise_test(async (test) => { + const resp = await fetch( + "/fetch/connection-pool/resources/network-partition-key.py?" + + `status=421&uuid=${token()}&partition_id=${get_host_info().ORIGIN}` + + `&dispatch=check_partition&addcounter=true`, + {method: "POST", body: "foobar"}); + assert_equals(resp.status, 421); + const text = await resp.text(); + assert_equals(text, "ok. Request was sent 2 times. 2 connections were created."); +}, "Fetch with POST with text body on 421 response should be retried once on new connection."); + +promise_test(async (test) => { + const body = new ReadableStream({start: controller => { + const encoder = new TextEncoder(); + controller.enqueue(encoder.encode("Test")); + controller.close(); + }}); + const resp = await fetch( + "/fetch/connection-pool/resources/network-partition-key.py?" + + `status=421&uuid=${token()}&partition_id=${get_host_info().ORIGIN}` + + `&dispatch=check_partition&addcounter=true`, + {method: "POST", body: body}); + assert_equals(resp.status, 421); + const text = await resp.text(); + assert_equals(text, "ok. Request was sent 1 times. 1 connections were created."); +}, "Fetch with POST with ReadableStream on 421 response should return the response and not retry."); diff --git a/tests/wpt/web-platform-tests/fetch/connection-pool/resources/network-partition-key.py b/tests/wpt/web-platform-tests/fetch/connection-pool/resources/network-partition-key.py index 61e0496fca3..d59c74137b8 100644 --- a/tests/wpt/web-platform-tests/fetch/connection-pool/resources/network-partition-key.py +++ b/tests/wpt/web-platform-tests/fetch/connection-pool/resources/network-partition-key.py @@ -25,15 +25,26 @@ def main(request, response): # Unless nocheck_partition is true, check partition_id against server_state, and update server_state. stash = request.server.stash test_failed = False + request_count = 0; + connection_count = 0; if request.GET.first(b"nocheck_partition", None) != b"True": # Need to grab the lock to access the Stash, since requests are made in parallel. with stash.lock: # Don't use server hostname here, since H2 allows multiple hosts to reuse a connection. # Server IP is not currently available, unfortunately. address_key = isomorphic_encode(str(request.client_address) + u"|" + str(request.url_parts.port)) - server_state = stash.take(uuid) or {b"test_failed": False} - if address_key in server_state and server_state[address_key] != partition_id: - server_state[b"test_failed"] = True + server_state = stash.take(uuid) or {b"test_failed": False, + b"request_count": 0, b"connection_count": 0} + request_count = server_state[b"request_count"] + request_count += 1 + server_state[b"request_count"] = request_count + if address_key in server_state: + if server_state[address_key] != partition_id: + server_state[b"test_failed"] = True + else: + connection_count = server_state[b"connection_count"] + connection_count += 1 + server_state[b"connection_count"] = connection_count server_state[address_key] = partition_id test_failed = server_state[b"test_failed"] stash.put(uuid, server_state) @@ -50,9 +61,14 @@ def main(request, response): return handle_fetch_file(request, response, partition_id, uuid) if dispatch == b"check_partition": + status = request.GET.first(b"status", 200) if test_failed: - return simple_response(request, response, 200, b"OK", b"Multiple partition IDs used on a socket") - return simple_response(request, response, 200, b"OK", b"ok") + return simple_response(request, response, status, b"OK", b"Multiple partition IDs used on a socket") + body = b"ok" + if request.GET.first(b"addcounter", False): + body += (". Request was sent " + str(request_count) + " times. " + + str(connection_count) + " connections were created.").encode('utf-8') + return simple_response(request, response, status, b"OK", body) if dispatch == b"clean_up": stash.take(uuid) diff --git a/tests/wpt/web-platform-tests/fetch/content-length/parsing.window.js b/tests/wpt/web-platform-tests/fetch/content-length/parsing.window.js index 73fbb482e04..5028ad943de 100644 --- a/tests/wpt/web-platform-tests/fetch/content-length/parsing.window.js +++ b/tests/wpt/web-platform-tests/fetch/content-length/parsing.window.js @@ -3,17 +3,16 @@ promise_test(() => { }, "Loading JSON…"); function runTests(testUnits) { - testUnits.forEach(testUnit => { - const input = encodeURIComponent(testUnit.input); + testUnits.forEach(({ input, output }) => { promise_test(t => { - const result = fetch("resources/content-length.py?length=" + input); - if (testUnit.output === null) { + const result = fetch(`resources/content-length.py?length=${encodeURIComponent(input)}`); + if (output === null) { return promise_rejects_js(t, TypeError, result); } else { return result.then(res => res.text()).then(text => { - assert_equals(text.length, testUnit.output); + assert_equals(text.length, output); }); } - }, input); + }, `Input: ${format_value(input)}. Expected: ${output === null ? "network error" : output}.`); }); } diff --git a/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/reporting/resources/dispatcher.js b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/reporting/resources/dispatcher.js index 45225a7f263..dd96310e410 100644 --- a/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/reporting/resources/dispatcher.js +++ b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/reporting/resources/dispatcher.js @@ -10,10 +10,28 @@ const dispatcher_path = '/html/cross-origin-opener-policy/reporting/resources/dispatcher.py'; const dispatcher_url = new URL(dispatcher_path, location.href).href; +// Return a promise, limiting the number of concurrent accesses to a shared +// resources to |max_concurrent_access|. +const concurrencyLimiter = (max_concurrency) => { + let pending = 0; + let waiting = []; + return async (task) => { + pending++; + if (pending > max_concurrency) + await new Promise(resolve => waiting.push(resolve)); + await task(); + pending--; + waiting.shift()?.(); + }; +} + +// The official web-platform-test runner sometimes drop POST requests when +// too many are requested in parallel. Limiting this document to send only one +// at a time fixes the issue. +const sendLimiter = concurrencyLimiter(1); + const send = async function(uuid, message) { - // The official web-platform-test runner sometimes drop POST requests when - // many are requested in parallel. Using a lock fixes the issue. - await navigator.locks.request("dispatcher_send", async lock => { + await sendLimiter(async () => { await fetch(dispatcher_url + `?uuid=${uuid}`, { method: 'POST', body: message diff --git a/tests/wpt/web-platform-tests/infrastructure/testdriver/actions/elementTiming.html b/tests/wpt/web-platform-tests/infrastructure/testdriver/actions/elementTiming.html index cdfdff55f33..ec71e0477ba 100644 --- a/tests/wpt/web-platform-tests/infrastructure/testdriver/actions/elementTiming.html +++ b/tests/wpt/web-platform-tests/infrastructure/testdriver/actions/elementTiming.html @@ -36,20 +36,31 @@ let events = []; async_test(t => { let test1 = document.getElementById("test1"); let test2 = document.getElementById("test2"); - document.getElementById("test1").addEventListener("click", - () => {test2.style.display = "block"; test2.style.top = "100px"; test2.style.left = "0"}); - document.getElementById("test2").addEventListener("click", - e => {events.push(e.clientX); events.push(e.clientY)}); + test1.addEventListener("click", + () => { + test2.style.display = "block"; + test2.style.top = "100px"; + test2.style.left = "0"}); + test2.addEventListener("click", + e => { + events.push(e.clientX); + events.push(e.clientY);}); - let div = document.getElementById("backing"); + const waitCondition = new Promise((resolve, reject)=>{setTimeout(resolve, 5000);}); + const test1ClickWatcher = new EventWatcher(t, test1, ["click"], ()=>waitCondition); + const test2ClickWatcher = new EventWatcher(t, test2, ["click"], ()=>waitCondition); + let waitForClicks = Promise.all([test1ClickWatcher.wait_for(["click"]), test2ClickWatcher.wait_for(["click"])]); let actions = new test_driver.Actions() .pointerMove(0, 0, {origin: test1}) .pointerDown() .pointerUp() - .pointerMove(0, 0, {origin: test2}) - .pointerDown() - .pointerUp() .send() + .then(()=>new test_driver.Actions() + .pointerMove(0, 0, {origin: test2}) + .pointerDown() + .pointerUp() + .send()) + .then(()=>waitForClicks) .then(t.step_func_done(() => assert_array_equals(events, [50, 150]))) .catch(e => t.step_func(() => assert_unreached("Actions sequence failed " + e))); }); diff --git a/tests/wpt/web-platform-tests/interfaces/webgl1.idl b/tests/wpt/web-platform-tests/interfaces/webgl1.idl index 95a0fa34265..46d629193c9 100644 --- a/tests/wpt/web-platform-tests/interfaces/webgl1.idl +++ b/tests/wpt/web-platform-tests/interfaces/webgl1.idl @@ -523,33 +523,33 @@ interface mixin WebGLRenderingContextBase sequence? getSupportedExtensions(); object? getExtension(DOMString name); - void activeTexture(GLenum texture); - void attachShader(WebGLProgram program, WebGLShader shader); - void bindAttribLocation(WebGLProgram program, GLuint index, DOMString name); - void bindBuffer(GLenum target, WebGLBuffer? buffer); - void bindFramebuffer(GLenum target, WebGLFramebuffer? framebuffer); - void bindRenderbuffer(GLenum target, WebGLRenderbuffer? renderbuffer); - void bindTexture(GLenum target, WebGLTexture? texture); - void blendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); - void blendEquation(GLenum mode); - void blendEquationSeparate(GLenum modeRGB, GLenum modeAlpha); - void blendFunc(GLenum sfactor, GLenum dfactor); - void blendFuncSeparate(GLenum srcRGB, GLenum dstRGB, - GLenum srcAlpha, GLenum dstAlpha); + undefined activeTexture(GLenum texture); + undefined attachShader(WebGLProgram program, WebGLShader shader); + undefined bindAttribLocation(WebGLProgram program, GLuint index, DOMString name); + undefined bindBuffer(GLenum target, WebGLBuffer? buffer); + undefined bindFramebuffer(GLenum target, WebGLFramebuffer? framebuffer); + undefined bindRenderbuffer(GLenum target, WebGLRenderbuffer? renderbuffer); + undefined bindTexture(GLenum target, WebGLTexture? texture); + undefined blendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); + undefined blendEquation(GLenum mode); + undefined blendEquationSeparate(GLenum modeRGB, GLenum modeAlpha); + undefined blendFunc(GLenum sfactor, GLenum dfactor); + undefined blendFuncSeparate(GLenum srcRGB, GLenum dstRGB, + GLenum srcAlpha, GLenum dstAlpha); [WebGLHandlesContextLoss] GLenum checkFramebufferStatus(GLenum target); - void clear(GLbitfield mask); - void clearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); - void clearDepth(GLclampf depth); - void clearStencil(GLint s); - void colorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); - void compileShader(WebGLShader shader); + undefined clear(GLbitfield mask); + undefined clearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); + undefined clearDepth(GLclampf depth); + undefined clearStencil(GLint s); + undefined colorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); + undefined compileShader(WebGLShader shader); - void copyTexImage2D(GLenum target, GLint level, GLenum internalformat, - GLint x, GLint y, GLsizei width, GLsizei height, - GLint border); - void copyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLint x, GLint y, GLsizei width, GLsizei height); + undefined copyTexImage2D(GLenum target, GLint level, GLenum internalformat, + GLint x, GLint y, GLsizei width, GLsizei height, + GLint border); + undefined copyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLint x, GLint y, GLsizei width, GLsizei height); WebGLBuffer? createBuffer(); WebGLFramebuffer? createFramebuffer(); @@ -558,36 +558,36 @@ interface mixin WebGLRenderingContextBase WebGLShader? createShader(GLenum type); WebGLTexture? createTexture(); - void cullFace(GLenum mode); + undefined cullFace(GLenum mode); - void deleteBuffer(WebGLBuffer? buffer); - void deleteFramebuffer(WebGLFramebuffer? framebuffer); - void deleteProgram(WebGLProgram? program); - void deleteRenderbuffer(WebGLRenderbuffer? renderbuffer); - void deleteShader(WebGLShader? shader); - void deleteTexture(WebGLTexture? texture); + undefined deleteBuffer(WebGLBuffer? buffer); + undefined deleteFramebuffer(WebGLFramebuffer? framebuffer); + undefined deleteProgram(WebGLProgram? program); + undefined deleteRenderbuffer(WebGLRenderbuffer? renderbuffer); + undefined deleteShader(WebGLShader? shader); + undefined deleteTexture(WebGLTexture? texture); - void depthFunc(GLenum func); - void depthMask(GLboolean flag); - void depthRange(GLclampf zNear, GLclampf zFar); - void detachShader(WebGLProgram program, WebGLShader shader); - void disable(GLenum cap); - void disableVertexAttribArray(GLuint index); - void drawArrays(GLenum mode, GLint first, GLsizei count); - void drawElements(GLenum mode, GLsizei count, GLenum type, GLintptr offset); + undefined depthFunc(GLenum func); + undefined depthMask(GLboolean flag); + undefined depthRange(GLclampf zNear, GLclampf zFar); + undefined detachShader(WebGLProgram program, WebGLShader shader); + undefined disable(GLenum cap); + undefined disableVertexAttribArray(GLuint index); + undefined drawArrays(GLenum mode, GLint first, GLsizei count); + undefined drawElements(GLenum mode, GLsizei count, GLenum type, GLintptr offset); - void enable(GLenum cap); - void enableVertexAttribArray(GLuint index); - void finish(); - void flush(); - void framebufferRenderbuffer(GLenum target, GLenum attachment, - GLenum renderbuffertarget, - WebGLRenderbuffer? renderbuffer); - void framebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, - WebGLTexture? texture, GLint level); - void frontFace(GLenum mode); + undefined enable(GLenum cap); + undefined enableVertexAttribArray(GLuint index); + undefined finish(); + undefined flush(); + undefined framebufferRenderbuffer(GLenum target, GLenum attachment, + GLenum renderbuffertarget, + WebGLRenderbuffer? renderbuffer); + undefined framebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, + WebGLTexture? texture, GLint level); + undefined frontFace(GLenum mode); - void generateMipmap(GLenum target); + undefined generateMipmap(GLenum target); WebGLActiveInfo? getActiveAttrib(WebGLProgram program, GLuint index); WebGLActiveInfo? getActiveUniform(WebGLProgram program, GLuint index); @@ -621,7 +621,7 @@ interface mixin WebGLRenderingContextBase [WebGLHandlesContextLoss] GLintptr getVertexAttribOffset(GLuint index, GLenum pname); - void hint(GLenum target, GLenum mode); + undefined hint(GLenum target, GLenum mode); [WebGLHandlesContextLoss] GLboolean isBuffer(WebGLBuffer? buffer); [WebGLHandlesContextLoss] GLboolean isEnabled(GLenum cap); [WebGLHandlesContextLoss] GLboolean isFramebuffer(WebGLFramebuffer? framebuffer); @@ -629,99 +629,99 @@ interface mixin WebGLRenderingContextBase [WebGLHandlesContextLoss] GLboolean isRenderbuffer(WebGLRenderbuffer? renderbuffer); [WebGLHandlesContextLoss] GLboolean isShader(WebGLShader? shader); [WebGLHandlesContextLoss] GLboolean isTexture(WebGLTexture? texture); - void lineWidth(GLfloat width); - void linkProgram(WebGLProgram program); - void pixelStorei(GLenum pname, GLint param); - void polygonOffset(GLfloat factor, GLfloat units); + undefined lineWidth(GLfloat width); + undefined linkProgram(WebGLProgram program); + undefined pixelStorei(GLenum pname, GLint param); + undefined polygonOffset(GLfloat factor, GLfloat units); - void renderbufferStorage(GLenum target, GLenum internalformat, - GLsizei width, GLsizei height); - void sampleCoverage(GLclampf value, GLboolean invert); - void scissor(GLint x, GLint y, GLsizei width, GLsizei height); + undefined renderbufferStorage(GLenum target, GLenum internalformat, + GLsizei width, GLsizei height); + undefined sampleCoverage(GLclampf value, GLboolean invert); + undefined scissor(GLint x, GLint y, GLsizei width, GLsizei height); - void shaderSource(WebGLShader shader, DOMString source); + undefined shaderSource(WebGLShader shader, DOMString source); - void stencilFunc(GLenum func, GLint ref, GLuint mask); - void stencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask); - void stencilMask(GLuint mask); - void stencilMaskSeparate(GLenum face, GLuint mask); - void stencilOp(GLenum fail, GLenum zfail, GLenum zpass); - void stencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass); + undefined stencilFunc(GLenum func, GLint ref, GLuint mask); + undefined stencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask); + undefined stencilMask(GLuint mask); + undefined stencilMaskSeparate(GLenum face, GLuint mask); + undefined stencilOp(GLenum fail, GLenum zfail, GLenum zpass); + undefined stencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass); - void texParameterf(GLenum target, GLenum pname, GLfloat param); - void texParameteri(GLenum target, GLenum pname, GLint param); + undefined texParameterf(GLenum target, GLenum pname, GLfloat param); + undefined texParameteri(GLenum target, GLenum pname, GLint param); - void uniform1f(WebGLUniformLocation? location, GLfloat x); - void uniform2f(WebGLUniformLocation? location, GLfloat x, GLfloat y); - void uniform3f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z); - void uniform4f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); + undefined uniform1f(WebGLUniformLocation? location, GLfloat x); + undefined uniform2f(WebGLUniformLocation? location, GLfloat x, GLfloat y); + undefined uniform3f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z); + undefined uniform4f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); - void uniform1i(WebGLUniformLocation? location, GLint x); - void uniform2i(WebGLUniformLocation? location, GLint x, GLint y); - void uniform3i(WebGLUniformLocation? location, GLint x, GLint y, GLint z); - void uniform4i(WebGLUniformLocation? location, GLint x, GLint y, GLint z, GLint w); + undefined uniform1i(WebGLUniformLocation? location, GLint x); + undefined uniform2i(WebGLUniformLocation? location, GLint x, GLint y); + undefined uniform3i(WebGLUniformLocation? location, GLint x, GLint y, GLint z); + undefined uniform4i(WebGLUniformLocation? location, GLint x, GLint y, GLint z, GLint w); - void useProgram(WebGLProgram? program); - void validateProgram(WebGLProgram program); + undefined useProgram(WebGLProgram? program); + undefined validateProgram(WebGLProgram program); - void vertexAttrib1f(GLuint index, GLfloat x); - void vertexAttrib2f(GLuint index, GLfloat x, GLfloat y); - void vertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z); - void vertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); + undefined vertexAttrib1f(GLuint index, GLfloat x); + undefined vertexAttrib2f(GLuint index, GLfloat x, GLfloat y); + undefined vertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z); + undefined vertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); - void vertexAttrib1fv(GLuint index, Float32List values); - void vertexAttrib2fv(GLuint index, Float32List values); - void vertexAttrib3fv(GLuint index, Float32List values); - void vertexAttrib4fv(GLuint index, Float32List values); + undefined vertexAttrib1fv(GLuint index, Float32List values); + undefined vertexAttrib2fv(GLuint index, Float32List values); + undefined vertexAttrib3fv(GLuint index, Float32List values); + undefined vertexAttrib4fv(GLuint index, Float32List values); - void vertexAttribPointer(GLuint index, GLint size, GLenum type, - GLboolean normalized, GLsizei stride, GLintptr offset); + undefined vertexAttribPointer(GLuint index, GLint size, GLenum type, + GLboolean normalized, GLsizei stride, GLintptr offset); - void viewport(GLint x, GLint y, GLsizei width, GLsizei height); + undefined viewport(GLint x, GLint y, GLsizei width, GLsizei height); }; interface mixin WebGLRenderingContextOverloads { - void bufferData(GLenum target, GLsizeiptr size, GLenum usage); - void bufferData(GLenum target, [AllowShared] BufferSource? data, GLenum usage); - void bufferSubData(GLenum target, GLintptr offset, [AllowShared] BufferSource data); + undefined bufferData(GLenum target, GLsizeiptr size, GLenum usage); + undefined bufferData(GLenum target, [AllowShared] BufferSource? data, GLenum usage); + undefined bufferSubData(GLenum target, GLintptr offset, [AllowShared] BufferSource data); - void compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, - GLsizei width, GLsizei height, GLint border, - [AllowShared] ArrayBufferView data); - void compressedTexSubImage2D(GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, GLenum format, - [AllowShared] ArrayBufferView data); + undefined compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, + GLsizei width, GLsizei height, GLint border, + [AllowShared] ArrayBufferView data); + undefined compressedTexSubImage2D(GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, GLenum format, + [AllowShared] ArrayBufferView data); - void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, - GLenum format, GLenum type, [AllowShared] ArrayBufferView? pixels); + undefined readPixels(GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, [AllowShared] ArrayBufferView? pixels); - void texImage2D(GLenum target, GLint level, GLint internalformat, - GLsizei width, GLsizei height, GLint border, GLenum format, - GLenum type, [AllowShared] ArrayBufferView? pixels); - void texImage2D(GLenum target, GLint level, GLint internalformat, - GLenum format, GLenum type, TexImageSource source); // May throw DOMException + undefined texImage2D(GLenum target, GLint level, GLint internalformat, + GLsizei width, GLsizei height, GLint border, GLenum format, + GLenum type, [AllowShared] ArrayBufferView? pixels); + undefined texImage2D(GLenum target, GLint level, GLint internalformat, + GLenum format, GLenum type, TexImageSource source); // May throw DOMException - void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, GLenum type, [AllowShared] ArrayBufferView? pixels); - void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLenum format, GLenum type, TexImageSource source); // May throw DOMException + undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, + GLenum format, GLenum type, [AllowShared] ArrayBufferView? pixels); + undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLenum format, GLenum type, TexImageSource source); // May throw DOMException - void uniform1fv(WebGLUniformLocation? location, Float32List v); - void uniform2fv(WebGLUniformLocation? location, Float32List v); - void uniform3fv(WebGLUniformLocation? location, Float32List v); - void uniform4fv(WebGLUniformLocation? location, Float32List v); + undefined uniform1fv(WebGLUniformLocation? location, Float32List v); + undefined uniform2fv(WebGLUniformLocation? location, Float32List v); + undefined uniform3fv(WebGLUniformLocation? location, Float32List v); + undefined uniform4fv(WebGLUniformLocation? location, Float32List v); - void uniform1iv(WebGLUniformLocation? location, Int32List v); - void uniform2iv(WebGLUniformLocation? location, Int32List v); - void uniform3iv(WebGLUniformLocation? location, Int32List v); - void uniform4iv(WebGLUniformLocation? location, Int32List v); + undefined uniform1iv(WebGLUniformLocation? location, Int32List v); + undefined uniform2iv(WebGLUniformLocation? location, Int32List v); + undefined uniform3iv(WebGLUniformLocation? location, Int32List v); + undefined uniform4iv(WebGLUniformLocation? location, Int32List v); - void uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List value); - void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List value); - void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List value); + undefined uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List value); + undefined uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List value); + undefined uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List value); }; [Exposed=(Window,Worker)] diff --git a/tests/wpt/web-platform-tests/interfaces/webgl2.idl b/tests/wpt/web-platform-tests/interfaces/webgl2.idl index b2e660e6b65..518637fcc72 100644 --- a/tests/wpt/web-platform-tests/interfaces/webgl2.idl +++ b/tests/wpt/web-platform-tests/interfaces/webgl2.idl @@ -298,279 +298,279 @@ interface mixin WebGL2RenderingContextBase const GLenum MAX_CLIENT_WAIT_TIMEOUT_WEBGL = 0x9247; /* Buffer objects */ - void copyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, - GLintptr writeOffset, GLsizeiptr size); + undefined copyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, + GLintptr writeOffset, GLsizeiptr size); // MapBufferRange, in particular its read-only and write-only modes, // can not be exposed safely to JavaScript. GetBufferSubData // replaces it for the purpose of fetching data back from the GPU. - void getBufferSubData(GLenum target, GLintptr srcByteOffset, [AllowShared] ArrayBufferView dstBuffer, - optional GLuint dstOffset = 0, optional GLuint length = 0); + undefined getBufferSubData(GLenum target, GLintptr srcByteOffset, [AllowShared] ArrayBufferView dstBuffer, + optional GLuint dstOffset = 0, optional GLuint length = 0); /* Framebuffer objects */ - void blitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, - GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); - void framebufferTextureLayer(GLenum target, GLenum attachment, WebGLTexture? texture, GLint level, - GLint layer); - void invalidateFramebuffer(GLenum target, sequence attachments); - void invalidateSubFramebuffer(GLenum target, sequence attachments, - GLint x, GLint y, GLsizei width, GLsizei height); - void readBuffer(GLenum src); + undefined blitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, + GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); + undefined framebufferTextureLayer(GLenum target, GLenum attachment, WebGLTexture? texture, GLint level, + GLint layer); + undefined invalidateFramebuffer(GLenum target, sequence attachments); + undefined invalidateSubFramebuffer(GLenum target, sequence attachments, + GLint x, GLint y, GLsizei width, GLsizei height); + undefined readBuffer(GLenum src); /* Renderbuffer objects */ any getInternalformatParameter(GLenum target, GLenum internalformat, GLenum pname); - void renderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, - GLsizei width, GLsizei height); + undefined renderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, + GLsizei width, GLsizei height); /* Texture objects */ - void texStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, - GLsizei height); - void texStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, - GLsizei height, GLsizei depth); + undefined texStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, + GLsizei height); + undefined texStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth); - void texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, - GLsizei depth, GLint border, GLenum format, GLenum type, GLintptr pboOffset); - void texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, - GLsizei depth, GLint border, GLenum format, GLenum type, - TexImageSource source); // May throw DOMException - void texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, - GLsizei depth, GLint border, GLenum format, GLenum type, [AllowShared] ArrayBufferView? srcData); - void texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, - GLsizei depth, GLint border, GLenum format, GLenum type, [AllowShared] ArrayBufferView srcData, - GLuint srcOffset); + undefined texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, + GLsizei depth, GLint border, GLenum format, GLenum type, GLintptr pboOffset); + undefined texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, + GLsizei depth, GLint border, GLenum format, GLenum type, + TexImageSource source); // May throw DOMException + undefined texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, + GLsizei depth, GLint border, GLenum format, GLenum type, [AllowShared] ArrayBufferView? srcData); + undefined texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, + GLsizei depth, GLint border, GLenum format, GLenum type, [AllowShared] ArrayBufferView srcData, + GLuint srcOffset); - void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, - GLintptr pboOffset); - void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, - TexImageSource source); // May throw DOMException - void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, - [AllowShared] ArrayBufferView? srcData, optional GLuint srcOffset = 0); + undefined texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, + GLintptr pboOffset); + undefined texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, + TexImageSource source); // May throw DOMException + undefined texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, + [AllowShared] ArrayBufferView? srcData, optional GLuint srcOffset = 0); - void copyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, - GLint x, GLint y, GLsizei width, GLsizei height); + undefined copyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, + GLint x, GLint y, GLsizei width, GLsizei height); - void compressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, - GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLintptr offset); - void compressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, - GLsizei height, GLsizei depth, GLint border, [AllowShared] ArrayBufferView srcData, - optional GLuint srcOffset = 0, optional GLuint srcLengthOverride = 0); + undefined compressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLintptr offset); + undefined compressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, GLint border, [AllowShared] ArrayBufferView srcData, + optional GLuint srcOffset = 0, optional GLuint srcLengthOverride = 0); - void compressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, - GLenum format, GLsizei imageSize, GLintptr offset); - void compressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, - GLenum format, [AllowShared] ArrayBufferView srcData, - optional GLuint srcOffset = 0, - optional GLuint srcLengthOverride = 0); + undefined compressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, + GLenum format, GLsizei imageSize, GLintptr offset); + undefined compressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, + GLenum format, [AllowShared] ArrayBufferView srcData, + optional GLuint srcOffset = 0, + optional GLuint srcLengthOverride = 0); /* Programs and shaders */ [WebGLHandlesContextLoss] GLint getFragDataLocation(WebGLProgram program, DOMString name); /* Uniforms */ - void uniform1ui(WebGLUniformLocation? location, GLuint v0); - void uniform2ui(WebGLUniformLocation? location, GLuint v0, GLuint v1); - void uniform3ui(WebGLUniformLocation? location, GLuint v0, GLuint v1, GLuint v2); - void uniform4ui(WebGLUniformLocation? location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); + undefined uniform1ui(WebGLUniformLocation? location, GLuint v0); + undefined uniform2ui(WebGLUniformLocation? location, GLuint v0, GLuint v1); + undefined uniform3ui(WebGLUniformLocation? location, GLuint v0, GLuint v1, GLuint v2); + undefined uniform4ui(WebGLUniformLocation? location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); - void uniform1uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0, - optional GLuint srcLength = 0); - void uniform2uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0, - optional GLuint srcLength = 0); - void uniform3uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0, - optional GLuint srcLength = 0); - void uniform4uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0, - optional GLuint srcLength = 0); - void uniformMatrix3x2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, - optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniformMatrix4x2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, - optional GLuint srcOffset = 0, optional GLuint srcLength = 0); + undefined uniform1uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0, + optional GLuint srcLength = 0); + undefined uniform2uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0, + optional GLuint srcLength = 0); + undefined uniform3uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0, + optional GLuint srcLength = 0); + undefined uniform4uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0, + optional GLuint srcLength = 0); + undefined uniformMatrix3x2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, + optional GLuint srcOffset = 0, optional GLuint srcLength = 0); + undefined uniformMatrix4x2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, + optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniformMatrix2x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, - optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniformMatrix4x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, - optional GLuint srcOffset = 0, optional GLuint srcLength = 0); + undefined uniformMatrix2x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, + optional GLuint srcOffset = 0, optional GLuint srcLength = 0); + undefined uniformMatrix4x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, + optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniformMatrix2x4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, - optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniformMatrix3x4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, - optional GLuint srcOffset = 0, optional GLuint srcLength = 0); + undefined uniformMatrix2x4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, + optional GLuint srcOffset = 0, optional GLuint srcLength = 0); + undefined uniformMatrix3x4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, + optional GLuint srcOffset = 0, optional GLuint srcLength = 0); /* Vertex attribs */ - void vertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w); - void vertexAttribI4iv(GLuint index, Int32List values); - void vertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); - void vertexAttribI4uiv(GLuint index, Uint32List values); - void vertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); + undefined vertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w); + undefined vertexAttribI4iv(GLuint index, Int32List values); + undefined vertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); + undefined vertexAttribI4uiv(GLuint index, Uint32List values); + undefined vertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); /* Writing to the drawing buffer */ - void vertexAttribDivisor(GLuint index, GLuint divisor); - void drawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount); - void drawElementsInstanced(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei instanceCount); - void drawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLintptr offset); + undefined vertexAttribDivisor(GLuint index, GLuint divisor); + undefined drawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount); + undefined drawElementsInstanced(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei instanceCount); + undefined drawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLintptr offset); /* Multiple Render Targets */ - void drawBuffers(sequence buffers); + undefined drawBuffers(sequence buffers); - void clearBufferfv(GLenum buffer, GLint drawbuffer, Float32List values, - optional GLuint srcOffset = 0); - void clearBufferiv(GLenum buffer, GLint drawbuffer, Int32List values, - optional GLuint srcOffset = 0); - void clearBufferuiv(GLenum buffer, GLint drawbuffer, Uint32List values, - optional GLuint srcOffset = 0); + undefined clearBufferfv(GLenum buffer, GLint drawbuffer, Float32List values, + optional GLuint srcOffset = 0); + undefined clearBufferiv(GLenum buffer, GLint drawbuffer, Int32List values, + optional GLuint srcOffset = 0); + undefined clearBufferuiv(GLenum buffer, GLint drawbuffer, Uint32List values, + optional GLuint srcOffset = 0); - void clearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); + undefined clearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); /* Query Objects */ WebGLQuery? createQuery(); - void deleteQuery(WebGLQuery? query); + undefined deleteQuery(WebGLQuery? query); [WebGLHandlesContextLoss] GLboolean isQuery(WebGLQuery? query); - void beginQuery(GLenum target, WebGLQuery query); - void endQuery(GLenum target); + undefined beginQuery(GLenum target, WebGLQuery query); + undefined endQuery(GLenum target); WebGLQuery? getQuery(GLenum target, GLenum pname); any getQueryParameter(WebGLQuery query, GLenum pname); /* Sampler Objects */ WebGLSampler? createSampler(); - void deleteSampler(WebGLSampler? sampler); + undefined deleteSampler(WebGLSampler? sampler); [WebGLHandlesContextLoss] GLboolean isSampler(WebGLSampler? sampler); - void bindSampler(GLuint unit, WebGLSampler? sampler); - void samplerParameteri(WebGLSampler sampler, GLenum pname, GLint param); - void samplerParameterf(WebGLSampler sampler, GLenum pname, GLfloat param); + undefined bindSampler(GLuint unit, WebGLSampler? sampler); + undefined samplerParameteri(WebGLSampler sampler, GLenum pname, GLint param); + undefined samplerParameterf(WebGLSampler sampler, GLenum pname, GLfloat param); any getSamplerParameter(WebGLSampler sampler, GLenum pname); /* Sync objects */ WebGLSync? fenceSync(GLenum condition, GLbitfield flags); [WebGLHandlesContextLoss] GLboolean isSync(WebGLSync? sync); - void deleteSync(WebGLSync? sync); + undefined deleteSync(WebGLSync? sync); GLenum clientWaitSync(WebGLSync sync, GLbitfield flags, GLuint64 timeout); - void waitSync(WebGLSync sync, GLbitfield flags, GLint64 timeout); + undefined waitSync(WebGLSync sync, GLbitfield flags, GLint64 timeout); any getSyncParameter(WebGLSync sync, GLenum pname); /* Transform Feedback */ WebGLTransformFeedback? createTransformFeedback(); - void deleteTransformFeedback(WebGLTransformFeedback? tf); + undefined deleteTransformFeedback(WebGLTransformFeedback? tf); [WebGLHandlesContextLoss] GLboolean isTransformFeedback(WebGLTransformFeedback? tf); - void bindTransformFeedback (GLenum target, WebGLTransformFeedback? tf); - void beginTransformFeedback(GLenum primitiveMode); - void endTransformFeedback(); - void transformFeedbackVaryings(WebGLProgram program, sequence varyings, GLenum bufferMode); + undefined bindTransformFeedback (GLenum target, WebGLTransformFeedback? tf); + undefined beginTransformFeedback(GLenum primitiveMode); + undefined endTransformFeedback(); + undefined transformFeedbackVaryings(WebGLProgram program, sequence varyings, GLenum bufferMode); WebGLActiveInfo? getTransformFeedbackVarying(WebGLProgram program, GLuint index); - void pauseTransformFeedback(); - void resumeTransformFeedback(); + undefined pauseTransformFeedback(); + undefined resumeTransformFeedback(); /* Uniform Buffer Objects and Transform Feedback Buffers */ - void bindBufferBase(GLenum target, GLuint index, WebGLBuffer? buffer); - void bindBufferRange(GLenum target, GLuint index, WebGLBuffer? buffer, GLintptr offset, GLsizeiptr size); + undefined bindBufferBase(GLenum target, GLuint index, WebGLBuffer? buffer); + undefined bindBufferRange(GLenum target, GLuint index, WebGLBuffer? buffer, GLintptr offset, GLsizeiptr size); any getIndexedParameter(GLenum target, GLuint index); sequence? getUniformIndices(WebGLProgram program, sequence uniformNames); any getActiveUniforms(WebGLProgram program, sequence uniformIndices, GLenum pname); GLuint getUniformBlockIndex(WebGLProgram program, DOMString uniformBlockName); any getActiveUniformBlockParameter(WebGLProgram program, GLuint uniformBlockIndex, GLenum pname); DOMString? getActiveUniformBlockName(WebGLProgram program, GLuint uniformBlockIndex); - void uniformBlockBinding(WebGLProgram program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); + undefined uniformBlockBinding(WebGLProgram program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); /* Vertex Array Objects */ WebGLVertexArrayObject? createVertexArray(); - void deleteVertexArray(WebGLVertexArrayObject? vertexArray); + undefined deleteVertexArray(WebGLVertexArrayObject? vertexArray); [WebGLHandlesContextLoss] GLboolean isVertexArray(WebGLVertexArrayObject? vertexArray); - void bindVertexArray(WebGLVertexArrayObject? array); + undefined bindVertexArray(WebGLVertexArrayObject? array); }; interface mixin WebGL2RenderingContextOverloads { // WebGL1: - void bufferData(GLenum target, GLsizeiptr size, GLenum usage); - void bufferData(GLenum target, [AllowShared] BufferSource? srcData, GLenum usage); - void bufferSubData(GLenum target, GLintptr dstByteOffset, [AllowShared] BufferSource srcData); + undefined bufferData(GLenum target, GLsizeiptr size, GLenum usage); + undefined bufferData(GLenum target, [AllowShared] BufferSource? srcData, GLenum usage); + undefined bufferSubData(GLenum target, GLintptr dstByteOffset, [AllowShared] BufferSource srcData); // WebGL2: - void bufferData(GLenum target, [AllowShared] ArrayBufferView srcData, GLenum usage, GLuint srcOffset, - optional GLuint length = 0); - void bufferSubData(GLenum target, GLintptr dstByteOffset, [AllowShared] ArrayBufferView srcData, - GLuint srcOffset, optional GLuint length = 0); + undefined bufferData(GLenum target, [AllowShared] ArrayBufferView srcData, GLenum usage, GLuint srcOffset, + optional GLuint length = 0); + undefined bufferSubData(GLenum target, GLintptr dstByteOffset, [AllowShared] ArrayBufferView srcData, + GLuint srcOffset, optional GLuint length = 0); // WebGL1 legacy entrypoints: - void texImage2D(GLenum target, GLint level, GLint internalformat, - GLsizei width, GLsizei height, GLint border, GLenum format, - GLenum type, [AllowShared] ArrayBufferView? pixels); - void texImage2D(GLenum target, GLint level, GLint internalformat, - GLenum format, GLenum type, TexImageSource source); // May throw DOMException + undefined texImage2D(GLenum target, GLint level, GLint internalformat, + GLsizei width, GLsizei height, GLint border, GLenum format, + GLenum type, [AllowShared] ArrayBufferView? pixels); + undefined texImage2D(GLenum target, GLint level, GLint internalformat, + GLenum format, GLenum type, TexImageSource source); // May throw DOMException - void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, GLenum type, [AllowShared] ArrayBufferView? pixels); - void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLenum format, GLenum type, TexImageSource source); // May throw DOMException + undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, + GLenum format, GLenum type, [AllowShared] ArrayBufferView? pixels); + undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLenum format, GLenum type, TexImageSource source); // May throw DOMException // WebGL2 entrypoints: - void texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, - GLint border, GLenum format, GLenum type, GLintptr pboOffset); - void texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, - GLint border, GLenum format, GLenum type, - TexImageSource source); // May throw DOMException - void texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, - GLint border, GLenum format, GLenum type, [AllowShared] ArrayBufferView srcData, - GLuint srcOffset); + undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, + GLint border, GLenum format, GLenum type, GLintptr pboOffset); + undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, + GLint border, GLenum format, GLenum type, + TexImageSource source); // May throw DOMException + undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, + GLint border, GLenum format, GLenum type, [AllowShared] ArrayBufferView srcData, + GLuint srcOffset); - void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, GLintptr pboOffset); - void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, - TexImageSource source); // May throw DOMException - void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, - GLsizei height, GLenum format, GLenum type, [AllowShared] ArrayBufferView srcData, - GLuint srcOffset); + undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, + GLsizei height, GLenum format, GLenum type, GLintptr pboOffset); + undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, + GLsizei height, GLenum format, GLenum type, + TexImageSource source); // May throw DOMException + undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, + GLsizei height, GLenum format, GLenum type, [AllowShared] ArrayBufferView srcData, + GLuint srcOffset); - void compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, - GLsizei height, GLint border, GLsizei imageSize, GLintptr offset); - void compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, - GLsizei height, GLint border, [AllowShared] ArrayBufferView srcData, - optional GLuint srcOffset = 0, optional GLuint srcLengthOverride = 0); + undefined compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, + GLsizei height, GLint border, GLsizei imageSize, GLintptr offset); + undefined compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, + GLsizei height, GLint border, [AllowShared] ArrayBufferView srcData, + optional GLuint srcOffset = 0, optional GLuint srcLengthOverride = 0); - void compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, GLintptr offset); - void compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, GLenum format, - [AllowShared] ArrayBufferView srcData, - optional GLuint srcOffset = 0, - optional GLuint srcLengthOverride = 0); + undefined compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, GLintptr offset); + undefined compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, GLenum format, + [AllowShared] ArrayBufferView srcData, + optional GLuint srcOffset = 0, + optional GLuint srcLengthOverride = 0); - void uniform1fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0, - optional GLuint srcLength = 0); - void uniform2fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0, - optional GLuint srcLength = 0); - void uniform3fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0, - optional GLuint srcLength = 0); - void uniform4fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0, - optional GLuint srcLength = 0); + undefined uniform1fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0, + optional GLuint srcLength = 0); + undefined uniform2fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0, + optional GLuint srcLength = 0); + undefined uniform3fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0, + optional GLuint srcLength = 0); + undefined uniform4fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0, + optional GLuint srcLength = 0); - void uniform1iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0, - optional GLuint srcLength = 0); - void uniform2iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0, - optional GLuint srcLength = 0); - void uniform3iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0, - optional GLuint srcLength = 0); - void uniform4iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0, - optional GLuint srcLength = 0); + undefined uniform1iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0, + optional GLuint srcLength = 0); + undefined uniform2iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0, + optional GLuint srcLength = 0); + undefined uniform3iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0, + optional GLuint srcLength = 0); + undefined uniform4iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0, + optional GLuint srcLength = 0); - void uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, - optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, - optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, - optional GLuint srcOffset = 0, optional GLuint srcLength = 0); + undefined uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, + optional GLuint srcOffset = 0, optional GLuint srcLength = 0); + undefined uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, + optional GLuint srcOffset = 0, optional GLuint srcLength = 0); + undefined uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, + optional GLuint srcOffset = 0, optional GLuint srcLength = 0); /* Reading back pixels */ // WebGL1: - void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, - [AllowShared] ArrayBufferView? dstData); + undefined readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, + [AllowShared] ArrayBufferView? dstData); // WebGL2: - void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, - GLintptr offset); - void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, - [AllowShared] ArrayBufferView dstData, GLuint dstOffset); + undefined readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, + GLintptr offset); + undefined readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, + [AllowShared] ArrayBufferView dstData, GLuint dstOffset); }; [Exposed=(Window,Worker)] diff --git a/tests/wpt/web-platform-tests/pointerevents/pointerevent_touch-action-keyboard.html b/tests/wpt/web-platform-tests/pointerevents/pointerevent_touch-action-keyboard.html index aeff71331dd..ba087ab6415 100644 --- a/tests/wpt/web-platform-tests/pointerevents/pointerevent_touch-action-keyboard.html +++ b/tests/wpt/web-platform-tests/pointerevents/pointerevent_touch-action-keyboard.html @@ -120,17 +120,21 @@ }); // Inject keyboard scroll inputs. + const arrow_down = "\uE015"; + const arrow_right = "\uE014"; + actions_promise = new test_driver.Actions() .addPointer("mousePointer1", "mouse") .pointerMove(0, 0, {origin: target0}) .pointerDown() .pointerUp() .addTick() - .keyDown("\uE015") - .keyUp("\uE015") - .keyDown("\uE014") - .keyUp("\uE014") .send(); + actions_promise = actions_promise + .then(()=>test_driver.send_keys(target0, arrow_down)) + .then(()=>test_driver.send_keys(target0, arrow_down)) + .then(()=>test_driver.send_keys(target0, arrow_right)) + .then(()=>test_driver.send_keys(target0, arrow_right)); } function updateDescriptionNextStepKeyboard() { @@ -142,4 +146,4 @@
- \ No newline at end of file + diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event.https.html index 5e56fe248c9..31a2cb05e2c 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event.https.html +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event.https.html @@ -1030,5 +1030,27 @@ promise_test(async t => { assert_true(loadend, 'loadend'); }, 'XHR upload progress events for network fallback'); +promise_test(async t => { + // Set page_url to "?ignore" so the service worker falls back to network + // for the main resource request, and add a suffix to avoid colliding + // with other tests. + const page_url = 'resources/?ignore-for-request-body-fallback-string'; + + const frame = await with_iframe(page_url); + t.add_cleanup(() => { frame.remove(); }); + // Add "?clone-and-ignore" so the service worker falls back to + // echo-content.py. + const echo_url = '/fetch/api/resources/echo-content.py?status=421'; + const response = await frame.contentWindow.fetch(echo_url, { + method: 'POST', + body: 'text body' + }); + assert_equals(response.status, 421); + const text = await response.text(); + assert_equals( + text, + 'text body. Request was sent 1 times.', + 'the network fallback request should include the request body'); + }, 'Fetch with POST with text on sw 421 response should not be retried.'); diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-event-test-worker.js b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-event-test-worker.js index ba8204b9bb8..bb59bc92865 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-event-test-worker.js +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-event-test-worker.js @@ -167,6 +167,17 @@ function handleCloneAndIgnore(event) { return; } +var handle_status_count = 0; +function handleStatus(event) { + handle_status_count++; + event.respondWith(async function() { + const res = await fetch(event.request); + const text = await res.text(); + return new Response(`${text}. Request was sent ${handle_status_count} times.`, + {"status": new URL(event.request.url).searchParams.get("status")}); + }()); +} + self.addEventListener('fetch', function(event) { var url = event.request.url; var handlers = [ @@ -194,6 +205,7 @@ self.addEventListener('fetch', function(event) { { pattern: '?isHistoryNavigation', fn: handleIsHistoryNavigation }, { pattern: '?use-and-ignore', fn: handleUseAndIgnore }, { pattern: '?clone-and-ignore', fn: handleCloneAndIgnore }, + { pattern: '?status', fn: handleStatus }, ]; var handler = null; diff --git a/tests/wpt/web-platform-tests/urlpattern/resources/urlpatterntestdata.json b/tests/wpt/web-platform-tests/urlpattern/resources/urlpatterntestdata.json index 9e7fe20005b..ae9405ea4b1 100644 --- a/tests/wpt/web-platform-tests/urlpattern/resources/urlpatterntestdata.json +++ b/tests/wpt/web-platform-tests/urlpattern/resources/urlpatterntestdata.json @@ -985,6 +985,14 @@ "username": { "input": "caf%C3%A9", "groups": {}} } }, + { + "pattern": { "username": "café" }, + "input": { "username" : "café" }, + "expected": { + "input": { "username" : "café" }, + "username": { "input": "caf%C3%A9", "groups": {}} + } + }, { "pattern": { "username": "caf%c3%a9" }, "input": { "username" : "café" }, @@ -998,6 +1006,14 @@ "password": { "input": "caf%C3%A9", "groups": {}} } }, + { + "pattern": { "password": "café" }, + "input": { "password" : "café" }, + "expected": { + "input": { "password" : "café" }, + "password": { "input": "caf%C3%A9", "groups": {}} + } + }, { "pattern": { "password": "caf%c3%a9" }, "input": { "password" : "café" }, @@ -1011,6 +1027,14 @@ "hostname": { "input": "xn--caf-dma.com", "groups": {}} } }, + { + "pattern": { "hostname": "café.com" }, + "input": { "hostname" : "café.com" }, + "expected": { + "input": { "hostname" : "café.com" }, + "hostname": { "input": "xn--caf-dma.com", "groups": {}} + } + }, { "pattern": { "port": "" }, "input": { "protocol": "http", "port": "80" }, @@ -1020,6 +1044,35 @@ "port": { "input": "", "groups": {}} } }, + { + "pattern": { "protocol": "http", "port": "80" }, + "input": { "protocol": "http", "port": "80" }, + "expected": { + "input": { "protocol": "http", "port": "80" }, + "protocol": { "input": "http", "groups": {}}, + "port": { "input": "", "groups": {}} + } + }, + { + "pattern": { "protocol": "http", "port": "80{20}?" }, + "input": { "protocol": "http", "port": "80" }, + "expected": null + }, + { + "pattern": { "protocol": "http", "port": "80 " }, + "input": { "protocol": "http", "port": "80" }, + "error": true + }, + { + "pattern": { "port": "80" }, + "input": { "protocol": "http", "port": "80" }, + "expected": null + }, + { + "pattern": { "protocol": "http{s}?", "port": "80" }, + "input": { "protocol": "http", "port": "80" }, + "expected": null + }, { "pattern": { "port": "80" }, "input": { "port": "80" }, @@ -1057,6 +1110,14 @@ "pathname": { "input": "/caf%C3%A9", "groups": {}} } }, + { + "pattern": { "pathname": "/café" }, + "input": { "pathname": "/café" }, + "expected": { + "input": { "pathname": "/café" }, + "pathname": { "input": "/caf%C3%A9", "groups": {}} + } + }, { "pattern": { "pathname": "/caf%c3%a9" }, "input": { "pathname": "/café" }, @@ -1077,6 +1138,25 @@ "pathname": { "input": "/foo/bar", "groups": {}} } }, + { + "pattern": { "pathname": "/foo/../bar" }, + "input": { "pathname": "/bar" }, + "expected": { + "input": { "pathname": "/bar" }, + "pathname": { "input": "/bar", "groups": {}} + } + }, + { + "pattern": { "pathname": "./foo/bar", "baseURL": "https://example.com" }, + "input": { "pathname": "foo/bar", "baseURL": "https://example.com" }, + "expected": { + "input": { "pathname": "foo/bar", "baseURL": "https://example.com" }, + "exactly_empty_components": [ "username", "password", "port" ], + "protocol": { "input": "https", "groups": {}}, + "hostname": { "input": "example.com", "groups": {}}, + "pathname": { "input": "/foo/bar", "groups": {}} + } + }, { "pattern": { "pathname": "foo/bar" }, "input": "https://example.com/foo/bar", @@ -1112,6 +1192,14 @@ "search": { "input": "q=caf%C3%A9", "groups": {}} } }, + { + "pattern": { "search": "q=café" }, + "input": { "search": "q=café" }, + "expected": { + "input": { "search": "q=café" }, + "search": { "input": "q=caf%C3%A9", "groups": {}} + } + }, { "pattern": { "search": "q=caf%c3%a9" }, "input": { "search": "q=café" }, @@ -1125,6 +1213,14 @@ "hash": { "input": "caf%C3%A9", "groups": {}} } }, + { + "pattern": { "hash": "café" }, + "input": { "hash": "café" }, + "expected": { + "input": { "hash": "café" }, + "hash": { "input": "caf%C3%A9", "groups": {}} + } + }, { "pattern": { "hash": "caf%c3%a9" }, "input": { "hash": "café" }, diff --git a/tests/wpt/web-platform-tests/webrtc-extensions/RTCRtpSynchronizationSource-captureTimestamp.html b/tests/wpt/web-platform-tests/webrtc-extensions/RTCRtpSynchronizationSource-captureTimestamp.html index 323c207f5e6..11f2540c946 100644 --- a/tests/wpt/web-platform-tests/webrtc-extensions/RTCRtpSynchronizationSource-captureTimestamp.html +++ b/tests/wpt/web-platform-tests/webrtc-extensions/RTCRtpSynchronizationSource-captureTimestamp.html @@ -8,145 +8,10 @@ +