diff options
author | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2018-10-05 21:34:34 -0400 |
---|---|---|
committer | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2018-10-05 23:00:35 -0400 |
commit | eda9b9b73a2a6ee07194a185c6d49115443baf4b (patch) | |
tree | 3bc76e04cdb3797140ddbcc75db32f2f438b62f4 | |
parent | 987e376ca7a4245dbc3e0c06e963278ee1ac92d1 (diff) | |
download | servo-eda9b9b73a2a6ee07194a185c6d49115443baf4b.tar.gz servo-eda9b9b73a2a6ee07194a185c6d49115443baf4b.zip |
Update web-platform-tests to revision c2b30ef30749b6a8f2cc832761dfe011e63d5e94
142 files changed, 3507 insertions, 845 deletions
diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index a9d191c5100..b7705ce00eb 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -122859,6 +122859,18 @@ {} ] ], + "css/css-images/multiple-position-color-stop-linear-2.html": [ + [ + "/css/css-images/multiple-position-color-stop-linear-2.html", + [ + [ + "/css/css-images/multiple-position-color-stop-linear-2-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-images/multiple-position-color-stop-linear.html": [ [ "/css/css-images/multiple-position-color-stop-linear.html", @@ -122871,6 +122883,18 @@ {} ] ], + "css/css-images/multiple-position-color-stop-radial-2.html": [ + [ + "/css/css-images/multiple-position-color-stop-radial-2.html", + [ + [ + "/css/css-images/multiple-position-color-stop-radial-2-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-images/multiple-position-color-stop-radial.html": [ [ "/css/css-images/multiple-position-color-stop-radial.html", @@ -165655,6 +165679,30 @@ {} ] ], + "css/cssom-view/getClientRects-inline.html": [ + [ + "/css/cssom-view/getClientRects-inline.html", + [ + [ + "/css/reference/nothing.html", + "==" + ] + ], + {} + ] + ], + "css/cssom-view/offsetTopLeftInline.html": [ + [ + "/css/cssom-view/offsetTopLeftInline.html", + [ + [ + "/css/reference/nothing.html", + "==" + ] + ], + {} + ] + ], "css/cssom-view/scrollTop-display-change.html": [ [ "/css/cssom-view/scrollTop-display-change.html", @@ -199283,11 +199331,6 @@ {} ] ], - "common/large.py": [ - [ - {} - ] - ], "common/media.js": [ [ {} @@ -211638,11 +211681,6 @@ {} ] ], - "conformance-checkers/html/elements/dl/aside-in-dt-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/dl/dd-in-template-novalid.html": [ [ {} @@ -213318,16 +213356,6 @@ {} ] ], - "conformance-checkers/html/elements/input/pattern-asterisk-novalid.html": [ - [ - {} - ] - ], - "conformance-checkers/html/elements/input/pattern-paren-novalid.html": [ - [ - {} - ] - ], "conformance-checkers/html/elements/input/type-image-formaction-empty-novalid.html": [ [ {} @@ -221758,12 +221786,22 @@ {} ] ], - "content-security-policy/object-src/object-src-2_1.html.sub.headers": [ + "content-security-policy/object-src/object-src-no-url-allowed.html.sub.headers": [ + [ + {} + ] + ], + "content-security-policy/object-src/object-src-url-allowed.html.sub.headers": [ [ {} ] ], - "content-security-policy/object-src/object-src-2_2.html.sub.headers": [ + "content-security-policy/object-src/object-src-url-embed-allowed.html.sub.headers": [ + [ + {} + ] + ], + "content-security-policy/object-src/object-src-url-redirect-allowed.html.sub.headers": [ [ {} ] @@ -259433,6 +259471,16 @@ {} ] ], + "css/css-images/multiple-position-color-stop-linear-2-ref.html": [ + [ + {} + ] + ], + "css/css-images/multiple-position-color-stop-radial-2-ref.html": [ + [ + {} + ] + ], "css/css-images/support/100x100-blue-green.html": [ [ {} @@ -281003,6 +281051,11 @@ {} ] ], + "feature-policy/reporting/encrypted-media-reporting.https.html.headers": [ + [ + {} + ] + ], "feature-policy/reporting/fullscreen-reporting.html.headers": [ [ {} @@ -281033,6 +281086,11 @@ {} ] ], + "feature-policy/reporting/picture-in-picture-reporting.html.headers": [ + [ + {} + ] + ], "feature-policy/reporting/sync-xhr-reporting.html.headers": [ [ {} @@ -287608,6 +287666,11 @@ {} ] ], + "html/editing/dnd/resources/32mb.py": [ + [ + {} + ] + ], "html/editing/dnd/resources/boxnavy.swf": [ [ {} @@ -314313,6 +314376,11 @@ {} ] ], + "webdriver/tests/get_page_source/__init__.py": [ + [ + {} + ] + ], "webdriver/tests/get_timeouts/__init__.py": [ [ {} @@ -314383,11 +314451,6 @@ {} ] ], - "webdriver/tests/page_source/__init__.py": [ - [ - {} - ] - ], "webdriver/tests/perform_actions/__init__.py": [ [ {} @@ -327012,6 +327075,12 @@ {} ] ], + "background-fetch/abort.https.window.js": [ + [ + "/background-fetch/abort.https.window.html", + {} + ] + ], "background-fetch/content-security-policy.https.window.js": [ [ "/background-fetch/content-security-policy.https.window.html", @@ -329906,43 +329975,51 @@ {} ] ], - "content-security-policy/object-src/object-src-2_1.html": [ + "content-security-policy/object-src/object-src-no-url-allowed.html": [ [ - "/content-security-policy/object-src/object-src-2_1.html", - { - "timeout": "long" - } + "/content-security-policy/object-src/object-src-no-url-allowed.html", + {} ] ], - "content-security-policy/object-src/object-src-2_2.html": [ + "content-security-policy/object-src/object-src-no-url-blocked.html": [ [ - "/content-security-policy/object-src/object-src-2_2.html", - { - "timeout": "long" - } + "/content-security-policy/object-src/object-src-no-url-blocked.html", + {} + ] + ], + "content-security-policy/object-src/object-src-url-allowed.html": [ + [ + "/content-security-policy/object-src/object-src-url-allowed.html", + {} + ] + ], + "content-security-policy/object-src/object-src-url-blocked.html": [ + [ + "/content-security-policy/object-src/object-src-url-blocked.html", + {} ] ], - "content-security-policy/object-src/object-src-no-url-allowed.sub.html": [ + "content-security-policy/object-src/object-src-url-embed-allowed.html": [ [ - "/content-security-policy/object-src/object-src-no-url-allowed.sub.html", + "/content-security-policy/object-src/object-src-url-embed-allowed.html", {} ] ], - "content-security-policy/object-src/object-src-no-url-blocked.sub.html": [ + "content-security-policy/object-src/object-src-url-embed-blocked.html": [ [ - "/content-security-policy/object-src/object-src-no-url-blocked.sub.html", + "/content-security-policy/object-src/object-src-url-embed-blocked.html", {} ] ], - "content-security-policy/object-src/object-src-url-allowed.sub.html": [ + "content-security-policy/object-src/object-src-url-redirect-allowed.html": [ [ - "/content-security-policy/object-src/object-src-url-allowed.sub.html", + "/content-security-policy/object-src/object-src-url-redirect-allowed.html", {} ] ], - "content-security-policy/object-src/object-src-url-blocked.sub.html": [ + "content-security-policy/object-src/object-src-url-redirect-blocked.sub.html": [ [ - "/content-security-policy/object-src/object-src-url-blocked.sub.html", + "/content-security-policy/object-src/object-src-url-redirect-blocked.sub.html", {} ] ], @@ -342504,6 +342581,42 @@ {} ] ], + "css/cssom-view/elementsFromPoint-inline-htb-ltr.html": [ + [ + "/css/cssom-view/elementsFromPoint-inline-htb-ltr.html", + {} + ] + ], + "css/cssom-view/elementsFromPoint-inline-htb-rtl.html": [ + [ + "/css/cssom-view/elementsFromPoint-inline-htb-rtl.html", + {} + ] + ], + "css/cssom-view/elementsFromPoint-inline-vlr-ltr.html": [ + [ + "/css/cssom-view/elementsFromPoint-inline-vlr-ltr.html", + {} + ] + ], + "css/cssom-view/elementsFromPoint-inline-vlr-rtl.html": [ + [ + "/css/cssom-view/elementsFromPoint-inline-vlr-rtl.html", + {} + ] + ], + "css/cssom-view/elementsFromPoint-inline-vrl-ltr.html": [ + [ + "/css/cssom-view/elementsFromPoint-inline-vrl-ltr.html", + {} + ] + ], + "css/cssom-view/elementsFromPoint-inline-vrl-rtl.html": [ + [ + "/css/cssom-view/elementsFromPoint-inline-vrl-rtl.html", + {} + ] + ], "css/cssom-view/elementsFromPoint-invalid-cases.html": [ [ "/css/cssom-view/elementsFromPoint-invalid-cases.html", @@ -342546,6 +342659,42 @@ {} ] ], + "css/cssom-view/getClientRects-br-htb-ltr.html": [ + [ + "/css/cssom-view/getClientRects-br-htb-ltr.html", + {} + ] + ], + "css/cssom-view/getClientRects-br-htb-rtl.html": [ + [ + "/css/cssom-view/getClientRects-br-htb-rtl.html", + {} + ] + ], + "css/cssom-view/getClientRects-br-vlr-ltr.html": [ + [ + "/css/cssom-view/getClientRects-br-vlr-ltr.html", + {} + ] + ], + "css/cssom-view/getClientRects-br-vlr-rtl.html": [ + [ + "/css/cssom-view/getClientRects-br-vlr-rtl.html", + {} + ] + ], + "css/cssom-view/getClientRects-br-vrl-ltr.html": [ + [ + "/css/cssom-view/getClientRects-br-vrl-ltr.html", + {} + ] + ], + "css/cssom-view/getClientRects-br-vrl-rtl.html": [ + [ + "/css/cssom-view/getClientRects-br-vrl-rtl.html", + {} + ] + ], "css/cssom-view/historical.html": [ [ "/css/cssom-view/historical.html", @@ -356234,6 +356383,12 @@ {} ] ], + "feature-policy/reporting/encrypted-media-reporting.https.html": [ + [ + "/feature-policy/reporting/encrypted-media-reporting.https.html", + {} + ] + ], "feature-policy/reporting/fullscreen-reporting.html": [ [ "/feature-policy/reporting/fullscreen-reporting.html", @@ -356264,6 +356419,14 @@ {} ] ], + "feature-policy/reporting/picture-in-picture-reporting.html": [ + [ + "/feature-policy/reporting/picture-in-picture-reporting.html", + { + "testdriver": true + } + ] + ], "feature-policy/reporting/sync-xhr-reporting.html": [ [ "/feature-policy/reporting/sync-xhr-reporting.html", @@ -386492,6 +386655,12 @@ {} ] ], + "permissions/test-background-fetch-permission.html": [ + [ + "/permissions/test-background-fetch-permission.html", + {} + ] + ], "picture-in-picture/disable-picture-in-picture.html": [ [ "/picture-in-picture/disable-picture-in-picture.html", @@ -400802,6 +400971,12 @@ {} ] ], + "trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests-wildcard.tentative.html": [ + [ + "/trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests-wildcard.tentative.html", + {} + ] + ], "trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests.tentative.html": [ [ "/trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests.tentative.html", @@ -405068,6 +405243,12 @@ {} ] ], + "webrtc/RTCPeerConnection-remote-track-mute.https.html": [ + [ + "/webrtc/RTCPeerConnection-remote-track-mute.https.html", + {} + ] + ], "webrtc/RTCPeerConnection-removeTrack.https.html": [ [ "/webrtc/RTCPeerConnection-removeTrack.https.html", @@ -407462,9 +407643,9 @@ {} ] ], - "webstorage/event_constructor_eventinit.html": [ + "webstorage/event_initstorageevent.html": [ [ - "/webstorage/event_constructor_eventinit.html", + "/webstorage/event_initstorageevent.html", {} ] ], @@ -407498,12 +407679,6 @@ {} ] ], - "webstorage/event_local_storageeventinit.html": [ - [ - "/webstorage/event_local_storageeventinit.html", - {} - ] - ], "webstorage/event_local_url.html": [ [ "/webstorage/event_local_url.html", @@ -407546,12 +407721,6 @@ {} ] ], - "webstorage/event_session_storageeventinit.html": [ - [ - "/webstorage/event_session_storageeventinit.html", - {} - ] - ], "webstorage/event_session_url.html": [ [ "/webstorage/event_session_url.html", @@ -431994,6 +432163,14 @@ {} ] ], + "webdriver/tests/add_cookie/user_prompts.py": [ + [ + "/webdriver/tests/add_cookie/user_prompts.py", + { + "timeout": "long" + } + ] + ], "webdriver/tests/back/back.py": [ [ "/webdriver/tests/back/back.py", @@ -432028,6 +432205,14 @@ {} ] ], + "webdriver/tests/delete_all_cookies/user_prompts.py": [ + [ + "/webdriver/tests/delete_all_cookies/user_prompts.py", + { + "timeout": "long" + } + ] + ], "webdriver/tests/delete_cookie/delete.py": [ [ "/webdriver/tests/delete_cookie/delete.py", @@ -432062,6 +432247,14 @@ } ] ], + "webdriver/tests/element_clear/user_prompts.py": [ + [ + "/webdriver/tests/element_clear/user_prompts.py", + { + "timeout": "long" + } + ] + ], "webdriver/tests/element_click/bubbling.py": [ [ "/webdriver/tests/element_click/bubbling.py", @@ -432110,6 +432303,14 @@ {} ] ], + "webdriver/tests/element_click/user_prompts.py": [ + [ + "/webdriver/tests/element_click/user_prompts.py", + { + "timeout": "long" + } + ] + ], "webdriver/tests/element_send_keys/content_editable.py": [ [ "/webdriver/tests/element_send_keys/content_editable.py", @@ -432270,6 +432471,14 @@ {} ] ], + "webdriver/tests/get_active_element/user_prompts.py": [ + [ + "/webdriver/tests/get_active_element/user_prompts.py", + { + "timeout": "long" + } + ] + ], "webdriver/tests/get_alert_text/get.py": [ [ "/webdriver/tests/get_alert_text/get.py", @@ -432296,6 +432505,14 @@ {} ] ], + "webdriver/tests/get_element_attribute/user_prompts.py": [ + [ + "/webdriver/tests/get_element_attribute/user_prompts.py", + { + "timeout": "long" + } + ] + ], "webdriver/tests/get_element_css_value/get.py": [ [ "/webdriver/tests/get_element_css_value/get.py", @@ -432358,12 +432575,42 @@ {} ] ], + "webdriver/tests/get_element_text/user_prompts.py": [ + [ + "/webdriver/tests/get_element_text/user_prompts.py", + { + "timeout": "long" + } + ] + ], "webdriver/tests/get_named_cookie/get.py": [ [ "/webdriver/tests/get_named_cookie/get.py", {} ] ], + "webdriver/tests/get_named_cookie/user_prompts.py": [ + [ + "/webdriver/tests/get_named_cookie/user_prompts.py", + { + "timeout": "long" + } + ] + ], + "webdriver/tests/get_page_source/source.py": [ + [ + "/webdriver/tests/get_page_source/source.py", + {} + ] + ], + "webdriver/tests/get_page_source/user_prompts.py": [ + [ + "/webdriver/tests/get_page_source/user_prompts.py", + { + "timeout": "long" + } + ] + ], "webdriver/tests/get_timeouts/get.py": [ [ "/webdriver/tests/get_timeouts/get.py", @@ -432488,6 +432735,14 @@ {} ] ], + "webdriver/tests/navigate_to/user_prompts.py": [ + [ + "/webdriver/tests/navigate_to/user_prompts.py", + { + "timeout": "long" + } + ] + ], "webdriver/tests/new_session/create_alwaysMatch.py": [ [ "/webdriver/tests/new_session/create_alwaysMatch.py", @@ -432550,12 +432805,6 @@ {} ] ], - "webdriver/tests/page_source/source.py": [ - [ - "/webdriver/tests/page_source/source.py", - {} - ] - ], "webdriver/tests/perform_actions/key.py": [ [ "/webdriver/tests/perform_actions/key.py", @@ -432638,6 +432887,14 @@ } ] ], + "webdriver/tests/perform_actions/user_prompts.py": [ + [ + "/webdriver/tests/perform_actions/user_prompts.py", + { + "timeout": "long" + } + ] + ], "webdriver/tests/perform_actions/validity.py": [ [ "/webdriver/tests/perform_actions/validity.py", @@ -442463,12 +442720,16 @@ "8ce9f8faa2acdfe7a2ef8dfc6c1ad8cbdf01c72d", "support" ], + "background-fetch/abort.https.window.js": [ + "588fcac012ff9046370d3484f88342180bcb1961", + "testharness" + ], "background-fetch/content-security-policy.https.window.js": [ "0b5b1cb5e94d3f27bebbb5a462bf1e823dfc57b4", "testharness" ], "background-fetch/fetch.https.window.js": [ - "b8b1ff0983cdce1c799d03c7f1856548fa649b17", + "77297186ca456148c94ce3375434673aa54a90de", "testharness" ], "background-fetch/get-ids.https.window.js": [ @@ -442476,7 +442737,7 @@ "testharness" ], "background-fetch/get.https.window.js": [ - "cd1dc3a6c49264d2cbf5ccc9e499b5f98b36d8cb", + "cb678e692d8db0c17ecfd795998babffeb2a2d87", "testharness" ], "background-fetch/idlharness.https.any.js": [ @@ -442508,7 +442769,7 @@ "support" ], "background-fetch/service_workers/sw.js": [ - "af4655dbad4ef6ad6b17d79bb2645aee98ce1102", + "2e3fbfff1a83e2d1f4aa40e738fa305a6eba513c", "support" ], "background-fetch/update-ui.https.window.js": [ @@ -443763,10 +444024,6 @@ "6805c323df5a975231648b830e33ce183c3cbbd3", "support" ], - "common/large.py": [ - "0db4e4bbd1cf08e61e7a74d8919b29395e358d37", - "support" - ], "common/media.js": [ "7cea1ac9b3cace356cbf661dd45e1c9dc156917f", "support" @@ -443972,7 +444229,7 @@ "support" ], "conformance-checkers/Makefile": [ - "879b023c6eaacdf30cc2bd424cf68235a2a4a8a7", + "161c8db7d57c8390a0f1d3719e0975d704263946", "support" ], "conformance-checkers/README.md": [ @@ -453723,10 +453980,6 @@ "1c2fde9cd6a52d3edff919ef28d64ff6b50f7a45", "support" ], - "conformance-checkers/html/elements/dl/aside-in-dt-novalid.html": [ - "b08c05b7f397f124e329b4c37d9d4c83b6fa01b1", - "support" - ], "conformance-checkers/html/elements/dl/dd-in-template-novalid.html": [ "3c4ddbdae19b96b3dab03ba9c0dd4ae312d046e5", "support" @@ -455067,14 +455320,6 @@ "63f43af1f5a286568817d4c89cbe7860675b5140", "support" ], - "conformance-checkers/html/elements/input/pattern-asterisk-novalid.html": [ - "397344c0d419e2476ad41e78215894e9c1dc146b", - "support" - ], - "conformance-checkers/html/elements/input/pattern-paren-novalid.html": [ - "892cc02f1f9f3390e728a813d79631d07270fcd8", - "support" - ], "conformance-checkers/html/elements/input/type-image-formaction-empty-novalid.html": [ "5deda965c57cadcd85c1c7dea231294ff0e81174", "support" @@ -461044,7 +461289,7 @@ "support" ], "conformance-checkers/messages.json": [ - "281326646ff70b4091fb04ebf540b9c2c63ba18b", + "7376e515eaab989d240fb7d264f22676602eb547", "support" ], "conformance-checkers/tools/build-svg-tests.py": [ @@ -462631,36 +462876,52 @@ "ad8d0b54f31d6d0682152f9f75f65c649c36a6a7", "support" ], - "content-security-policy/object-src/object-src-2_1.html": [ - "db29fd394c9ff2515df6633c23962676356da997", + "content-security-policy/object-src/object-src-no-url-allowed.html": [ + "65c575c4b5406b7d607bf1b8b6dac3be4c930f2f", "testharness" ], - "content-security-policy/object-src/object-src-2_1.html.sub.headers": [ - "83fe95d3451b154620012977f9f0b5f893317e6c", + "content-security-policy/object-src/object-src-no-url-allowed.html.sub.headers": [ + "012702bfc1ac19e7c5154b8861760e58b463e71f", "support" ], - "content-security-policy/object-src/object-src-2_2.html": [ - "a868834acb43ce791aaf2ab274bd61279fea70a3", + "content-security-policy/object-src/object-src-no-url-blocked.html": [ + "cb7292976ae35af97d39188c745d5cc6f63282b1", + "testharness" + ], + "content-security-policy/object-src/object-src-url-allowed.html": [ + "7ab85bd6bcea33969288b948042914ebdd4e4175", "testharness" ], - "content-security-policy/object-src/object-src-2_2.html.sub.headers": [ - "0ee665ea323fb95804a8524480cf3c32895ccb6c", + "content-security-policy/object-src/object-src-url-allowed.html.sub.headers": [ + "9372a723c873557551def190e43df7f44693873b", "support" ], - "content-security-policy/object-src/object-src-no-url-allowed.sub.html": [ - "f8cab44230b22d0f9778124af7802e3ca95fe180", + "content-security-policy/object-src/object-src-url-blocked.html": [ + "f45eab9fb90942c73835abd78dfcc5530963277b", "testharness" ], - "content-security-policy/object-src/object-src-no-url-blocked.sub.html": [ - "030da4db2688842e424041ab87af876fa27776eb", + "content-security-policy/object-src/object-src-url-embed-allowed.html": [ + "edb01b3839f2d8a165de572bb43d88d8371bb77c", "testharness" ], - "content-security-policy/object-src/object-src-url-allowed.sub.html": [ - "eecdea54cd8a8c6b9e412cbb612917ad0762edbb", + "content-security-policy/object-src/object-src-url-embed-allowed.html.sub.headers": [ + "7c20bf3d4005c67266a2bc0e88b1c921de4335ec", + "support" + ], + "content-security-policy/object-src/object-src-url-embed-blocked.html": [ + "f133800737199ea02aca47744b723003751c0af4", "testharness" ], - "content-security-policy/object-src/object-src-url-blocked.sub.html": [ - "8a6594de05d622030d3aee7cf8d2c900dca4082a", + "content-security-policy/object-src/object-src-url-redirect-allowed.html": [ + "c52286fc1294783ac24e629199c3e0891274c3a9", + "testharness" + ], + "content-security-policy/object-src/object-src-url-redirect-allowed.html.sub.headers": [ + "82779ec642ad36efca47108610436336fce21112", + "support" + ], + "content-security-policy/object-src/object-src-url-redirect-blocked.sub.html": [ + "c79c9938e1ce9045b4772b48f5670be6319bf550", "testharness" ], "content-security-policy/plugin-types/plugintypes-mismatched-data.sub.html": [ @@ -462796,7 +463057,7 @@ "support" ], "content-security-policy/reporting/report-cross-origin-no-cookies.sub.html": [ - "2922894832dc7b4ab85754c486eb1bf4cab8d355", + "934d74c87744699adedf998f718e12de4276a1bc", "testharness" ], "content-security-policy/reporting/report-cross-origin-no-cookies.sub.html.sub.headers": [ @@ -462836,7 +463097,7 @@ "support" ], "content-security-policy/reporting/report-same-origin-with-cookies.html": [ - "515996c1dd3103cfc29806e15f31e2ee9fefd07f", + "9a09722b409388a2b26102a5c5f85044016901dd", "testharness" ], "content-security-policy/reporting/report-same-origin-with-cookies.html.sub.headers": [ @@ -547859,10 +548120,26 @@ "d1608c0cfe8baa967cb1bdb6cb47b4635bf009b1", "reftest" ], + "css/css-images/multiple-position-color-stop-linear-2-ref.html": [ + "53ca212ad4ac5b3a7eac72341e5725f9b7041ad0", + "support" + ], + "css/css-images/multiple-position-color-stop-linear-2.html": [ + "f33ae99c2394816a822b213d6042922bfe930e31", + "reftest" + ], "css/css-images/multiple-position-color-stop-linear.html": [ "2e1f9ed7be488a6c6fa68f4bc4252524ddab82b2", "reftest" ], + "css/css-images/multiple-position-color-stop-radial-2-ref.html": [ + "9b5bdfdf2cd5f4b8f673713b01c8f0bb33cf3f42", + "support" + ], + "css/css-images/multiple-position-color-stop-radial-2.html": [ + "c66b0831626ba1a5687ba0b7a3a4ad9dc59ed877", + "reftest" + ], "css/css-images/multiple-position-color-stop-radial.html": [ "74e25df788b0736f687f5f6394c31437cc834f57", "reftest" @@ -549400,15 +549677,15 @@ "reftest" ], "css/css-masking/clip-path/clip-path-inline-001.html": [ - "343646464a98b761fa3eee2f37260c9848ef067a", + "21acae0ee7e06da76a6b5830e5aaa6b5e0d2e6a6", "reftest" ], "css/css-masking/clip-path/clip-path-inline-002.html": [ - "d56117e22b87975d5367b0af18ebd5ad25cc744a", + "b99bb20a86d64096e3a0003eb942cb0e4d61e3ad", "reftest" ], "css/css-masking/clip-path/clip-path-inline-003.html": [ - "4c907a46120da6a774193f83a6c1c89e5bd9b2f2", + "89fd44abc7142c9ec4de357e0bb3507c48727152", "reftest" ], "css/css-masking/clip-path/clip-path-path-001.html": [ @@ -550652,11 +550929,11 @@ "reftest" ], "css/css-multicol/multicol-span-all-margin-bottom-001-ref.xht": [ - "d6719f0b882216eca8634e021ef0824495fef00d", + "2152b5663724bd65393277d21f8f1caad3128c63", "support" ], "css/css-multicol/multicol-span-all-margin-bottom-001.xht": [ - "5a81ca1ec4027f482a132f511c621ff06cfa5cab", + "b9571bd7a2e539e881d9f337a71ad8f4ebbe73fc", "reftest" ], "css/css-multicol/multicol-span-all-margin-nested-001-ref.xht": [ @@ -579011,6 +579288,30 @@ "3bba161b47d1ff3424b331b69444051af1300d71", "testharness" ], + "css/cssom-view/elementsFromPoint-inline-htb-ltr.html": [ + "5d6f92f3d1ff2e4949f2379b70e283526859c72e", + "testharness" + ], + "css/cssom-view/elementsFromPoint-inline-htb-rtl.html": [ + "3ff7f0139906313c69b8c9a612b86f5fdb622717", + "testharness" + ], + "css/cssom-view/elementsFromPoint-inline-vlr-ltr.html": [ + "c22c0051594c781efaa12422faa57cb662fb8978", + "testharness" + ], + "css/cssom-view/elementsFromPoint-inline-vlr-rtl.html": [ + "e8e600a8b8cc0ad977d9834c194d7e58fadd622a", + "testharness" + ], + "css/cssom-view/elementsFromPoint-inline-vrl-ltr.html": [ + "598d41e41b57606b0b02bac899ecc38025f79edf", + "testharness" + ], + "css/cssom-view/elementsFromPoint-inline-vrl-rtl.html": [ + "4d93bf5210d2f2fe93b5bfe5e26ec1b9b0a14b02", + "testharness" + ], "css/cssom-view/elementsFromPoint-invalid-cases.html": [ "369cffcd31ad9ef8a2946a9974f4030a5798bfed", "testharness" @@ -579039,6 +579340,34 @@ "bf883a1423a150a49fa3170014308a6252365810", "testharness" ], + "css/cssom-view/getClientRects-br-htb-ltr.html": [ + "e952d61b677164c3b5d49799c80063174120307f", + "testharness" + ], + "css/cssom-view/getClientRects-br-htb-rtl.html": [ + "24dbc929a693de66dc59dcde39c0001204f91439", + "testharness" + ], + "css/cssom-view/getClientRects-br-vlr-ltr.html": [ + "b324342d64b9f9026ca80cd7a78a2adbeb3404b7", + "testharness" + ], + "css/cssom-view/getClientRects-br-vlr-rtl.html": [ + "3a36f9730615b0b1160b9abd78c99bbfa84370c3", + "testharness" + ], + "css/cssom-view/getClientRects-br-vrl-ltr.html": [ + "c0be872a0f86931d401901378c5943289040251f", + "testharness" + ], + "css/cssom-view/getClientRects-br-vrl-rtl.html": [ + "c5a3062cf495fdb5061951c4184156d90ff056d5", + "testharness" + ], + "css/cssom-view/getClientRects-inline.html": [ + "415e34a6f0430e08441ee32b3f7c0ca8cd11a692", + "reftest" + ], "css/cssom-view/historical.html": [ "bf82eac1157aea5fa256861ef04f8da15e6ae89e", "testharness" @@ -579079,6 +579408,10 @@ "8f4433795424a00a896278173747aa9e192e181d", "testharness" ], + "css/cssom-view/offsetTopLeftInline.html": [ + "772cc34f05bffc5b8445cd23ba13d9357269b84b", + "reftest" + ], "css/cssom-view/overscrollBehavior-manual.html": [ "d66317fe306d264708c3cac725d562c22034a5f6", "manual" @@ -579116,7 +579449,7 @@ "testharness" ], "css/cssom-view/scroll-behavior-smooth-positions.html": [ - "19e317d5e4b9e65aca7df6becb35481ad8125bac", + "14e4c94886ae0383e4420a2ff916f8a7a0a4e3ef", "testharness" ], "css/cssom-view/scroll-behavior-smooth.html": [ @@ -581084,7 +581417,7 @@ "testharness" ], "css/selectors/focus-visible-009.html": [ - "c7d682baa4377fd9ccb5857437f172d782d90824", + "4dae6407adac3971db6064822643332cf7f1722d", "testharness" ], "css/selectors/focus-visible-010.html": [ @@ -597703,6 +598036,14 @@ "57102d5ee7c072e433fa44c0c13521573b32f469", "support" ], + "feature-policy/reporting/encrypted-media-reporting.https.html": [ + "d309d5390f1ec5f6f3edd00327e9a36b54926499", + "testharness" + ], + "feature-policy/reporting/encrypted-media-reporting.https.html.headers": [ + "73753a2e41d10b0a0398831350b1f17e586ab847", + "support" + ], "feature-policy/reporting/fullscreen-reporting.html": [ "83d97c91fab60e593cf3bf0cceff4db80552ef02", "testharness" @@ -597747,6 +598088,14 @@ "a2836778bc5389fdb65e9f6d5f83c7967200866f", "support" ], + "feature-policy/reporting/picture-in-picture-reporting.html": [ + "a8a998ed2a15af10ffa6dba02273bc8d0b2d5eb4", + "testharness" + ], + "feature-policy/reporting/picture-in-picture-reporting.html.headers": [ + "1759381fdc4141302f1b95868550ead76d9f5ca7", + "support" + ], "feature-policy/reporting/sync-xhr-reporting.html": [ "2c76390847be29c5bb2f3ec8605d1cb746c33e00", "testharness" @@ -604204,7 +604553,7 @@ "testharness" ], "html/dom/elements/the-innertext-idl-attribute/getter-tests.js": [ - "fcd11b414b4a325bfb77468f0fea5ffb5a12f460", + "1195656a2a497b73a5da83580dd3a44d54f511ac", "support" ], "html/dom/elements/the-innertext-idl-attribute/getter.html": [ @@ -605148,7 +605497,7 @@ "support" ], "html/editing/dnd/file/007.html": [ - "099716f894fb70156bcdb475f62b019104ae3d82", + "046220bdb6dff077cd8311be13fbdd102576f447", "support" ], "html/editing/dnd/file/008.html": [ @@ -606683,6 +607032,10 @@ "e565824aafafe632011b281cba976baf8b3ba89a", "support" ], + "html/editing/dnd/resources/32mb.py": [ + "5b1ac204640d1e8e66f5ecb5b155f5c9c1af51e6", + "support" + ], "html/editing/dnd/resources/boxnavy.swf": [ "c4ef5889a331186537815e222d771ac386f1d3ee", "support" @@ -619748,7 +620101,7 @@ "support" ], "interfaces/css-layout-api.idl": [ - "4e2659933ed498c00b50a2c77beb7b95381a6f9f", + "5dc6db455e41f1ed5f3b01ab1d8f4f6b9554d469", "support" ], "interfaces/css-masking.idl": [ @@ -620140,7 +620493,7 @@ "support" ], "interfaces/webrtc-dscp.idl": [ - "718447bbf4a3ed92ac853ba2075a24ba41d3049d", + "732230b4a339d2484fa5242fdfc77224400796b2", "support" ], "interfaces/webrtc-stats.idl": [ @@ -620148,7 +620501,7 @@ "support" ], "interfaces/webrtc.idl": [ - "c4ca910d6d18bf8c8d817c76deacb03a74cef59e", + "cdeb5204e6a0b5735948b94d5e30931bc2fd062e", "support" ], "interfaces/webusb.idl": [ @@ -620472,7 +620825,7 @@ "support" ], "lint.whitelist": [ - "9f5693fcc2b9ad790ca7d502d998a1b71701b717", + "1166d9f59ea8eb17684ff160b4da6dc1cfa0e359", "support" ], "longtask-timing/META.yml": [ @@ -621836,7 +622189,7 @@ "manual" ], "mediacapture-streams/MediaStream-MediaElement-srcObject.https.html": [ - "2ed96ec386c23c019791c8306d7d81cd4b3af920", + "fc2e619a463c6e18433f395090fdb7a42d863cb6", "testharness" ], "mediacapture-streams/MediaStream-add-audio-track.https.html": [ @@ -632320,7 +632673,11 @@ "support" ], "permissions/interfaces.any.js": [ - "78f1fc65b790a2ed2f78f4185f864ead89b8cce1", + "77fa909a768fd89e2bb350ce9dc15849800a5bec", + "testharness" + ], + "permissions/test-background-fetch-permission.html": [ + "c3da77d9f8cc76d0cb2523e5445d2aed7c1d97ac", "testharness" ], "picture-in-picture/META.yml": [ @@ -642028,7 +642385,7 @@ "support" ], "resources/test/README.md": [ - "b756b91797f71ca3b6c58b31d112b8bdab112fe6", + "185ae5f4efc2ecbce67ab4004e8377988e8b647e", "support" ], "resources/test/conftest.py": [ @@ -642332,7 +642689,7 @@ "support" ], "resources/testharness.js": [ - "0a92cf10a3d57f8a38921f316f78f2fccc029fb0", + "867f88b3bcfb6394a548c43d09ff0231ea7abd2a", "support" ], "resources/testharness.js.headers": [ @@ -656932,7 +657289,7 @@ "support" ], "tools/wptrunner/requirements_firefox.txt": [ - "bfe0d4bc347e907a48a256caa48e8e343115d388", + "82975e249bf753d9cc84387adb3f8c4caaf32f16", "support" ], "tools/wptrunner/requirements_ie.txt": [ @@ -657084,7 +657441,7 @@ "support" ], "tools/wptrunner/wptrunner/browsers/__init__.py": [ - "9fbbec4d58511ae0bcecedc89fd2d1c4c7acc591", + "6c095f5c5a6b2c9228dbcf3264c842c3f93276c8", "support" ], "tools/wptrunner/wptrunner/browsers/base.py": [ @@ -657672,7 +658029,7 @@ "support" ], "tools/wptserve/tests/functional/test_handlers.py": [ - "7ac410abfee2d0a700f9f39bc466cedffbb4780f", + "759a096b79957079429ae387186d6e7891651ecf", "support" ], "tools/wptserve/tests/functional/test_input_file.py": [ @@ -657680,7 +658037,7 @@ "support" ], "tools/wptserve/tests/functional/test_pipes.py": [ - "0299ea0e62b2d97f20054f7aa8f52a497361e472", + "7aa73353386624e37b6c48fc087f8e9bd0ecb93a", "support" ], "tools/wptserve/tests/functional/test_request.py": [ @@ -657728,7 +658085,7 @@ "support" ], "tools/wptserve/wptserve/pipes.py": [ - "ad96f591a3a8c8b7e8d13a4ad95a1aae500f66da", + "cded8f6ea02d5058c0eda5c695d95a3824e9978f", "support" ], "tools/wptserve/wptserve/ranges.py": [ @@ -657884,7 +658241,11 @@ "testharness" ], "trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests-noNamesGiven.tentative.html": [ - "49a9506b5a7910bf1ee7e98dcbe2fbdbecacb000", + "2fc8f0122564190551de99ea1e47085a78fb7816", + "testharness" + ], + "trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests-wildcard.tentative.html": [ + "7edc64be314a58b81d9d77f69a920faad598d0e0", "testharness" ], "trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests.tentative.html": [ @@ -657900,7 +658261,7 @@ "testharness" ], "trusted-types/TrustedTypePolicyFactory-isXXX.tentative.html": [ - "9b48fa7fede81b5d2e2c79d9fc115b56c759cb00", + "c03b4b81d0322f6b628adb6616bace84a8214aa1", "testharness" ], "trusted-types/Window-TrustedTypes.tentative.html": [ @@ -657912,55 +658273,55 @@ "testharness" ], "trusted-types/block-string-assignment-to-DOMParser-parseFromString.tentative.html": [ - "366bdd2ab6d2d3c24d89cfba2eeea17c045d0a24", + "ec19ebc8db8a727db8f28a69dd82cab15a5d7af9", "testharness" ], "trusted-types/block-string-assignment-to-DOMWindowTimers-setTimeout-setInterval.tentative.html": [ - "f27678ab364c4be2b1ab21e1b4ce1074f02a8c74", + "99e187d45be6cb649e388995a2f775d5bbe6bcf4", "testharness" ], "trusted-types/block-string-assignment-to-Document-write.tentative.html": [ - "ce530d49bb6072dc64d9399abc833b7f54d94741", + "beb31445b475ca0f68ae82410da0d97700cce697", "testharness" ], "trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html": [ - "593d6c64a7c466395972251f5ae0c1ac8a7e1998", + "162505a6ae34a75e6e765899ef7ffab92e29bbe5", "testharness" ], "trusted-types/block-string-assignment-to-Element-outerHTML.tentative.html": [ - "c9bde5eb6d5b64046f64c102b441b0990a934b9e", + "fde0c172f52cb27837077f8eddbd42d215b24956", "testharness" ], "trusted-types/block-string-assignment-to-Element-setAttribute.tentative.html": [ - "3553f2b07685907a78368fced352867a1b3cc428", + "26aaa5123e756219d3a47f07f2e5228ac1101407", "testharness" ], "trusted-types/block-string-assignment-to-Element-setAttributeNS.tentative.html": [ - "5a72992100ced1ae73766f147e29fa0afa6c8334", + "3ad27e219e998145610d79769a784034aef94aff", "testharness" ], "trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html": [ - "f31fce629bccd342ff5e8dfacd43e13faac6fced", + "ceac828d7bdea09bcf79b90c0a623e7d0c4f9735", "testharness" ], "trusted-types/block-string-assignment-to-Location-assign.tentative.html": [ - "5de5fecda0b2db6af2a87e888ebaca22db72223f", + "c0817d669a189d1b01859e1d821712b115297b0f", "testharness" ], "trusted-types/block-string-assignment-to-Location-href.tentative.html": [ - "24312617892de90eb6caee32fac81c18ae909147", + "2a29e1e233ec16a747c279f0b319732868a6775a", "testharness" ], "trusted-types/block-string-assignment-to-Location-replace.tentative.html": [ - "407521570596e05a7e9a4ac3cb9b795244c43ebc", + "8e534bf83827151cbeccfcc147f933e26fa0aefa", "testharness" ], "trusted-types/block-string-assignment-to-Range-createContextualFragment.tentative.html": [ - "1cae5c74e96588eb9999767abab45921fe7414ae", + "f44266a3074ee040e6a3e1b16868aa2bef44d110", "testharness" ], "trusted-types/block-string-assignment-to-Window-open.tentative.html": [ - "8070b4a4896d9adc60346fccb5fa96b997ef597a", + "7b917dbf642302e0d21e5a688850d8f822f0c318", "testharness" ], "trusted-types/idlharness.window.js": [ @@ -661875,6 +662236,10 @@ "24ac645029e0dc57327b62ad3d24fbab1640ad2c", "wdspec" ], + "webdriver/tests/add_cookie/user_prompts.py": [ + "f58aacd02a71d73112fcb6140c6b766919f9b85f", + "wdspec" + ], "webdriver/tests/back/__init__.py": [ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", "support" @@ -661915,6 +662280,10 @@ "e0947b6a75724ac8e298d09d77ae940ea82e98d9", "wdspec" ], + "webdriver/tests/delete_all_cookies/user_prompts.py": [ + "dca4f3c8bf6473e7fb767519d7f4a9417503f044", + "wdspec" + ], "webdriver/tests/delete_cookie/__init__.py": [ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", "support" @@ -661951,6 +662320,10 @@ "bc74af4b61624d2e9d155ef9438043e09dbf1622", "wdspec" ], + "webdriver/tests/element_clear/user_prompts.py": [ + "cfb850e08d5afe1e06266694c27b4bbfdbc66b17", + "wdspec" + ], "webdriver/tests/element_click/__init__.py": [ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", "support" @@ -661995,6 +662368,10 @@ "e2c6dadd1218e0a7d8b7d243a1c49b7f47092d77", "support" ], + "webdriver/tests/element_click/user_prompts.py": [ + "b3706fe4af164c643d3857fa5a056445ab597b51", + "wdspec" + ], "webdriver/tests/element_send_keys/__init__.py": [ "a7facf6fcf70309251757e3fb90b89255e13133f", "support" @@ -662140,7 +662517,11 @@ "support" ], "webdriver/tests/get_active_element/get.py": [ - "ac4f14d37c0b9b8cf4afa1d1af4ce1c8027c77c9", + "1fea56a0d7ae9f765d97927c307d2195c04ff93a", + "wdspec" + ], + "webdriver/tests/get_active_element/user_prompts.py": [ + "7fa7be1dde994bfb41a0212b5c997c220b273d37", "wdspec" ], "webdriver/tests/get_alert_text/__init__.py": [ @@ -662171,6 +662552,10 @@ "02a155bcee6626037f424fbf387458ea46e6c206", "wdspec" ], + "webdriver/tests/get_element_attribute/user_prompts.py": [ + "5ee7929afdf8447772ca78ce4cdc532144945f0c", + "wdspec" + ], "webdriver/tests/get_element_css_value/__init__.py": [ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", "support" @@ -662227,6 +662612,10 @@ "9f660308bc29725299a083b0b71db80ed26ff8e8", "wdspec" ], + "webdriver/tests/get_element_text/user_prompts.py": [ + "1ee5cde4da52eefcf16417c48b9eb0109cef50b4", + "wdspec" + ], "webdriver/tests/get_named_cookie/__init__.py": [ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", "support" @@ -662235,6 +662624,22 @@ "50a465191687fe1c79a910cdd6fed376fb001184", "wdspec" ], + "webdriver/tests/get_named_cookie/user_prompts.py": [ + "3ef52a58a419352ab01a7bd016e9f3adcf1ac321", + "wdspec" + ], + "webdriver/tests/get_page_source/__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + "support" + ], + "webdriver/tests/get_page_source/source.py": [ + "0deb1b46488f9b6e79e98931fca54e6b5f693c2a", + "wdspec" + ], + "webdriver/tests/get_page_source/user_prompts.py": [ + "3b0cdff97dd963fcb22aa88f1ece437a11a29117", + "wdspec" + ], "webdriver/tests/get_timeouts/__init__.py": [ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", "support" @@ -662351,6 +662756,10 @@ "e478e10b76b0953d854416dffdc7a400087aee95", "wdspec" ], + "webdriver/tests/navigate_to/user_prompts.py": [ + "6a94c11bf1d3391ec969a23b94536ac7f86c2a3b", + "wdspec" + ], "webdriver/tests/new_session/__init__.py": [ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", "support" @@ -662403,14 +662812,6 @@ "c5adb9396819beb03d4627ef9890958fb687b58d", "wdspec" ], - "webdriver/tests/page_source/__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - "support" - ], - "webdriver/tests/page_source/source.py": [ - "0deb1b46488f9b6e79e98931fca54e6b5f693c2a", - "wdspec" - ], "webdriver/tests/perform_actions/__init__.py": [ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", "support" @@ -662491,6 +662892,10 @@ "6f844cd255a075d31caf1c19957af3d6ac833778", "support" ], + "webdriver/tests/perform_actions/user_prompts.py": [ + "6bbd22a2a29a574dbacd207e9fc43810a68ebff6", + "wdspec" + ], "webdriver/tests/perform_actions/validity.py": [ "ce8a0d60f7df192e21c6abbad1871bb0ac8f5f78", "wdspec" @@ -662580,7 +662985,7 @@ "support" ], "webdriver/tests/support/asserts.py": [ - "2d305a0f3bec08d6b773541e556258416e737f7f", + "cdf313bc04b3e96e999b559de506b5595efe8419", "support" ], "webdriver/tests/support/defaults.py": [ @@ -663364,7 +663769,7 @@ "testharness" ], "webrtc/RTCPeerConnection-helper.js": [ - "27ff1873790cfc4f71a07e1735ec4389ee330a18", + "b13e580998efce83c8bb158bce3d7747ec6f8bd9", "support" ], "webrtc/RTCPeerConnection-iceConnectionState.html": [ @@ -663391,6 +663796,10 @@ "64ad212a5ba4e0c6bf5589f4cda3a4c7a508cdc2", "testharness" ], + "webrtc/RTCPeerConnection-remote-track-mute.https.html": [ + "56fe761425096e963589309b828a8a7f7d36a9be", + "testharness" + ], "webrtc/RTCPeerConnection-removeTrack.https.html": [ "c98dbdbd8f3fa0501131a9a59ddc8982d340ebae", "testharness" @@ -663452,7 +663861,7 @@ "testharness" ], "webrtc/RTCPeerConnection-transceivers.https.html": [ - "c89737c99fcebe76b1156499cb7269e7b0a67af1", + "1f980ea389a77551a33750d33349110e3b02b72a", "testharness" ], "webrtc/RTCPeerConnectionIceEvent-constructor.html": [ @@ -664648,11 +665057,11 @@ "support" ], "webstorage/event_constructor.html": [ - "c74f08aadabafa061634771621c6c41275d88cee", + "fe7fca77a93c7adec48dc31e7926331e427b969b", "testharness" ], - "webstorage/event_constructor_eventinit.html": [ - "3b4a77cb2cb3199f0fab3efcb5a3ecdec447a5a7", + "webstorage/event_initstorageevent.html": [ + "656fc351da3bbb75b7d025e9e02d05f02880e7d5", "testharness" ], "webstorage/event_local_key.html": [ @@ -664675,10 +665084,6 @@ "db4b114a951a43064577540c7f87c428a85d3372", "testharness" ], - "webstorage/event_local_storageeventinit.html": [ - "3a7e5d18f4792620f41b5cc84c2a12bc481ef5c6", - "testharness" - ], "webstorage/event_local_url.html": [ "7345ce3736bbb2fb1179fe99761627e0e4075113", "testharness" @@ -664707,10 +665112,6 @@ "d2c2ba437e8e8b67a33d13768a5b3699e0316311", "testharness" ], - "webstorage/event_session_storageeventinit.html": [ - "69539df41a401d2eaccf7b15898f3d540bd117ca", - "testharness" - ], "webstorage/event_session_url.html": [ "85250acc2b9d19633162c80bf0ded1a8e0314d09", "testharness" @@ -664728,7 +665129,7 @@ "testharness" ], "webstorage/missing_arguments.html": [ - "34f54bc3566b03f0224a038a652c8f76178da12b", + "38c52cf62754d5ee4092356104daca544a9f5be7", "testharness" ], "webstorage/resources/event_body_handler.html": [ diff --git a/tests/wpt/metadata/css/css-images/multiple-position-color-stop-linear-2.html.ini b/tests/wpt/metadata/css/css-images/multiple-position-color-stop-linear-2.html.ini new file mode 100644 index 00000000000..5c6ef248505 --- /dev/null +++ b/tests/wpt/metadata/css/css-images/multiple-position-color-stop-linear-2.html.ini @@ -0,0 +1,2 @@ +[multiple-position-color-stop-linear-2.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/cssom-view/elementsFromPoint-inline-htb-ltr.html.ini b/tests/wpt/metadata/css/cssom-view/elementsFromPoint-inline-htb-ltr.html.ini new file mode 100644 index 00000000000..f1cbd4b053a --- /dev/null +++ b/tests/wpt/metadata/css/cssom-view/elementsFromPoint-inline-htb-ltr.html.ini @@ -0,0 +1,4 @@ +[elementsFromPoint-inline-htb-ltr.html] + [elementsFromPoint should return all elements under a point] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom-view/elementsFromPoint-inline-htb-rtl.html.ini b/tests/wpt/metadata/css/cssom-view/elementsFromPoint-inline-htb-rtl.html.ini new file mode 100644 index 00000000000..6bb65a029af --- /dev/null +++ b/tests/wpt/metadata/css/cssom-view/elementsFromPoint-inline-htb-rtl.html.ini @@ -0,0 +1,4 @@ +[elementsFromPoint-inline-htb-rtl.html] + [elementsFromPoint should return all elements under a point] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom-view/elementsFromPoint-inline-vlr-ltr.html.ini b/tests/wpt/metadata/css/cssom-view/elementsFromPoint-inline-vlr-ltr.html.ini new file mode 100644 index 00000000000..5beea7124f0 --- /dev/null +++ b/tests/wpt/metadata/css/cssom-view/elementsFromPoint-inline-vlr-ltr.html.ini @@ -0,0 +1,4 @@ +[elementsFromPoint-inline-vlr-ltr.html] + [elementsFromPoint should return all elements under a point] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom-view/elementsFromPoint-inline-vlr-rtl.html.ini b/tests/wpt/metadata/css/cssom-view/elementsFromPoint-inline-vlr-rtl.html.ini new file mode 100644 index 00000000000..55d2e532aa8 --- /dev/null +++ b/tests/wpt/metadata/css/cssom-view/elementsFromPoint-inline-vlr-rtl.html.ini @@ -0,0 +1,4 @@ +[elementsFromPoint-inline-vlr-rtl.html] + [elementsFromPoint should return all elements under a point] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom-view/elementsFromPoint-inline-vrl-ltr.html.ini b/tests/wpt/metadata/css/cssom-view/elementsFromPoint-inline-vrl-ltr.html.ini new file mode 100644 index 00000000000..ac303c371a0 --- /dev/null +++ b/tests/wpt/metadata/css/cssom-view/elementsFromPoint-inline-vrl-ltr.html.ini @@ -0,0 +1,4 @@ +[elementsFromPoint-inline-vrl-ltr.html] + [elementsFromPoint should return all elements under a point] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom-view/elementsFromPoint-inline-vrl-rtl.html.ini b/tests/wpt/metadata/css/cssom-view/elementsFromPoint-inline-vrl-rtl.html.ini new file mode 100644 index 00000000000..267080e79ed --- /dev/null +++ b/tests/wpt/metadata/css/cssom-view/elementsFromPoint-inline-vrl-rtl.html.ini @@ -0,0 +1,4 @@ +[elementsFromPoint-inline-vrl-rtl.html] + [elementsFromPoint should return all elements under a point] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom-view/getClientRects-br-htb-rtl.html.ini b/tests/wpt/metadata/css/cssom-view/getClientRects-br-htb-rtl.html.ini new file mode 100644 index 00000000000..dbac8c6d7ff --- /dev/null +++ b/tests/wpt/metadata/css/cssom-view/getClientRects-br-htb-rtl.html.ini @@ -0,0 +1,4 @@ +[getClientRects-br-htb-rtl.html] + [Position of the BR element] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom-view/getClientRects-br-vlr-ltr.html.ini b/tests/wpt/metadata/css/cssom-view/getClientRects-br-vlr-ltr.html.ini new file mode 100644 index 00000000000..68fddca93a3 --- /dev/null +++ b/tests/wpt/metadata/css/cssom-view/getClientRects-br-vlr-ltr.html.ini @@ -0,0 +1,4 @@ +[getClientRects-br-vlr-ltr.html] + [Position of the BR element] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom-view/getClientRects-br-vlr-rtl.html.ini b/tests/wpt/metadata/css/cssom-view/getClientRects-br-vlr-rtl.html.ini new file mode 100644 index 00000000000..b4c786f3329 --- /dev/null +++ b/tests/wpt/metadata/css/cssom-view/getClientRects-br-vlr-rtl.html.ini @@ -0,0 +1,4 @@ +[getClientRects-br-vlr-rtl.html] + [Position of the BR element] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom-view/getClientRects-br-vrl-ltr.html.ini b/tests/wpt/metadata/css/cssom-view/getClientRects-br-vrl-ltr.html.ini new file mode 100644 index 00000000000..2142b35138d --- /dev/null +++ b/tests/wpt/metadata/css/cssom-view/getClientRects-br-vrl-ltr.html.ini @@ -0,0 +1,4 @@ +[getClientRects-br-vrl-ltr.html] + [Position of the BR element] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom-view/getClientRects-br-vrl-rtl.html.ini b/tests/wpt/metadata/css/cssom-view/getClientRects-br-vrl-rtl.html.ini new file mode 100644 index 00000000000..740b9ec9c31 --- /dev/null +++ b/tests/wpt/metadata/css/cssom-view/getClientRects-br-vrl-rtl.html.ini @@ -0,0 +1,4 @@ +[getClientRects-br-vrl-rtl.html] + [Position of the BR element] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom-view/offsetTopLeftInline.html.ini b/tests/wpt/metadata/css/cssom-view/offsetTopLeftInline.html.ini new file mode 100644 index 00000000000..2fb54617de4 --- /dev/null +++ b/tests/wpt/metadata/css/cssom-view/offsetTopLeftInline.html.ini @@ -0,0 +1,2 @@ +[offsetTopLeftInline.html] + expected: FAIL diff --git a/tests/wpt/metadata/fetch/cross-origin-resource-policy/fetch-in-iframe.html.ini b/tests/wpt/metadata/fetch/cross-origin-resource-policy/fetch-in-iframe.html.ini index 0d630fb814a..3951cd266d5 100644 --- a/tests/wpt/metadata/fetch/cross-origin-resource-policy/fetch-in-iframe.html.ini +++ b/tests/wpt/metadata/fetch/cross-origin-resource-policy/fetch-in-iframe.html.ini @@ -1,5 +1,4 @@ [fetch-in-iframe.html] - expected: CRASH [Untitled] expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini deleted file mode 100644 index 87b07c3e670..00000000000 --- a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[traverse_the_history_1.html] - [Multiple history traversals from the same task] - expected: FAIL - diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini new file mode 100644 index 00000000000..385376c7321 --- /dev/null +++ b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini @@ -0,0 +1,4 @@ +[traverse_the_history_4.html] + [Multiple history traversals, last would be aborted] + expected: FAIL + diff --git a/tests/wpt/metadata/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html.ini b/tests/wpt/metadata/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html.ini index 9579b42287e..20865f493ec 100644 --- a/tests/wpt/metadata/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html.ini +++ b/tests/wpt/metadata/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html.ini @@ -30,6 +30,3 @@ [Set HTTP URL frame location.protocol to data] expected: FAIL - [Set HTTP URL frame location.protocol to x] - expected: FAIL - diff --git a/tests/wpt/metadata/html/dom/elements/the-innertext-idl-attribute/getter.html.ini b/tests/wpt/metadata/html/dom/elements/the-innertext-idl-attribute/getter.html.ini index 11450a8dd3d..ba5ca706e12 100644 --- a/tests/wpt/metadata/html/dom/elements/the-innertext-idl-attribute/getter.html.ini +++ b/tests/wpt/metadata/html/dom/elements/the-innertext-idl-attribute/getter.html.ini @@ -245,3 +245,18 @@ [<canvas><div id='target'> contents ok for element not being rendered ("<canvas><div id='target'>abc")] expected: FAIL + [text-transform handles Turkish casing ("<div><div lang='tr' style='text-transform:uppercase'>i ı")] + expected: FAIL + + [Leading whitespace after hard line break removed ("<div>abc<br> def")] + expected: FAIL + + [Whitespace around <input> should not be collapsed ("<div>abc <input> def")] + expected: FAIL + + [Trailing space at end of inline-block should be collapsed ("<div>abc <span style='display:inline-block'> def </span> ghi")] + expected: FAIL + + [Whitespace around inline-block should not be collapsed ("<div>abc <span style='display:inline-block'></span> def")] + expected: FAIL + diff --git a/tests/wpt/metadata/html/semantics/interactive-elements/the-details-element/toggleEvent.html.ini b/tests/wpt/metadata/html/semantics/interactive-elements/the-details-element/toggleEvent.html.ini new file mode 100644 index 00000000000..9e522297c94 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/interactive-elements/the-details-element/toggleEvent.html.ini @@ -0,0 +1,7 @@ +[toggleEvent.html] + [Calling open twice on 'details' fires only one toggle event] + expected: FAIL + + [Setting open=true to opened 'details' element should not fire a toggle event at the 'details' element] + expected: FAIL + diff --git a/tests/wpt/metadata/quirks/unitless-length/no-quirks.html.ini b/tests/wpt/metadata/quirks/unitless-length/no-quirks.html.ini new file mode 100644 index 00000000000..818a429ed39 --- /dev/null +++ b/tests/wpt/metadata/quirks/unitless-length/no-quirks.html.ini @@ -0,0 +1,283 @@ +[no-quirks.html] + [top: -\\31 .5] + expected: FAIL + + [bottom: -1A] + expected: FAIL + + [bottom: -1a] + expected: FAIL + + [top: @1] + expected: FAIL + + [top: "1a"] + expected: FAIL + + [top: @a] + expected: FAIL + + [bottom: "1"] + expected: FAIL + + [bottom: -/**/1] + expected: FAIL + + [top: +/**/1] + expected: FAIL + + [bottom: @1a] + expected: FAIL + + [top: 1\\31 ] + expected: FAIL + + [top: url('1')] + expected: FAIL + + [bottom: -\\31 ] + expected: FAIL + + [top: calc(1)] + expected: FAIL + + [top: \\31 ] + expected: FAIL + + [bottom: +1\\31 ] + expected: FAIL + + [bottom: 1\\31 .5] + expected: FAIL + + [bottom: #0001] + expected: FAIL + + [top: calc(2 * 2px)] + expected: FAIL + + [bottom: 1a] + expected: FAIL + + [bottom: A] + expected: FAIL + + [bottom: #01] + expected: FAIL + + [top: +\\31 .5] + expected: FAIL + + [bottom: #1] + expected: FAIL + + [top: -/**/1] + expected: FAIL + + [bottom: +\\31 .5] + expected: FAIL + + [bottom: \\31 ] + expected: FAIL + + [bottom: calc(1)] + expected: FAIL + + [top: #001] + expected: FAIL + + [top: +\\31 ] + expected: FAIL + + [bottom: +\\31 ] + expected: FAIL + + [top: +1.5] + expected: FAIL + + [top: +1\\31 ] + expected: FAIL + + [bottom: @a] + expected: FAIL + + [bottom: @1] + expected: FAIL + + [top: #1] + expected: FAIL + + [top: 1a] + expected: FAIL + + [bottom: +1a] + expected: FAIL + + [bottom: +1A] + expected: FAIL + + [bottom: "a"] + expected: FAIL + + [top: #00001] + expected: FAIL + + [bottom: -1\\31 .5] + expected: FAIL + + [top: "1"] + expected: FAIL + + [bottom: 1.5] + expected: FAIL + + [bottom: -\\31 .5] + expected: FAIL + + [bottom: url('1')] + expected: FAIL + + [bottom: -1.5] + expected: FAIL + + [top: \\31 .5] + expected: FAIL + + [bottom: "1a"] + expected: FAIL + + [bottom: calc(2 * 2px)] + expected: FAIL + + [bottom: +1\\31 .5] + expected: FAIL + + [bottom: 1\\31 ] + expected: FAIL + + [bottom: +/**/1] + expected: FAIL + + [bottom: #00001] + expected: FAIL + + [top: url(1)] + expected: FAIL + + [bottom: #001] + expected: FAIL + + [top: +1\\31 .5] + expected: FAIL + + [top: -1a] + expected: FAIL + + [top: -1A] + expected: FAIL + + [bottom: url(1)] + expected: FAIL + + [top: a] + expected: FAIL + + [top: A] + expected: FAIL + + [top: #000001] + expected: FAIL + + [top: 1] + expected: FAIL + + [top: 1\\31 .5] + expected: FAIL + + [bottom: a] + expected: FAIL + + [bottom: 1] + expected: FAIL + + [bottom: +1] + expected: FAIL + + [bottom: #000001] + expected: FAIL + + [bottom: +a] + expected: FAIL + + [bottom: +A] + expected: FAIL + + [top: 1.5] + expected: FAIL + + [top: +A] + expected: FAIL + + [top: +a] + expected: FAIL + + [top: +1] + expected: FAIL + + [top: -1.5] + expected: FAIL + + [top: -1\\31 .5] + expected: FAIL + + [top: +1a] + expected: FAIL + + [top: +1A] + expected: FAIL + + [top: @1a] + expected: FAIL + + [bottom: \\31 .5] + expected: FAIL + + [top: "a"] + expected: FAIL + + [top: #01] + expected: FAIL + + [bottom: +1.5] + expected: FAIL + + [bottom: -A] + expected: FAIL + + [bottom: -a] + expected: FAIL + + [bottom: -1\\31 ] + expected: FAIL + + [top: #0001] + expected: FAIL + + [bottom: -1] + expected: FAIL + + [top: -\\31 ] + expected: FAIL + + [top: -A] + expected: FAIL + + [top: -a] + expected: FAIL + + [top: -1] + expected: FAIL + + [top: -1\\31 ] + expected: FAIL + diff --git a/tests/wpt/metadata/url/urlencoded-parser.any.js.ini b/tests/wpt/metadata/url/urlencoded-parser.any.js.ini index 33b63f3c519..4f8280b89db 100644 --- a/tests/wpt/metadata/url/urlencoded-parser.any.js.ini +++ b/tests/wpt/metadata/url/urlencoded-parser.any.js.ini @@ -11,10 +11,10 @@ [response.formData() with input: &&&a=b&&&&c=d&] expected: FAIL - [request.formData() with input: a=b&c=d] + [request.formData() with input: &&&a=b&&&&c=d&] expected: FAIL - [request.formData() with input: a=b&c=d&] + [request.formData() with input: _charset_=windows-1252&test=%C2x] expected: FAIL @@ -22,18 +22,18 @@ [request.formData() with input: a&b&c] expected: FAIL - [request.formData() with input: a=b&c=d&] + [response.formData() with input: _charset_=windows-1252&test=%C2x] expected: FAIL - [response.formData() with input: _charset_=windows-1252&test=%C2x] + [response.formData() with input: a&b&c] expected: FAIL - [response.formData() with input: a=b&c=d&] + [request.formData() with input: &&&a=b&&&&c=d&] expected: FAIL - [response.formData() with input: &&&a=b&&&&c=d&] + [request.formData() with input: _charset_=windows-1252&test=%C2x] expected: FAIL - [response.formData() with input: a=b&c=d] + [request.formData() with input: a=b&c=d] expected: FAIL diff --git a/tests/wpt/metadata/webstorage/event_constructor.html.ini b/tests/wpt/metadata/webstorage/event_constructor.html.ini new file mode 100644 index 00000000000..a98ab74a83d --- /dev/null +++ b/tests/wpt/metadata/webstorage/event_constructor.html.ini @@ -0,0 +1,4 @@ +[event_constructor.html] + [constructor with undefined type argument and members] + expected: FAIL + diff --git a/tests/wpt/metadata/webstorage/event_initstorageevent.html.ini b/tests/wpt/metadata/webstorage/event_initstorageevent.html.ini new file mode 100644 index 00000000000..cc195181686 --- /dev/null +++ b/tests/wpt/metadata/webstorage/event_initstorageevent.html.ini @@ -0,0 +1,16 @@ +[event_initstorageevent.html] + [initStorageEvent with 8 undefined arguments] + expected: FAIL + + [initStorageEvent with 8 sensible arguments] + expected: FAIL + + [initStorageEvent with 8 null arguments] + expected: FAIL + + [initStorageEvent with 1 argument] + expected: FAIL + + [initStorageEvent with 0 arguments] + expected: FAIL + diff --git a/tests/wpt/web-platform-tests/background-fetch/abort.https.window.js b/tests/wpt/web-platform-tests/background-fetch/abort.https.window.js new file mode 100644 index 00000000000..588fcac012f --- /dev/null +++ b/tests/wpt/web-platform-tests/background-fetch/abort.https.window.js @@ -0,0 +1,50 @@ +// META: script=/service-workers/service-worker/resources/test-helpers.sub.js +// META: script=resources/utils.js +'use strict'; + +// Covers basic functionality provided by BackgroundFetchManager.abort(). +// https://wicg.github.io/background-fetch/#background-fetch-registration-abort + +backgroundFetchTest(async (test, backgroundFetch) => { + const registration = await backgroundFetch.fetch( + uniqueId(), + ['resources/feature-name.txt', '/serviceworker/resources/slow-response.php']); + + assert_true(await registration.abort()); + assert_false(await registration.abort()); + +}, 'Aborting the same registration twice fails'); + +backgroundFetchTest(async (test, backgroundFetch) => { + const registration = await backgroundFetch.fetch( + uniqueId(), + ['resources/feature-name.txt', '/serviceworker/resources/slow-response.php']); + const resultPromise = getMessageFromServiceWorker(); + + await new Promise(resolve => { + registration.onprogress = async (e) => { + // The size of the first file. + if (e.target.downloaded < 16) + return; + + // At this point the first file is downloaded. + + assert_true(await registration.abort()); + + const {type, eventRegistration, results} = await resultPromise; + + assert_equals(eventRegistration.result, 'failure'); + assert_equals(eventRegistration.failureReason, 'aborted'); + + assert_equals(type, 'backgroundfetchabort'); + assert_equals(results.length, 1); + + assert_true(results[0].url.includes('resources/feature-name.txt')); + assert_equals(results[0].status, 200); + assert_equals(results[0].text, 'Background Fetch'); + + resolve(); + }; + }); + +}, 'Calling BackgroundFetchRegistration.abort sets the correct fields and responses are still available');
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/background-fetch/fetch.https.window.js b/tests/wpt/web-platform-tests/background-fetch/fetch.https.window.js index b8b1ff0983c..77297186ca4 100644 --- a/tests/wpt/web-platform-tests/background-fetch/fetch.https.window.js +++ b/tests/wpt/web-platform-tests/background-fetch/fetch.https.window.js @@ -85,6 +85,41 @@ backgroundFetchTest(async (test, backgroundFetch) => { backgroundFetchTest(async (test, backgroundFetch) => { const registrationId = uniqueId(); const registration = + await backgroundFetch.fetch(registrationId, + new Request('https://example/com', { + method: 'PUT', + })); + + assert_equals(registration.id, registrationId); + + const {type, eventRegistration, results} = await getMessageFromServiceWorker(); + + assert_equals(type, 'backgroundfetchsuccess'); + assert_equals(eventRegistration.result, 'success'); + assert_equals(eventRegistration.failureReason, ''); +}, 'Requests with PUT method require CORS Preflight and succeed.'); + +backgroundFetchTest(async (test, backgroundFetch) => { + const registrationId = uniqueId(); + const registration = + await backgroundFetch.fetch(registrationId, + new Request('https://example/com', { + method: 'POST', + headers: {'Content-Type': 'text/json'} + })); + + assert_equals(registration.id, registrationId); + + const {type, eventRegistration, results} = await getMessageFromServiceWorker(); + + assert_equals(type, 'backgroundfetchsuccess'); + assert_equals(eventRegistration.result, 'success'); + assert_equals(eventRegistration.failureReason, ''); +}, 'Requests with text/json content type require CORS Preflight and succeed.'); + +backgroundFetchTest(async (test, backgroundFetch) => { + const registrationId = uniqueId(); + const registration = await backgroundFetch.fetch(registrationId, 'resources/feature-name.txt'); assert_equals(registration.id, registrationId); diff --git a/tests/wpt/web-platform-tests/background-fetch/get.https.window.js b/tests/wpt/web-platform-tests/background-fetch/get.https.window.js index cd1dc3a6c49..cb678e692d8 100644 --- a/tests/wpt/web-platform-tests/background-fetch/get.https.window.js +++ b/tests/wpt/web-platform-tests/background-fetch/get.https.window.js @@ -26,6 +26,7 @@ promise_test(async test => { backgroundFetchTest(async (test, backgroundFetch) => { // The |id| parameter to the BackgroundFetchManager.get() method is required. await promise_rejects(test, new TypeError(), backgroundFetch.get()); + await promise_rejects(test, new TypeError(), backgroundFetch.get('')); const registration = await backgroundFetch.get('my-id'); assert_equals(registration, undefined); diff --git a/tests/wpt/web-platform-tests/background-fetch/service_workers/sw.js b/tests/wpt/web-platform-tests/background-fetch/service_workers/sw.js index af4655dbad4..2e3fbfff1a8 100644 --- a/tests/wpt/web-platform-tests/background-fetch/service_workers/sw.js +++ b/tests/wpt/web-platform-tests/background-fetch/service_workers/sw.js @@ -27,3 +27,4 @@ function handleBackgroundFetchUpdateEvent(event) { self.addEventListener('backgroundfetchsuccess', handleBackgroundFetchUpdateEvent); self.addEventListener('backgroundfetchfail', handleBackgroundFetchUpdateEvent); +self.addEventListener('backgroundfetchabort', handleBackgroundFetchUpdateEvent); diff --git a/tests/wpt/web-platform-tests/common/large.py b/tests/wpt/web-platform-tests/common/large.py deleted file mode 100644 index 0db4e4bbd1c..00000000000 --- a/tests/wpt/web-platform-tests/common/large.py +++ /dev/null @@ -1,45 +0,0 @@ -def main(request, response): - """Code for generating large responses where the actual response data - isn't very important. - - Two request parameters: - size (required): An integer number of bytes (no suffix) or kilobytes - ("kb" suffix) or megabytes ("Mb" suffix). - string (optional): The string to repeat in the response. Defaults to "a". - - Example: - /resources/large.py?size=32Mb&string=ab - """ - if not "size" in request.GET: - 400, "Need an integer bytes parameter" - - bytes_value = request.GET.first("size") - - chunk_size = 1024 - - multipliers = {"kb": 1024, - "Mb": 1024*1024} - - suffix = bytes_value[-2:] - if suffix in multipliers: - multiplier = multipliers[suffix] - bytes_value = bytes_value[:-2] * multiplier - - try: - num_bytes = int(bytes_value) - except ValueError: - return 400, "Bytes must be an integer possibly with a kb or Mb suffix" - - string = str(request.GET.first("string", "a")) - - chunk = string * chunk_size - - def content(): - bytes_sent = 0 - while bytes_sent < num_bytes: - if num_bytes - bytes_sent < len(chunk): - yield chunk[num_bytes - bytes_sent] - else: - yield chunk - bytes_sent += len(chunk) - return [("Content-Type", "text/plain")], content() diff --git a/tests/wpt/web-platform-tests/conformance-checkers/Makefile b/tests/wpt/web-platform-tests/conformance-checkers/Makefile index 879b023c6ea..161c8db7d57 100644 --- a/tests/wpt/web-platform-tests/conformance-checkers/Makefile +++ b/tests/wpt/web-platform-tests/conformance-checkers/Makefile @@ -7,7 +7,7 @@ EXPAND=expand EXPANDFLAGS= GIT=git GITFLAGS= -PYTHON=python3 +PYTHON=python PYTHONFLAGS= VNU_TEST_REPO=git@github.com:validator/tests.git ITS_REPO=git@github.com:w3c/its-2.0-testsuite-inputdata.git @@ -24,7 +24,7 @@ README.md: index.html | $(EXPAND) $(EXPANDFLAGS) > $@ messages.json: .FORCE - $(PYTHON) $(PYTHONFLAGS) -mjson.tool --sort-keys $@ > $@.tmp + $(PYTHON) $(PYTHONFLAGS) -mjson.tool $@ > $@.tmp mv $@.tmp $@ push: diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/dl/aside-in-dt-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/dl/aside-in-dt-novalid.html deleted file mode 100644 index b08c05b7f39..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/dl/aside-in-dt-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid aside-in-dt</title> -<dl><dt><aside><h2>text</h2></aside><dd>text</dl>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/input/pattern-asterisk-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/input/pattern-asterisk-novalid.html deleted file mode 100644 index 397344c0d41..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/input/pattern-asterisk-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid pattern</title> -<p><input pattern='*'></p>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/input/pattern-paren-novalid.html b/tests/wpt/web-platform-tests/conformance-checkers/html/elements/input/pattern-paren-novalid.html deleted file mode 100644 index 892cc02f1f9..00000000000 --- a/tests/wpt/web-platform-tests/conformance-checkers/html/elements/input/pattern-paren-novalid.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>invalid pattern</title> -<p><input pattern='('></p>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/conformance-checkers/messages.json b/tests/wpt/web-platform-tests/conformance-checkers/messages.json index 281326646ff..7376e515eaa 100644 --- a/tests/wpt/web-platform-tests/conformance-checkers/messages.json +++ b/tests/wpt/web-platform-tests/conformance-checkers/messages.json @@ -650,7 +650,6 @@ "html/elements/dialog/model-novalid.html": "Element \u201cdt\u201d not allowed as child of element \u201cdialog\u201d in this context. (Suppressing further errors from this subtree.)", "html/elements/div/model-novalid.html": "End tag \u201cp\u201d implied, but there were open elements.", "html/elements/dl/article-in-dt-novalid.html": "The element \u201carticle\u201d must not appear as a descendant of the \u201cdt\u201d element.", - "html/elements/dl/aside-in-dt-novalid.html": "The element \u201caside\u201d must not appear as a descendant of the \u201cdt\u201d element.", "html/elements/dl/dd-in-template-novalid.html": "Element \u201cdl\u201d is missing one or more of the following child elements: [dd].", "html/elements/dl/div-contains-dl-novalid.html": "Element \u201cdl\u201d not allowed as child of element \u201cdiv\u201d in this context. (Suppressing further errors from this subtree.)", "html/elements/dl/div-contains-text-novalid.html": "Text not allowed in element \u201cdiv\u201d in this context.", @@ -968,8 +967,6 @@ "html/elements/img/usemap-bad-value-novalid.html": "Bad value \u201c#\u201d for attribute \u201cusemap\u201d on element \u201cimg\u201d: Bad hash-name reference: A hash-name reference must have at least one character after \u201c#\u201d.", "html/elements/img/width-height-negative-novalid.html": "Bad value \u201c-1\u201d for attribute \u201cwidth\u201d on element \u201cimg\u201d: Bad non-negative integer: Expected a digit but saw \u201c-\u201d instead.", "html/elements/input/list-novalid.html": "The \u201clist\u201d attribute of the \u201cinput\u201d element must refer to a \u201cdatalist\u201d element.", - "html/elements/input/pattern-asterisk-novalid.html": "Bad value \u201c*\u201d for attribute \u201cpattern\u201d on element \u201cinput\u201d: Bad pattern: Dangling meta character '*' near index 0", - "html/elements/input/pattern-paren-novalid.html": "Bad value \u201c(\u201d for attribute \u201cpattern\u201d on element \u201cinput\u201d: Bad pattern: Unclosed group near index 1", "html/elements/input/type-image-formaction-empty-novalid.html": "Bad value \u201c\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Must be non-empty.", "html/elements/input/type-image-formaction-whitespace-only-novalid.html": "Bad value \u201c\t \n\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Must be non-empty.", "html/elements/input/type-image-formaction/fragment-backslash-novalid.html": "Bad value \u201c#\\\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Illegal character in fragment: \u201c\\\u201d is not allowed.", diff --git a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-2_1.html b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-2_1.html deleted file mode 100644 index db29fd394c9..00000000000 --- a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-2_1.html +++ /dev/null @@ -1,66 +0,0 @@ -<!DOCTYPE HTML> -<html> - -<head> - <title>Objects loaded using data attribute of <object> tag are blocked unless their host is listed as an allowed source in the object-src directive</title> - <meta name=timeout content=long> - <script src='/resources/testharness.js'></script> - <script src='/resources/testharnessreport.js'></script> -</head> - -<body onLoad="object_loaded()"> - <h1>Objects loaded using data attribute of <object> tag are blocked unless their host is listed as an allowed source in the object-src directive</h1> - <div id="log"></div> - - <script> - var relativeMediaURL = "/support/media/flash.swf"; - var pageURL = window.location.toString(); - var temp1 = pageURL.split("//"); - var temp2 = temp1[1].substring(0, temp1[1].lastIndexOf("/object-src/")); - var mediaURL = "http://www2." + temp2 + relativeMediaURL; - var htmlStr = "<object id='flashObject' type='application/x-shockwave-flash' data='" + mediaURL + "' width='200' height='200'></object>"; - document.write(htmlStr); - </script> - - <script> - var len = navigator.mimeTypes.length; - var allTypes = ""; - var flashMimeType = "application/x-shockwave-flash"; - for (var i = 0; i < len; i++) { - allTypes += navigator.mimeTypes[i].type; - } - - var hasMimeType = allTypes.indexOf(flashMimeType) != -1; - - <!-- The actual test. --> - var test1 = async_test("Async SWF load test") - - function object_loaded() { - var elem = document.getElementById("flashObject"); - var is_loaded = false; - try { - <!-- The Flash Player exposes values to JavaScript if a SWF has successfully been loaded. --> - var pct_loaded = elem.PercentLoaded(); - is_loaded = true; - } catch (e) {} - - if (hasMimeType) { - test1.step(function () { - assert_false(is_loaded, "External object loaded.") - }); - var s = document.createElement('script'); - s.async = true; - s.defer = true; - s.src = "../support/checkReport.sub.js?reportField=violated-directive&reportValue=object-src%20%27self%27" - document.lastChild.appendChild(s); - } else { - test1.set_status(test1.NOTRUN, "No Flash Player, cannot run test."); - test1.phase = test1.phases.HAS_RESULT; - } - test1.done(); - } - </script> - -</body> - -</html>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-2_1.html.sub.headers b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-2_1.html.sub.headers deleted file mode 100644 index 83fe95d3451..00000000000 --- a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-2_1.html.sub.headers +++ /dev/null @@ -1,6 +0,0 @@ -Expires: Mon, 26 Jul 1997 05:00:00 GMT -Cache-Control: no-store, no-cache, must-revalidate -Cache-Control: post-check=0, pre-check=0, false -Pragma: no-cache -Set-Cookie: object-src-2_1={{$id:uuid()}}; Path=/content-security-policy/object-src/ -Content-Security-Policy: script-src * 'unsafe-inline'; object-src 'self'; report-uri ../support/report.py?op=put&reportID={{$id}}
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-2_2.html b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-2_2.html deleted file mode 100644 index a868834acb4..00000000000 --- a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-2_2.html +++ /dev/null @@ -1,61 +0,0 @@ -<!DOCTYPE HTML> -<html> -<head> - <title>Objects loaded using src attribute of <embed> tag are blocked unless their host is listed as an allowed source in the object-src directive</title> - <meta name=timeout content=long> - <script src='/resources/testharness.js'></script> - <script src='/resources/testharnessreport.js'></script> -</head> -<body onLoad="object_loaded()"> - <h1>Objects loaded using src attribute of <embed> tag are blocked unless their host is listed as an allowed source in the object-src directive</h1> - <div id="log"></div> - - <script> - var relativeMediaURL = "/support/media/flash.swf"; - var pageURL = window.location.toString(); - var temp1 = pageURL.split("//"); - var temp2 = temp1[1].substring (0, temp1[1].lastIndexOf("/object-src/")); - var mediaURL = "http://www2." + temp2 + relativeMediaURL; - var htmlStr = "<embed id='flashObject' type='application/x-shockwave-flash' src='" + mediaURL + "' width='200' height='200'></object>"; - document.write (htmlStr); - </script> - - <script> - var len = navigator.mimeTypes.length; - var allTypes = ""; - var flashMimeType = "application/x-shockwave-flash"; - for ( var i=0;i<len;i++ ) { - allTypes+=navigator.mimeTypes[i].type; - } - - var hasMimeType = allTypes.indexOf(flashMimeType) != -1; - - <!-- The actual test. --> - var test1 = async_test("Async SWF load test") - - function object_loaded() { - var elem = document.getElementById("flashObject"); - var is_loaded = false; - try { - <!-- The Flash Player exposes values to JavaScript if a SWF has successfully been loaded. --> - var pct_loaded = elem.PercentLoaded(); - is_loaded = true; - } catch (e) {} - - if (hasMimeType) { - test1.step(function() {assert_false(is_loaded, "External object loaded.")}); - var s = document.createElement('script'); - s.async = true; - s.defer = true; - s.src = "../support/checkReport.sub.js?reportField=violated-directive&reportValue=object-src%20%27self%27" - document.lastChild.appendChild(s); - } else { - //test1.step(function() {}); - test1.set_status(test1.NOTRUN, "No Flash Player, cannot run test."); - test1.phase = test1.phases.HAS_RESULT; - } - test1.done(); - } - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-2_2.html.sub.headers b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-2_2.html.sub.headers deleted file mode 100644 index 0ee665ea323..00000000000 --- a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-2_2.html.sub.headers +++ /dev/null @@ -1,6 +0,0 @@ -Expires: Mon, 26 Jul 1997 05:00:00 GMT -Cache-Control: no-store, no-cache, must-revalidate -Cache-Control: post-check=0, pre-check=0, false -Pragma: no-cache -Set-Cookie: object-src-2_2={{$id:uuid()}}; Path=/content-security-policy/object-src/ -Content-Security-Policy: script-src * 'unsafe-inline'; object-src 'self'; report-uri ../support/report.py?op=put&reportID={{$id}} diff --git a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-no-url-allowed.html b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-no-url-allowed.html new file mode 100644 index 00000000000..65c575c4b54 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-no-url-allowed.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html> + +<head> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <!-- Content-Security-Policy: object-src 'self'; script-src 'self' 'unsafe-inline'; report-uri ../support/report.py?op=put&reportID={{$id}} --> +</head> + +<body> + <object type="application/x-webkit-test-netscape"></object> + + <!-- we rely on the report because we can't rely on the onload event for + "allowed" tests as it is not fired for object and embed --> + <script async defer src='../support/checkReport.sub.js?reportExists=false'></script> +</body> + +</html> diff --git a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-no-url-allowed.html.sub.headers b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-no-url-allowed.html.sub.headers new file mode 100644 index 00000000000..012702bfc1a --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-no-url-allowed.html.sub.headers @@ -0,0 +1,2 @@ +Set-Cookie: object-src-no-url-allowed={{$id:uuid()}}; Path=/content-security-policy/object-src/ +Content-Security-Policy: object-src 'self'; script-src 'self' 'unsafe-inline'; report-uri ../support/report.py?op=put&reportID={{$id}} diff --git a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-no-url-allowed.sub.html b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-no-url-allowed.sub.html deleted file mode 100644 index f8cab44230b..00000000000 --- a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-no-url-allowed.sub.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<html> - -<head> - <!-- Programmatically converted from a WebKit Reftest, please forgive resulting idiosyncracies.--> - <meta http-equiv="Content-Security-Policy" content="object-src 'self'; script-src 'self' 'unsafe-inline'; connect-src 'self';"> - <title>object-src-no-url-allowed</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src='../support/logTest.sub.js?logs=["PASS"]'></script> - <script src="../support/alertAssert.sub.js?alerts=[]"></script> -</head> - -<body> - <p>This test passes if there isn't a CSP violation saying the plugin was blocked.</p> - - <script> - window.addEventListener('securitypolicyviolation', function(e) { - log("Fail"); - }); - </script> - - <object type="application/x-webkit-test-netscape"></object> - <div id="log"></div> - - <script> - log("PASS"); - </script> -</body> - -</html> diff --git a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-no-url-blocked.html b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-no-url-blocked.html new file mode 100644 index 00000000000..cb7292976ae --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-no-url-blocked.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> + +<head> + <meta http-equiv="Content-Security-Policy" content="object-src 'none'; script-src 'self' 'unsafe-inline';"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> + +<body> + <script> + var t = async_test("Should block the object and fire a spv"); + window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) { + assert_equals(e.violatedDirective, "object-src"); + })); + </script> + + <object type="application/x-webkit-test-netscape"></object> +</body> + +</html> diff --git a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-no-url-blocked.sub.html b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-no-url-blocked.sub.html deleted file mode 100644 index 030da4db268..00000000000 --- a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-no-url-blocked.sub.html +++ /dev/null @@ -1,27 +0,0 @@ -<!DOCTYPE html> -<html> - -<head> - <!-- Programmatically converted from a WebKit Reftest, please forgive resulting idiosyncracies.--> - <meta http-equiv="Content-Security-Policy" content="object-src 'none'; script-src 'self' 'unsafe-inline'; connect-src 'self';"> - <title>object-src-no-url-blocked</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src='../support/logTest.sub.js?logs=["violated-directive=object-src"]'></script> - <script src="../support/alertAssert.sub.js?alerts=[]"></script> -</head> - -<body> - <p>This test passes if there is a CSP violation saying the plugin was blocked.</p> - - <script> - window.addEventListener('securitypolicyviolation', function(e) { - log("violated-directive=" + e.violatedDirective); - }); - </script> - - <object type="application/x-webkit-test-netscape"></object> - <div id="log"></div> -</body> - -</html> diff --git a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-allowed.html b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-allowed.html new file mode 100644 index 00000000000..7ab85bd6bce --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-allowed.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html> + +<head> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <!-- Content-Security-Policy: object-src 'self'; script-src 'self' 'unsafe-inline'; report-uri ../support/report.py?op=put&reportID={{$id}} --> +</head> + +<body> + <object type="image/png" data="/content-security-policy/support/pass.png"></object> + + <!-- we rely on the report because we can't rely on the onload event for + "allowed" tests as it is not fired for object and embed --> + <script async defer src='../support/checkReport.sub.js?reportExists=false'></script> +</body> + +</html> diff --git a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-allowed.html.sub.headers b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-allowed.html.sub.headers new file mode 100644 index 00000000000..9372a723c87 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-allowed.html.sub.headers @@ -0,0 +1,2 @@ +Set-Cookie: object-src-url-allowed={{$id:uuid()}}; Path=/content-security-policy/object-src/ +Content-Security-Policy: object-src 'self'; script-src 'self' 'unsafe-inline'; report-uri ../support/report.py?op=put&reportID={{$id}} diff --git a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-allowed.sub.html b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-allowed.sub.html deleted file mode 100644 index eecdea54cd8..00000000000 --- a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-allowed.sub.html +++ /dev/null @@ -1,30 +0,0 @@ -<!DOCTYPE html> -<html> - -<head> - <!-- Programmatically converted from a WebKit Reftest, please forgive resulting idiosyncracies.--> - <meta http-equiv="Content-Security-Policy" content="object-src 'self'; script-src 'self' 'unsafe-inline'; connect-src 'self';"> - <title>object-src-url-allowed</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src='../support/logTest.sub.js?logs=["Pass"]'></script> - <script src="../support/alertAssert.sub.js?alerts=[]"></script> -</head> - -<body> - <p>This test passes if there is no CSP violation saying the plugin was blocked.</p> - - <script> - window.addEventListener('securitypolicyviolation', function(e) { - log("Fail"); - }); - </script> - - <object data="/content-security-policy/support/pass.png"></object> - <div id="log"></div> - <script> - log("Pass"); - </script> -</body> - -</html> diff --git a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-blocked.html b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-blocked.html new file mode 100644 index 00000000000..f45eab9fb90 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-blocked.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> + +<head> + <meta http-equiv="Content-Security-Policy" content="object-src 'none'; script-src 'self' 'unsafe-inline';"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> + +<body> + <script> + var t = async_test("Should block the object and fire a spv"); + window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) { + assert_equals(e.violatedDirective, "object-src"); + })); + </script> + + <object type="image/png" data="/content-security-policy/support/pass.png"></object> +</body> + +</html> diff --git a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-blocked.sub.html b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-blocked.sub.html deleted file mode 100644 index 8a6594de05d..00000000000 --- a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-blocked.sub.html +++ /dev/null @@ -1,27 +0,0 @@ -<!DOCTYPE html> -<html> - -<head> - <!-- Programmatically converted from a WebKit Reftest, please forgive resulting idiosyncracies.--> - <meta http-equiv="Content-Security-Policy" content="object-src 'none'; script-src 'self' 'unsafe-inline'; connect-src 'self';"> - <title>object-src-url-blocked</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src='../support/logTest.sub.js?logs=["violated-directive=object-src"]'></script> - <script src="../support/alertAssert.sub.js?alerts=[]"></script> -</head> - -<body> - <p>This test passes if there is a CSP violation saying the plugin was blocked.</p> - - <script> - window.addEventListener('securitypolicyviolation', function(e) { - log("violated-directive=" + e.violatedDirective); - }); - </script> - - <object data="/plugins/resources/mock-plugin.pl"></object> - <div id="log"></div> -</body> - -</html> diff --git a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-embed-allowed.html b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-embed-allowed.html new file mode 100644 index 00000000000..edb01b3839f --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-embed-allowed.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html> + +<head> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <!-- Content-Security-Policy: object-src 'self'; script-src 'self' 'unsafe-inline'; report-uri ../support/report.py?op=put&reportID={{$id}} --> +</head> + +<body> + <embed height="40" width="40" type="image/png" + src="/content-security-policy/support/pass.png"></embed> + + <!-- we rely on the report because we can't rely on the onload event for + "allowed" tests as it is not fired for object and embed --> + <script async defer src='../support/checkReport.sub.js?reportExists=false'></script> +</body> + +</html> diff --git a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-embed-allowed.html.sub.headers b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-embed-allowed.html.sub.headers new file mode 100644 index 00000000000..7c20bf3d400 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-embed-allowed.html.sub.headers @@ -0,0 +1,2 @@ +Set-Cookie: object-src-url-embed-allowed={{$id:uuid()}}; Path=/content-security-policy/object-src/ +Content-Security-Policy: object-src 'self'; script-src 'self' 'unsafe-inline'; report-uri ../support/report.py?op=put&reportID={{$id}} diff --git a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-embed-blocked.html b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-embed-blocked.html new file mode 100644 index 00000000000..f1338007371 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-embed-blocked.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html> + +<head> + <meta http-equiv="Content-Security-Policy" content="object-src 'none'; script-src 'self' 'unsafe-inline';"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> + +<body> + <script> + var t = async_test("Should block the object and fire a spv"); + window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) { + assert_equals(e.violatedDirective, "object-src"); + })); + </script> + + <embed height="40" width="40" type="image/png" + src="/content-security-policy/support/pass.png"></embed> +</body> + +</html> diff --git a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-redirect-allowed.html b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-redirect-allowed.html new file mode 100644 index 00000000000..c52286fc129 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-redirect-allowed.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html> + +<head> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <!-- Content-Security-Policy: object-src 'self'; script-src 'self' 'unsafe-inline'; report-uri ../support/report.py?op=put&reportID={{$id}} --> +</head> + +<body> + <object type="image/png" data="/common-redirect.py?location=/content-security-policy/support/pass.png"></object> + + <!-- we rely on the report because we can't rely on the onload event for + "allowed" tests as it is not fired for object and embed --> + <script async defer src='../support/checkReport.sub.js?reportExists=false'></script> +</body> + +</html> diff --git a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-redirect-allowed.html.sub.headers b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-redirect-allowed.html.sub.headers new file mode 100644 index 00000000000..82779ec642a --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-redirect-allowed.html.sub.headers @@ -0,0 +1,2 @@ +Set-Cookie: object-src-url-redirect-allowed={{$id:uuid()}}; Path=/content-security-policy/object-src/ +Content-Security-Policy: object-src 'self'; script-src 'self' 'unsafe-inline'; report-uri ../support/report.py?op=put&reportID={{$id}} diff --git a/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-redirect-blocked.sub.html b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-redirect-blocked.sub.html new file mode 100644 index 00000000000..c79c9938e1c --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/object-src/object-src-url-redirect-blocked.sub.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> + +<head> + <meta http-equiv="Content-Security-Policy" content="object-src 'self'; script-src 'self' 'unsafe-inline';"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> + +<body> + <script> + var t = async_test("Should block the object and fire a spv"); + window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) { + assert_equals(e.violatedDirective, "object-src"); + })); + </script> + + <object type="image/png" data="/common/redirect.py?location=http://{{domains[www1]}}/content-security-policy/support/pass.png"></object> +</body> + +</html> diff --git a/tests/wpt/web-platform-tests/content-security-policy/reporting/report-cross-origin-no-cookies.sub.html b/tests/wpt/web-platform-tests/content-security-policy/reporting/report-cross-origin-no-cookies.sub.html index 2922894832d..934d74c8774 100644 --- a/tests/wpt/web-platform-tests/content-security-policy/reporting/report-cross-origin-no-cookies.sub.html +++ b/tests/wpt/web-platform-tests/content-security-policy/reporting/report-cross-origin-no-cookies.sub.html @@ -10,19 +10,25 @@ </head> <body> <script> - var test = async_test("Image should not load"); - fetch( - "/cookies/resources/set-cookie.py?name=cspViolationReportCookie1&path=" + encodeURIComponent("{{domains[www1]}}:{{ports[http][0]}}/"), - {mode: 'no-cors', credentials: 'include'}) - .then(() => { - // This image will generate a CSP violation report. - const img = new Image(); - img.onerror = test.step_func_done(); - img.onload = test.unreached_func("Should not have loaded the image"); + promise_test(function(test) { + const path = encodeURIComponent("{{domains[www1]}}:{{ports[http][0]}}/"); + return fetch( + "/cookies/resources/set-cookie.py?name=cspViolationReportCookie1&path=" + path, + {mode: 'no-cors', credentials: 'include'}) + .then(() => { + test.add_cleanup(() => { + return fetch("/cookies/resources/set.py?cspViolationReportCookie1=; path=" + path + "; expires=Thu, 01 Jan 1970 00:00:01 GMT"); + }); - img.src = "../support/fail.png"; - document.body.appendChild(img); - }); + // This image will generate a CSP violation report. + const img = new Image(); + img.onerror = test.step_func_done(); + img.onload = test.unreached_func("Should not have loaded the image"); + + img.src = "../support/fail.png"; + document.body.appendChild(img); + }); + }, "Image should not load"); </script> <script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=img-src%20%27none%27&noCookies=true'></script> diff --git a/tests/wpt/web-platform-tests/content-security-policy/reporting/report-same-origin-with-cookies.html b/tests/wpt/web-platform-tests/content-security-policy/reporting/report-same-origin-with-cookies.html index 515996c1dd3..9a09722b409 100644 --- a/tests/wpt/web-platform-tests/content-security-policy/reporting/report-same-origin-with-cookies.html +++ b/tests/wpt/web-platform-tests/content-security-policy/reporting/report-same-origin-with-cookies.html @@ -15,6 +15,10 @@ "/cookies/resources/set-cookie.py?name=cspViolationReportCookie2&path=" + encodeURIComponent("/"), {mode: 'no-cors', credentials: 'include'}) .then(() => { + test.add_cleanup(() => { + document.cookie = "cspViolationReportCookie2=; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT"; + }); + // This image will generate a CSP violation report. const img = new Image(); img.onerror = test.step_func_done(); diff --git a/tests/wpt/web-platform-tests/css/css-images/multiple-position-color-stop-linear-2-ref.html b/tests/wpt/web-platform-tests/css/css-images/multiple-position-color-stop-linear-2-ref.html new file mode 100644 index 00000000000..53ca212ad4a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-images/multiple-position-color-stop-linear-2-ref.html @@ -0,0 +1,5 @@ +<!doctype html> +<meta charset=utf-8> +<body> + <div style="background: linear-gradient(to bottom, red 0%, red 25%, blue 25%, blue 75%, red 75%, red 100%); width: 100px; height: 100px;"><br></div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-images/multiple-position-color-stop-linear-2.html b/tests/wpt/web-platform-tests/css/css-images/multiple-position-color-stop-linear-2.html new file mode 100644 index 00000000000..f33ae99c239 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-images/multiple-position-color-stop-linear-2.html @@ -0,0 +1,9 @@ +<!doctype html> +<meta charset=utf-8> +<title>Linear gradient with a two position color stops</title> +<link rel="help" href="https://drafts.csswg.org/css-images-4/#color-stop-syntax"> +<meta name="assert" content="Color stops with two positions are equivalent to two color stops with the same color"> +<link rel=match href=/css/css-images/multiple-position-color-stop-linear-2-ref.html> +<body> + <div style="background: linear-gradient(to bottom, red 0% 25%, blue 25% 75%, red 75% 100%); width: 100px; height: 100px;"><br></div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-images/multiple-position-color-stop-radial-2-ref.html b/tests/wpt/web-platform-tests/css/css-images/multiple-position-color-stop-radial-2-ref.html new file mode 100644 index 00000000000..9b5bdfdf2cd --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-images/multiple-position-color-stop-radial-2-ref.html @@ -0,0 +1,5 @@ +<!doctype html> +<meta charset=utf-8> +<body> + <div style="background: radial-gradient(center, red 0%, red 25%, blue 25%, blue 75%, red 75%, red 100%); width: 100px; height: 100px;"><br></div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-images/multiple-position-color-stop-radial-2.html b/tests/wpt/web-platform-tests/css/css-images/multiple-position-color-stop-radial-2.html new file mode 100644 index 00000000000..c66b0831626 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-images/multiple-position-color-stop-radial-2.html @@ -0,0 +1,9 @@ +<!doctype html> +<meta charset=utf-8> +<title>Radial gradient with a two position color stops</title> +<link rel="help" href="https://drafts.csswg.org/css-images-4/#color-stop-syntax"> +<meta name="assert" content="Color stops with two positions are equivalent to two color stops with the same color"> +<link rel=match href=/css/css-images/multiple-position-color-stop-radial-2-ref.html> +<body> + <div style="background: radial-gradient(center, red 0% 25%, blue 25% 75%, red 75% 100%); width: 100px; height: 100px;"><br></div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-inline-001.html b/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-inline-001.html index 343646464a9..21acae0ee7e 100644 --- a/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-inline-001.html +++ b/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-inline-001.html @@ -5,23 +5,27 @@ <link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> <meta content="ahem" name="flags"> <style> + body { + overflow: hidden; + } .container { writing-mode: horizontal-tb; + padding: 70px 30px; + margin: -170px -230px; font: 100px/1 Ahem; line-height: 100px; - color: red; - } - .container::first-letter { - color:green; + color: transparent; } .container > span { clip-path: polygon(0% 0%, 50% 0%, 50% 100%, 0% 100%); + color: red; + } + .container > span > span { + color: green; } </style> <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> <div class="container"> - <span> - XX<br> - XXX - </span> + <br> + XX<span><span>X</span>X<br>XXXXX</span> </div> diff --git a/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-inline-002.html b/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-inline-002.html index d56117e22b8..b99bb20a86d 100644 --- a/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-inline-002.html +++ b/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-inline-002.html @@ -5,24 +5,27 @@ <link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> <meta content="ahem" name="flags"> <style> + body { + overflow: hidden; + } .container { writing-mode: vertical-rl; - margin-left: -100px; + padding: 70px 30px; + margin: -270px -130px; font: 100px/1 Ahem; line-height: 100px; - color: red; - } - .container::first-letter { - color:green; + color: transparent; } .container > span { clip-path: polygon(0% 0%, 100% 0%, 100% 50%, 0% 50%); + color: red; + } + .container > span > span { + color: green; } </style> <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> <div class="container"> - <span> - XX<br> - XXX - </span> + <br> + XX<span><span>X</span>X<br>XXXXX</span> </div> diff --git a/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-inline-003.html b/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-inline-003.html index 4c907a46120..89fd44abc71 100644 --- a/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-inline-003.html +++ b/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-inline-003.html @@ -5,23 +5,27 @@ <link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> <meta content="ahem" name="flags"> <style> + body { + overflow: hidden; + } .container { writing-mode: vertical-lr; + padding: 70px 30px; + margin: -270px -130px; font: 100px/1 Ahem; line-height: 100px; - color: red; - } - .container::first-letter { - color:green; + color: transparent; } .container > span { clip-path: polygon(0% 0%, 100% 0%, 100% 50%, 0% 50%); + color: red; + } + .container > span > span { + color: green; } </style> <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> <div class="container"> - <span> - XX<br> - XXX - </span> + <br> + XX<span><span>X</span>X<br>XXXXX</span> </div> diff --git a/tests/wpt/web-platform-tests/css/css-multicol/multicol-span-all-margin-bottom-001-ref.xht b/tests/wpt/web-platform-tests/css/css-multicol/multicol-span-all-margin-bottom-001-ref.xht index d6719f0b882..2152b566372 100644 --- a/tests/wpt/web-platform-tests/css/css-multicol/multicol-span-all-margin-bottom-001-ref.xht +++ b/tests/wpt/web-platform-tests/css/css-multicol/multicol-span-all-margin-bottom-001-ref.xht @@ -22,9 +22,9 @@ <img src="support/swatch-yellow.png" width="160" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="160" height="20" alt="Image download support must be enabled" /> <img src="support/swatch-yellow.png" width="160" height="20" alt="Image download support must be enabled" /> + <img src="support/swatch-yellow.png" width="40" height="20" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="80" height="20" alt="Image download support must be enabled" /><img src="support/swatch-pink.png" width="40" height="20" alt="Image download support must be enabled" /> <img src="support/swatch-orange.png" width="40" height="20" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="40" height="20" alt="Image download support must be enabled" /><img src="support/swatch-pink.png" width="80" height="20" alt="Image download support must be enabled" /> <img src="support/swatch-yellow.png" width="40" height="20" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="40" height="20" alt="Image download support must be enabled" /><img src="support/swatch-pink.png" width="40" height="20" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="40" height="20" alt="Image download support must be enabled" /> - <img src="support/swatch-blue.png" width="80" height="20" alt="Image download support must be enabled" /><img src="support/swatch-pink.png" width="40" height="20" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="40" height="20" alt="Image download support must be enabled" /> </div> </body> diff --git a/tests/wpt/web-platform-tests/css/css-multicol/multicol-span-all-margin-bottom-001.xht b/tests/wpt/web-platform-tests/css/css-multicol/multicol-span-all-margin-bottom-001.xht index 5a81ca1ec40..b9571bd7a2e 100644 --- a/tests/wpt/web-platform-tests/css/css-multicol/multicol-span-all-margin-bottom-001.xht +++ b/tests/wpt/web-platform-tests/css/css-multicol/multicol-span-all-margin-bottom-001.xht @@ -50,10 +50,10 @@ color: orange; /* In this test, the glyphs "or" are painted into 1st column box. - "Content in the normal flow that extends into column - gaps (e.g., long words or images) is clipped in the - middle of the column gap." - Therefore, the glyphs "ang" are clipped and not painted. + Per spec, content in the normal flow that extends into column + gaps (e.g., long words or images) is not clipped to the column + box. However, the glyphs "ang" are overwritten by <span>s, so + they're not visible. */ } diff --git a/tests/wpt/web-platform-tests/css/cssom-view/elementsFromPoint-inline-htb-ltr.html b/tests/wpt/web-platform-tests/css/cssom-view/elementsFromPoint-inline-htb-ltr.html new file mode 100644 index 00000000000..5d6f92f3d1f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/cssom-view/elementsFromPoint-inline-htb-ltr.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/cssom-view-1/#extensions-to-the-document-interface"> +<div id="container" style="width:200px; height:200px; writing-mode:horizontal-tb; direction:ltr;"> + <span id="target">target</span> +</div> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + test(()=> { + var elements = document.elementsFromPoint(15, 15); + assert_equals(elements.length, 4); + assert_equals(elements[0].id, "target"); + assert_equals(elements[1].id, "container"); + assert_equals(elements[2].nodeName, "BODY"); + assert_equals(elements[3].nodeName, "HTML"); + }, "elementsFromPoint should return all elements under a point"); +</script> diff --git a/tests/wpt/web-platform-tests/css/cssom-view/elementsFromPoint-inline-htb-rtl.html b/tests/wpt/web-platform-tests/css/cssom-view/elementsFromPoint-inline-htb-rtl.html new file mode 100644 index 00000000000..3ff7f013990 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/cssom-view/elementsFromPoint-inline-htb-rtl.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/cssom-view-1/#extensions-to-the-document-interface"> +<div id="container" style="width:200px; height:200px; writing-mode:horizontal-tb; direction:rtl;"> + <span id="target">target</span> +</div> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + test(()=> { + var elements = document.elementsFromPoint(200, 15); + assert_equals(elements.length, 4); + assert_equals(elements[0].id, "target"); + assert_equals(elements[1].id, "container"); + assert_equals(elements[2].nodeName, "BODY"); + assert_equals(elements[3].nodeName, "HTML"); + }, "elementsFromPoint should return all elements under a point"); +</script> diff --git a/tests/wpt/web-platform-tests/css/cssom-view/elementsFromPoint-inline-vlr-ltr.html b/tests/wpt/web-platform-tests/css/cssom-view/elementsFromPoint-inline-vlr-ltr.html new file mode 100644 index 00000000000..c22c0051594 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/cssom-view/elementsFromPoint-inline-vlr-ltr.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/cssom-view-1/#extensions-to-the-document-interface"> +<div id="container" style="width:200px; height:200px; writing-mode:vertical-lr; direction:ltr;"> + <span id="target">target</span> +</div> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + test(()=> { + var elements = document.elementsFromPoint(15, 15); + assert_equals(elements.length, 4); + assert_equals(elements[0].id, "target"); + assert_equals(elements[1].id, "container"); + assert_equals(elements[2].nodeName, "BODY"); + assert_equals(elements[3].nodeName, "HTML"); + }, "elementsFromPoint should return all elements under a point"); +</script> diff --git a/tests/wpt/web-platform-tests/css/cssom-view/elementsFromPoint-inline-vlr-rtl.html b/tests/wpt/web-platform-tests/css/cssom-view/elementsFromPoint-inline-vlr-rtl.html new file mode 100644 index 00000000000..e8e600a8b8c --- /dev/null +++ b/tests/wpt/web-platform-tests/css/cssom-view/elementsFromPoint-inline-vlr-rtl.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/cssom-view-1/#extensions-to-the-document-interface"> +<div id="container" style="width:200px; height:200px; writing-mode:vertical-lr; direction:rtl;"> + <span id="target">target</span> +</div> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + test(()=> { + var elements = document.elementsFromPoint(15, 200); + assert_equals(elements.length, 4); + assert_equals(elements[0].id, "target"); + assert_equals(elements[1].id, "container"); + assert_equals(elements[2].nodeName, "BODY"); + assert_equals(elements[3].nodeName, "HTML"); + }, "elementsFromPoint should return all elements under a point"); +</script> diff --git a/tests/wpt/web-platform-tests/css/cssom-view/elementsFromPoint-inline-vrl-ltr.html b/tests/wpt/web-platform-tests/css/cssom-view/elementsFromPoint-inline-vrl-ltr.html new file mode 100644 index 00000000000..598d41e41b5 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/cssom-view/elementsFromPoint-inline-vrl-ltr.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/cssom-view-1/#extensions-to-the-document-interface"> +<div id="container" style="width:200px; height:200px; writing-mode:vertical-rl; direction:ltr;"> + <span id="target">target</span> +</div> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + test(()=> { + var elements = document.elementsFromPoint(200, 15); + assert_equals(elements.length, 4); + assert_equals(elements[0].id, "target"); + assert_equals(elements[1].id, "container"); + assert_equals(elements[2].nodeName, "BODY"); + assert_equals(elements[3].nodeName, "HTML"); + }, "elementsFromPoint should return all elements under a point"); +</script> diff --git a/tests/wpt/web-platform-tests/css/cssom-view/elementsFromPoint-inline-vrl-rtl.html b/tests/wpt/web-platform-tests/css/cssom-view/elementsFromPoint-inline-vrl-rtl.html new file mode 100644 index 00000000000..4d93bf5210d --- /dev/null +++ b/tests/wpt/web-platform-tests/css/cssom-view/elementsFromPoint-inline-vrl-rtl.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/cssom-view-1/#extensions-to-the-document-interface"> +<div id="container" style="width:200px; height:200px; writing-mode:vertical-rl; direction:rtl;"> + <span id="target">target</span> +</div> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + test(()=> { + var elements = document.elementsFromPoint(200, 200); + assert_equals(elements.length, 4); + assert_equals(elements[0].id, "target"); + assert_equals(elements[1].id, "container"); + assert_equals(elements[2].nodeName, "BODY"); + assert_equals(elements[3].nodeName, "HTML"); + }, "elementsFromPoint should return all elements under a point"); +</script> diff --git a/tests/wpt/web-platform-tests/css/cssom-view/getClientRects-br-htb-ltr.html b/tests/wpt/web-platform-tests/css/cssom-view/getClientRects-br-htb-ltr.html new file mode 100644 index 00000000000..e952d61b677 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/cssom-view/getClientRects-br-htb-ltr.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/cssom-view-1/#dom-element-getclientrects"> +<div style="position:absolute; top:0; left:0; width:200px; height:100px; writing-mode:horizontal-tb; direction:ltr;"> + <br id="child"> +</div> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + test(()=>{ + let r = document.getElementById("child").getClientRects()[0]; + assert_equals(r.left, 0); + assert_greater_than_equal(r.top, 0); + assert_less_than(r.top, 50); + }, "Position of the BR element"); +</script> diff --git a/tests/wpt/web-platform-tests/css/cssom-view/getClientRects-br-htb-rtl.html b/tests/wpt/web-platform-tests/css/cssom-view/getClientRects-br-htb-rtl.html new file mode 100644 index 00000000000..24dbc929a69 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/cssom-view/getClientRects-br-htb-rtl.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/cssom-view-1/#dom-element-getclientrects"> +<div style="position:absolute; top:0; left:0; width:200px; height:100px; writing-mode:horizontal-tb; direction:rtl;"> + <br id="child"> +</div> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + test(()=>{ + let r = document.getElementById("child").getClientRects()[0]; + assert_equals(r.left, 200); + assert_greater_than_equal(r.top, 0); + assert_less_than(r.top, 50); + }, "Position of the BR element"); +</script> diff --git a/tests/wpt/web-platform-tests/css/cssom-view/getClientRects-br-vlr-ltr.html b/tests/wpt/web-platform-tests/css/cssom-view/getClientRects-br-vlr-ltr.html new file mode 100644 index 00000000000..b324342d64b --- /dev/null +++ b/tests/wpt/web-platform-tests/css/cssom-view/getClientRects-br-vlr-ltr.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/cssom-view-1/#dom-element-getclientrects"> +<div style="position:absolute; top:0; left:0; width:200px; height:100px; writing-mode:vertical-lr; direction:ltr;"> + <br id="child"> +</div> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + test(()=>{ + let r = document.getElementById("child").getClientRects()[0]; + assert_greater_than_equal(r.left, 0); + assert_less_than(r.left, 50); + assert_equals(r.top, 0); + }, "Position of the BR element"); +</script> diff --git a/tests/wpt/web-platform-tests/css/cssom-view/getClientRects-br-vlr-rtl.html b/tests/wpt/web-platform-tests/css/cssom-view/getClientRects-br-vlr-rtl.html new file mode 100644 index 00000000000..3a36f973061 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/cssom-view/getClientRects-br-vlr-rtl.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/cssom-view-1/#dom-element-getclientrects"> +<div style="position:absolute; top:0; left:0; width:200px; height:100px; writing-mode:vertical-lr; direction:rtl;"> + <br id="child"> +</div> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + test(()=>{ + let r = document.getElementById("child").getClientRects()[0]; + assert_greater_than_equal(r.left, 0); + assert_less_than(r.left, 50); + assert_equals(r.top, 100); + }, "Position of the BR element"); +</script> diff --git a/tests/wpt/web-platform-tests/css/cssom-view/getClientRects-br-vrl-ltr.html b/tests/wpt/web-platform-tests/css/cssom-view/getClientRects-br-vrl-ltr.html new file mode 100644 index 00000000000..c0be872a0f8 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/cssom-view/getClientRects-br-vrl-ltr.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/cssom-view-1/#dom-element-getclientrects"> +<div style="position:absolute; top:0; left:0; width:200px; height:100px; writing-mode:vertical-rl; direction:ltr;"> + <br id="child"> +</div> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + test(()=>{ + let r = document.getElementById("child").getClientRects()[0]; + assert_greater_than(r.left, 150); + assert_less_than(r.left, 200); + assert_equals(r.top, 0); + }, "Position of the BR element"); +</script> diff --git a/tests/wpt/web-platform-tests/css/cssom-view/getClientRects-br-vrl-rtl.html b/tests/wpt/web-platform-tests/css/cssom-view/getClientRects-br-vrl-rtl.html new file mode 100644 index 00000000000..c5a3062cf49 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/cssom-view/getClientRects-br-vrl-rtl.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/cssom-view-1/#dom-element-getclientrects"> +<div style="position:absolute; top:0; left:0; width:200px; height:100px; writing-mode:vertical-rl; direction:rtl;"> + <br id="child"> +</div> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + test(()=>{ + let r = document.getElementById("child").getClientRects()[0]; + assert_greater_than(r.left, 150); + assert_less_than(r.left, 200); + assert_equals(r.top, 100); + }, "Position of the BR element"); +</script> diff --git a/tests/wpt/web-platform-tests/css/cssom-view/getClientRects-inline.html b/tests/wpt/web-platform-tests/css/cssom-view/getClientRects-inline.html new file mode 100644 index 00000000000..415e34a6f04 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/cssom-view/getClientRects-inline.html @@ -0,0 +1,55 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/cssom-view-1/#dom-element-getclientrects"> +<link rel="match" href="../reference/nothing.html"> +<style> + .container { + float: left; + width: 8em; + height: 7em; + padding: 1em; + color: red; + } + .correctionFluid { + position: absolute; + background: white; + + /* Add some fluff to cover text ink-overflow. */ + outline:2px solid white; + } +</style> +<p>There should be nothing below.</p> + <div class="container" style="writing-mode:horizontal-tb;"> + <br><span class="child">FAIL</span> + </div> + <div class="container" style="writing-mode:vertical-lr;"> + <br><span class="child">FAIL</span> + </div> + <div class="container" style="writing-mode:vertical-rl;"> + <br><span class="child">FAIL</span> + </div> + <div class="container" style="writing-mode:horizontal-tb; direction:rtl;"> + <br><span class="child">FAIL</span> + </div> + <div class="container" style="writing-mode:vertical-lr; direction:rtl;"> + <br><span class="child">FAIL</span> + </div> + <div class="container" style="writing-mode:vertical-rl; direction:rtl;"> + <br><span class="child">FAIL</span> + </div> +<script> + // Create a white absolutely positioned box for each span.child + // element and cover it. + + let elements = document.querySelectorAll("span.child"); + elements.forEach((element)=> { + let correctionFluid = document.createElement("div"); + correctionFluid.className = "correctionFluid"; + var r = element.getClientRects()[0]; + correctionFluid.style.left = r.left + "px"; + correctionFluid.style.top = r.top + "px"; + correctionFluid.style.width = r.width + "px"; + correctionFluid.style.height = r.height + "px"; + document.body.appendChild(correctionFluid); + }); +</script> diff --git a/tests/wpt/web-platform-tests/css/cssom-view/offsetTopLeftInline.html b/tests/wpt/web-platform-tests/css/cssom-view/offsetTopLeftInline.html new file mode 100644 index 00000000000..772cc34f05b --- /dev/null +++ b/tests/wpt/web-platform-tests/css/cssom-view/offsetTopLeftInline.html @@ -0,0 +1,54 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/cssom-view-1/#extensions-to-the-htmlelement-interface"> +<link rel="match" href="../reference/nothing.html"> +<style> + .container { + float: left; + width: 8em; + height: 7em; + padding: 1em; + color: red; + } + .correctionFluid { + position: absolute; + background: white; + + /* Add some fluff to cover text ink-overflow. */ + outline:2px solid white; + } +</style> +<p>There should be nothing below.</p> + <div class="container" style="writing-mode:horizontal-tb;"> + <br><span class="child">FAIL</span> + </div> + <div class="container" style="writing-mode:vertical-lr;"> + <br><span class="child">FAIL</span> + </div> + <div class="container" style="writing-mode:vertical-rl;"> + <br><span class="child">FAIL</span> + </div> + <div class="container" style="writing-mode:horizontal-tb; direction:rtl;"> + <br><span class="child">FAIL</span> + </div> + <div class="container" style="writing-mode:vertical-lr; direction:rtl;"> + <br><span class="child">FAIL</span> + </div> + <div class="container" style="writing-mode:vertical-rl; direction:rtl;"> + <br><span class="child">FAIL</span> + </div> +<script> + // Create a white absolutely positioned box for each span.child + // element and cover it. + + let elements = document.querySelectorAll("span.child"); + elements.forEach((element)=> { + let correctionFluid = document.createElement("div"); + correctionFluid.className = "correctionFluid"; + correctionFluid.style.left = element.offsetLeft + "px"; + correctionFluid.style.top = element.offsetTop + "px"; + correctionFluid.style.width = element.offsetWidth + "px"; + correctionFluid.style.height = element.offsetHeight + "px"; + document.body.appendChild(correctionFluid); + }); +</script> diff --git a/tests/wpt/web-platform-tests/css/cssom-view/scroll-behavior-smooth-positions.html b/tests/wpt/web-platform-tests/css/cssom-view/scroll-behavior-smooth-positions.html index 19e317d5e4b..14e4c94886a 100644 --- a/tests/wpt/web-platform-tests/css/cssom-view/scroll-behavior-smooth-positions.html +++ b/tests/wpt/web-platform-tests/css/cssom-view/scroll-behavior-smooth-positions.html @@ -109,7 +109,7 @@ }, "Scroll positions when aborting a smooth scrolling with another smooth scrolling"); promise_test(() => { - return new Promise(function(resolve) { + return new Promise(function(resolve, reject) { resetScroll(overflowNode); var initialScrollAborted = false; var oldLeft = overflowNode.scrollLeft; diff --git a/tests/wpt/web-platform-tests/css/selectors/focus-visible-009.html b/tests/wpt/web-platform-tests/css/selectors/focus-visible-009.html index c7d682baa43..4dae6407ada 100644 --- a/tests/wpt/web-platform-tests/css/selectors/focus-visible-009.html +++ b/tests/wpt/web-platform-tests/css/selectors/focus-visible-009.html @@ -33,7 +33,7 @@ })); // Handle the case where the button is focused before the test runs. - if (document.activeButtonement === button) { + if (document.activeElement === button) { assert_equals(getComputedStyle(button).outlineColor, "rgb(0, 100, 0)"); t.done(); } diff --git a/tests/wpt/web-platform-tests/feature-policy/reporting/encrypted-media-reporting.https.html b/tests/wpt/web-platform-tests/feature-policy/reporting/encrypted-media-reporting.https.html new file mode 100644 index 00000000000..d309d5390f1 --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/reporting/encrypted-media-reporting.https.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<html> + <head> + <script src='/resources/testharness.js'></script> + <script src='/resources/testharnessreport.js'></script> + </head> + <body> + <script> +var check_report_format = (reports, observer) => { + let report = reports[0]; + assert_equals(report.type, "feature-policy"); + assert_equals(report.url, document.location.href); + assert_equals(report.body.feature, "encrypted-media"); + assert_equals(report.body.sourceFile, document.location.href); + assert_equals(typeof report.body.message, "string"); + assert_equals(typeof report.body.lineNumber, "number"); + assert_equals(typeof report.body.columnNumber, "number"); +}; + +promise_test(async t => { + const report = new Promise(resolve => { + new ReportingObserver((reports, observer) => resolve([reports, observer]), + {types: ['feature-policy']}).observe(); + }); + await promise_rejects(t, "SecurityError", + navigator.requestMediaKeySystemAccess("org.w3.clearkey", + [{ + initDataTypes: ["webm"], + videoCapabilities: [{contentType: 'video/webm;codecs="vp8"'}], + }]), + "requestMediaKeySystemAccess() should not be allowed in this document."); + const [reports, observer] = await report; + check_report_format(reports, observer); +}, "Encrypted Media report format"); + </script> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/feature-policy/reporting/encrypted-media-reporting.https.html.headers b/tests/wpt/web-platform-tests/feature-policy/reporting/encrypted-media-reporting.https.html.headers new file mode 100644 index 00000000000..73753a2e41d --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/reporting/encrypted-media-reporting.https.html.headers @@ -0,0 +1 @@ +Feature-Policy: encrypted-media 'none' diff --git a/tests/wpt/web-platform-tests/feature-policy/reporting/picture-in-picture-reporting.html b/tests/wpt/web-platform-tests/feature-policy/reporting/picture-in-picture-reporting.html new file mode 100644 index 00000000000..a8a998ed2a1 --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/reporting/picture-in-picture-reporting.html @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<html> + <head> + <script src='/resources/testharness.js'></script> + <script src='/resources/testharnessreport.js'></script> + <script src="/resources/testdriver.js"></script> + <script src="/resources/testdriver-vendor.js"></script> + </head> + <body> + <script> +const check_report_format = (reports, observer) => { + const report = reports[0]; + assert_equals(report.type, "feature-policy"); + assert_equals(report.url, document.location.href); + assert_equals(report.body.feature, "picture-in-picture"); + assert_equals(report.body.sourceFile, document.location.href); + assert_equals(typeof report.body.message, "string"); + assert_equals(typeof report.body.lineNumber, "number"); + assert_equals(typeof report.body.columnNumber, "number"); +}; + +const loadVideo = () => new Promise(resolve => { + const video = document.createElement('video'); + video.src = '/media/movie_5.ogv'; + video.addEventListener('loadedmetadata', () => { + resolve(video); + }, { once: true }); +}); + +promise_test(async (t) => { + const report = new Promise(resolve => { + new ReportingObserver((reports, observer) => resolve([reports, observer]), + {types: ['feature-policy']}).observe(); + }); + const videoElement = await loadVideo(); + await test_driver.bless('picture-in-picture'); + await promise_rejects(t, 'SecurityError', videoElement.requestPictureInPicture(), + "Picture-in-Picture should not be allowed in this document."); + const [reports, observer] = await report; + check_report_format(reports, observer); +}, "Picture-in-Picture Report Format"); + </script> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/feature-policy/reporting/picture-in-picture-reporting.html.headers b/tests/wpt/web-platform-tests/feature-policy/reporting/picture-in-picture-reporting.html.headers new file mode 100644 index 00000000000..1759381fdc4 --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/reporting/picture-in-picture-reporting.html.headers @@ -0,0 +1 @@ +Feature-Policy: picture-in-picture 'none' diff --git a/tests/wpt/web-platform-tests/html/dom/elements/the-innertext-idl-attribute/getter-tests.js b/tests/wpt/web-platform-tests/html/dom/elements/the-innertext-idl-attribute/getter-tests.js index fcd11b414b4..1195656a2a4 100644 --- a/tests/wpt/web-platform-tests/html/dom/elements/the-innertext-idl-attribute/getter-tests.js +++ b/tests/wpt/web-platform-tests/html/dom/elements/the-innertext-idl-attribute/getter-tests.js @@ -9,6 +9,7 @@ testText("<div>abc\ndef", "abc def", "\\n converted to space"); testText("<div>abc\rdef", "abc def", "\\r converted to space"); testText("<div>abc\tdef", "abc def", "\\t converted to space"); testText("<div>abc <br>def", "abc\ndef", "Trailing whitespace before hard line break removed"); +testText("<div>abc<br> def", "abc\ndef", "Leading whitespace after hard line break removed"); /**** <pre> ****/ @@ -52,6 +53,9 @@ testText("<div style='white-space:pre-line'>abc\tdef", "abc def", "\\t converted testText("<div><span>abc </span> def", "abc def", "Whitespace collapses across element boundaries"); testText("<div><span>abc </span><span></span> def", "abc def", "Whitespace collapses across element boundaries"); testText("<div><span>abc </span><span style='white-space:pre'></span> def", "abc def", "Whitespace collapses across element boundaries"); +testText("<div>abc <input> def", "abc def", "Whitespace around <input> should not be collapsed"); +testText("<div>abc <span style='display:inline-block'></span> def", "abc def", "Whitespace around inline-block should not be collapsed"); +testText("<div>abc <span style='display:inline-block'> def </span> ghi", "abc def ghi", "Trailing space at end of inline-block should be collapsed"); /**** Soft line breaks ****/ diff --git a/tests/wpt/web-platform-tests/html/editing/dnd/file/007.html b/tests/wpt/web-platform-tests/html/editing/dnd/file/007.html index 099716f894f..046220bdb6d 100644 --- a/tests/wpt/web-platform-tests/html/editing/dnd/file/007.html +++ b/tests/wpt/web-platform-tests/html/editing/dnd/file/007.html @@ -95,5 +95,5 @@ function finish() { <div></div> -<p>Save <a href="/common/large.py?size=32Mb">32MB.txt</a> to your desktop. Use your pointing device to drag the saved file from your desktop onto the orange box, and release it. If a confirmation dialog appears, accept it. Fail if this text is not replaced with a pass message. Fail if the UI locks up immediately after dropping the file.</p> +<p>Save <a href="../resources/32mb.py">32MB.txt</a> to your desktop. Use your pointing device to drag the saved file from your desktop onto the orange box, and release it. If a confirmation dialog appears, accept it. Fail if this text is not replaced with a pass message. Fail if the UI locks up immediately after dropping the file.</p> <noscript><p>Enable JavaScript and reload</p></noscript> diff --git a/tests/wpt/web-platform-tests/html/editing/dnd/resources/32mb.py b/tests/wpt/web-platform-tests/html/editing/dnd/resources/32mb.py new file mode 100644 index 00000000000..5b1ac204640 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/editing/dnd/resources/32mb.py @@ -0,0 +1,12 @@ +thirty_two_megabytes = 32 * 1024 * 1024 +chunk = 'ab' * 512 * 512 +chunk_length = len(chunk) + +def main(request, response): + def content(): + bytes_sent = 0 + while bytes_sent < thirty_two_megabytes: + yield chunk + bytes_sent += chunk_length + + return [("Content-Type", "text/plain")], content() diff --git a/tests/wpt/web-platform-tests/interfaces/css-layout-api.idl b/tests/wpt/web-platform-tests/interfaces/css-layout-api.idl index 4e2659933ed..5dc6db455e4 100644 --- a/tests/wpt/web-platform-tests/interfaces/css-layout-api.idl +++ b/tests/wpt/web-platform-tests/interfaces/css-layout-api.idl @@ -3,6 +3,33 @@ // (https://github.com/tidoust/reffy-reports) // Source: CSS Layout API Level 1 (https://drafts.css-houdini.org/css-layout-api-1/) +partial namespace CSS { + [SameObject] readonly attribute Worklet layoutWorklet; +}; + +[Global=(Worklet,LayoutWorklet),Exposed=LayoutWorklet] +interface LayoutWorkletGlobalScope : WorkletGlobalScope { + void registerLayout(DOMString name, VoidFunction layoutCtor); +}; + +[Exposed=LayoutWorklet] +dictionary LayoutOptions { + ChildDisplayType childDisplay = "block"; + LayoutSizingMode sizing = "block-like"; +}; + +[Exposed=LayoutWorklet] +enum ChildDisplayType { + "block", + "normal", +}; + +[Exposed=LayoutWorklet] +enum LayoutSizingMode { + "block-like", + "manual", +}; + [Exposed=LayoutWorklet] interface LayoutChild { readonly attribute StylePropertyMapReadOnly styleMap; @@ -106,33 +133,6 @@ interface LayoutEdges { readonly attribute LayoutEdgeSizes all; }; -partial namespace CSS { - [SameObject] readonly attribute Worklet layoutWorklet; -}; - -[Global=(Worklet,LayoutWorklet),Exposed=LayoutWorklet] -interface LayoutWorkletGlobalScope : WorkletGlobalScope { - void registerLayout(DOMString name, VoidFunction layoutCtor); -}; - -[Exposed=LayoutWorklet] -dictionary LayoutOptions { - ChildDisplayType childDisplay = "block"; - LayoutSizingMode sizing = "block-like"; -}; - -[Exposed=LayoutWorklet] -enum ChildDisplayType { - "block", - "normal", -}; - -[Exposed=LayoutWorklet] -enum LayoutSizingMode { - "block-like", - "manual", -}; - [Exposed=LayoutWorklet] interface IntrinsicSizesRequest { }; diff --git a/tests/wpt/web-platform-tests/interfaces/webrtc-dscp.idl b/tests/wpt/web-platform-tests/interfaces/webrtc-dscp.idl index 718447bbf4a..732230b4a33 100644 --- a/tests/wpt/web-platform-tests/interfaces/webrtc-dscp.idl +++ b/tests/wpt/web-platform-tests/interfaces/webrtc-dscp.idl @@ -1,7 +1,7 @@ // GENERATED CONTENT - DO NOT EDIT // Content was automatically extracted by Reffy into reffy-reports // (https://github.com/tidoust/reffy-reports) -// Source: DSCP Control API (https://w3c.github.io/webrtc-dscp-exp/) +// Source: WebRTC DSCP Control API (https://w3c.github.io/webrtc-dscp-exp/) partial dictionary RTCRtpEncodingParameters { RTCPriorityType networkPriority; // Note: No default diff --git a/tests/wpt/web-platform-tests/interfaces/webrtc.idl b/tests/wpt/web-platform-tests/interfaces/webrtc.idl index c4ca910d6d1..cdeb5204e6a 100644 --- a/tests/wpt/web-platform-tests/interfaces/webrtc.idl +++ b/tests/wpt/web-platform-tests/interfaces/webrtc.idl @@ -520,6 +520,7 @@ enum RTCSctpTransportState { readonly attribute RTCPriorityType priority; readonly attribute RTCDataChannelState readyState; readonly attribute unsigned long bufferedAmount; + [EnforceRange] attribute unsigned long bufferedAmountLowThreshold; attribute EventHandler onopen; attribute EventHandler onbufferedamountlow; @@ -536,7 +537,9 @@ enum RTCSctpTransportState { dictionary RTCDataChannelInit { boolean ordered = true; + [EnforceRange] unsigned short maxPacketLifeTime; + [EnforceRange] unsigned short maxRetransmits; USVString protocol = ""; boolean negotiated = false; diff --git a/tests/wpt/web-platform-tests/lint.whitelist b/tests/wpt/web-platform-tests/lint.whitelist index 9f5693fcc2b..1166d9f59ea 100644 --- a/tests/wpt/web-platform-tests/lint.whitelist +++ b/tests/wpt/web-platform-tests/lint.whitelist @@ -794,3 +794,7 @@ MISSING-LINK: css/filter-effects/*.any.js # Tests that use WebKit/Blink testing APIs LAYOUTTESTS APIS: css/css-regions/interactivity/* LAYOUTTESTS APIS: resources/chromium/generic_sensor_mocks.js + +# Gecko additons to remove +CSS-COLLIDING-REF-NAME: css/css-contain/reference/contain-size-fieldset-001-ref.html +CSS-COLLIDING-REF-NAME: css/vendor-imports/mozilla/mozilla-central-reftests/contain/contain-size-fieldset-001-ref.html
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https.html b/tests/wpt/web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https.html index 2ed96ec386c..fc2e619a463 100644 --- a/tests/wpt/web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https.html +++ b/tests/wpt/web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https.html @@ -18,36 +18,45 @@ via the <code>srcObject</code> attribute.</p> <script src=/resources/testharness.js></script> <script src=/resources/testharnessreport.js></script> <script> -var vid = document.getElementById("vid"); -var t = async_test("Tests that a MediaStream can be assigned to a video element with srcObject", {timeout: 10000}); -t.step(function() { - navigator.mediaDevices.getUserMedia({video: true}) - .then(t.step_func(function (stream) { - var testOncePlaying = function() { - assert_equals(vid.played.length, 1, "A MediaStream's timeline always consists of a single range"); - assert_equals(vid.played.start(0), 0, "A MediaStream's timeline always consists of a single range"); - assert_approx_equals(vid.played.end(0), vid.currentTime, 0.0001, "A MediaStream's timeline always consists of a single range"); - assert_equals(vid.readyState, vid.HAVE_ENOUGH_DATA, "Upon selecting a media stream, the UA sets readyState to HAVE_ENOUGH_DATA"); - assert_equals(vid.duration, Infinity, " A MediaStream does not have a pre-defined duration. "); - var time = vid.currentTime; - - assert_approx_equals(vid.currentTime, time, 0.0001, "The UA MUST ignore attempts to set the currentTime attribute"); - // TODO add test that duration must be set to currentTime - // when mediastream is destroyed - vid.removeEventListener("timeupdate", testOncePlaying, false); - t.done(); - } - vid.addEventListener("timeupdate", t.step_func(testOncePlaying), false); - vid.srcObject = stream; - vid.play(); - assert_true(!vid.seeking, "A MediaStream is not seekable"); - assert_equals(vid.seekable.length, 0, "A MediaStream is not seekable"); - assert_equals(vid.defaultPlaybackRate, 1, "playback rate is always 1"); - assert_equals(vid.playbackRate, 1, "playback rate is always 1"); - assert_equals(vid.buffered.length, 0, "A MediaStream cannot be preloaded. Therefore, there is no buffered timeranges"); - assert_equals(vid.duration, vid.readyState == vid.HAVE_NOTHING ? NaN : Infinity, " A MediaStream does not have a pre-defined duration. "); - }), function(error) {}); -}); +'use strict'; +const vid = document.getElementById("vid"); + +promise_test(async t => { + const wait = ms => new Promise(r => t.step_timeout(r, ms)); + const timeout = (promise, time, msg) => + Promise.race([promise, wait(time).then(() => Promise.reject(new Error(msg)))]); + + const stream = await timeout(navigator.mediaDevices.getUserMedia({video: true}), 10000, "getUserMedia timeout"); + t.add_cleanup(() => stream.getTracks().forEach(track => track.stop())); + vid.srcObject = stream; + vid.play(); + assert_true(!vid.seeking, "A MediaStream is not seekable"); + assert_equals(vid.seekable.length, 0, "A MediaStream is not seekable"); + assert_equals(vid.defaultPlaybackRate, 1, "playback rate is always 1"); + assert_equals(vid.playbackRate, 1, "playback rate is always 1"); + assert_equals(vid.buffered.length, 0, "A MediaStream cannot be preloaded. Therefore, there is no buffered timeranges"); + assert_equals(vid.readyState, vid.HAVE_NOTHING, "readyState is HAVE_NOTHING initially"); + assert_equals(vid.duration, NaN, "A MediaStream does not have any duration initially."); + + const haveLoadedData = new Promise(r => vid.addEventListener("loadeddata", r, {once: true})); + + await new Promise(r => vid.addEventListener("timeupdate", r, {once: true})); + assert_equals(vid.played.length, 1, "A MediaStream's timeline always consists of a single range"); + assert_equals(vid.played.start(0), 0, "A MediaStream's timeline always starts at zero"); + assert_equals(vid.played.end(0), vid.currentTime, "A MediaStream's end MUST return the last known currentTime, says mediacapture-main"); + assert_equals(vid.duration, Infinity, "A MediaStream does not have a pre-defined duration. "); + + const time = vid.currentTime; + vid.currentTime = 0; + assert_equals(vid.currentTime, time, "The UA MUST ignore attempts to set the currentTime attribute"); + + await haveLoadedData; + assert_equals(vid.readyState, vid.HAVE_ENOUGH_DATA, "Upon having loaded a media stream, the UA sets readyState to HAVE_ENOUGH_DATA"); + assert_equals(vid.duration, Infinity, "A MediaStream does not have a pre-defined duration."); + + // TODO add test that duration must be set to currentTime + // when mediastream is destroyed +}, "Tests that a MediaStream can be assigned to a video element with srcObject"); </script> </body> </html> diff --git a/tests/wpt/web-platform-tests/permissions/interfaces.any.js b/tests/wpt/web-platform-tests/permissions/interfaces.any.js index 78f1fc65b79..77fa909a768 100644 --- a/tests/wpt/web-platform-tests/permissions/interfaces.any.js +++ b/tests/wpt/web-platform-tests/permissions/interfaces.any.js @@ -22,6 +22,7 @@ promise_test(async () => { try { self.permissionStatus = await navigator.permissions.query({ name: "geolocation" }); + self.permissionStatus = await navigator.permissions.query({ name: "background-fetch"}); } catch (e) { // Will be surfaced in idlharness.js's test_object below. } diff --git a/tests/wpt/web-platform-tests/permissions/test-background-fetch-permission.html b/tests/wpt/web-platform-tests/permissions/test-background-fetch-permission.html new file mode 100644 index 00000000000..c3da77d9f8c --- /dev/null +++ b/tests/wpt/web-platform-tests/permissions/test-background-fetch-permission.html @@ -0,0 +1,15 @@ +<!doctype html> +<meta charset=utf-8> +<title>Test Background Fetch Permission.</title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<div id="log"></div> + +<script> + promise_test(function(test) { + internals.runtimeFlags.backgroundFetchEnabled = true; + return navigator.permissions.query({name:'background-fetch'}).then(function(result) { + assert_true(result instanceof PermissionStatus); + }); + }); +</script> diff --git a/tests/wpt/web-platform-tests/resources/test/README.md b/tests/wpt/web-platform-tests/resources/test/README.md index b756b91797f..185ae5f4efc 100644 --- a/tests/wpt/web-platform-tests/resources/test/README.md +++ b/tests/wpt/web-platform-tests/resources/test/README.md @@ -27,7 +27,7 @@ the correct arguments. ## Authoring Tests Test cases are expressed as `.html` files located within the `tests/unit/` and -`tests/funtional/` sub-directories. Each test should include the +`tests/functional/` sub-directories. Each test should include the `testharness.js` library with the following markup: <script src="/resources/testharness.js"></script> diff --git a/tests/wpt/web-platform-tests/resources/testharness.js b/tests/wpt/web-platform-tests/resources/testharness.js index 0a92cf10a3d..867f88b3bcf 100644 --- a/tests/wpt/web-platform-tests/resources/testharness.js +++ b/tests/wpt/web-platform-tests/resources/testharness.js @@ -754,7 +754,7 @@ policies and contribution forms [3]. } if (tests.file_is_test) { // file is test files never have asynchronous cleanup logic, - // meaning the fully-sycnronous `done` funtion can be used here. + // meaning the fully-sycnronous `done` function can be used here. tests.tests[0].done(); } tests.end_wait(); diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_firefox.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_firefox.txt index bfe0d4bc347..82975e249bf 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_firefox.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_firefox.txt @@ -2,7 +2,7 @@ marionette_driver==2.7.0 mozprofile==2.0.0 mozprocess == 0.26 mozcrash == 1.0 -mozrunner==7.0.2 +mozrunner==7.1.0 mozleak == 0.1 mozinstall==1.16.0 mozdownload==1.24 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/__init__.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/__init__.py index 9fbbec4d585..6c095f5c5a6 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/__init__.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/__init__.py @@ -15,7 +15,7 @@ a dictionary with the fields "executor_kwargs": String naming a function that takes http server url and timeout multiplier and returns kwargs to use when creating the executor class. -"env_options": String naming a funtion of no arguments that returns the +"env_options": String naming a function of no arguments that returns the arguments passed to the TestEnvironment. All classes and functions named in the above dict must be imported into the diff --git a/tests/wpt/web-platform-tests/tools/wptserve/tests/functional/test_handlers.py b/tests/wpt/web-platform-tests/tools/wptserve/tests/functional/test_handlers.py index 7ac410abfee..759a096b799 100644 --- a/tests/wpt/web-platform-tests/tools/wptserve/tests/functional/test_handlers.py +++ b/tests/wpt/web-platform-tests/tools/wptserve/tests/functional/test_handlers.py @@ -88,19 +88,16 @@ class TestFileHandler(TestUsingServer): self.request("/document.txt", headers={"Range":"bytes=%i-%i" % (len(expected), len(expected) + 10)}) self.assertEqual(cm.exception.code, 416) - @pytest.mark.xfail(sys.version_info >= (3,), reason="wptserve only works on Py2") def test_sub_config(self): resp = self.request("/sub.sub.txt") expected = b"localhost localhost %i" % self.server.port assert resp.read().rstrip() == expected - @pytest.mark.xfail(sys.version_info >= (3,), reason="wptserve only works on Py2") def test_sub_headers(self): resp = self.request("/sub_headers.sub.txt", headers={"X-Test": "PASS"}) expected = b"PASS" assert resp.read().rstrip() == expected - @pytest.mark.xfail(sys.version_info >= (3,), reason="wptserve only works on Py2") def test_sub_params(self): resp = self.request("/sub_params.sub.txt", query="test=PASS") expected = b"PASS" diff --git a/tests/wpt/web-platform-tests/tools/wptserve/tests/functional/test_pipes.py b/tests/wpt/web-platform-tests/tools/wptserve/tests/functional/test_pipes.py index 0299ea0e62b..7aa73353386 100644 --- a/tests/wpt/web-platform-tests/tools/wptserve/tests/functional/test_pipes.py +++ b/tests/wpt/web-platform-tests/tools/wptserve/tests/functional/test_pipes.py @@ -178,7 +178,6 @@ class TestPipesWithVariousHandlers(TestUsingServer): self.assertFalse(resp.info().get("X-TEST")) self.assertEqual(resp.read(), b"CONTENT") - @pytest.mark.xfail(sys.version_info >= (3,), reason="wptserve only works on Py2") def test_with_json_handler(self): @wptserve.handlers.json_handler def handler(request, response): @@ -186,7 +185,7 @@ class TestPipesWithVariousHandlers(TestUsingServer): route = ("GET", "/test/test_pipes_2/", handler) self.server.router.register(*route) resp = self.request(route[1], query="pipe=slice(null,2)") - self.assertEqual(resp.read(), '"{') + self.assertEqual(resp.read(), b'"{') def test_slice_with_as_is_handler(self): resp = self.request("/test.asis", query="pipe=slice(null,2)") diff --git a/tests/wpt/web-platform-tests/tools/wptserve/wptserve/pipes.py b/tests/wpt/web-platform-tests/tools/wptserve/wptserve/pipes.py index ad96f591a3a..cded8f6ea02 100644 --- a/tests/wpt/web-platform-tests/tools/wptserve/wptserve/pipes.py +++ b/tests/wpt/web-platform-tests/tools/wptserve/wptserve/pipes.py @@ -273,8 +273,9 @@ def slice(request, response, start, end=None): (spelled "null" in a query string) to indicate the end of the file. """ - content = resolve_content(response) - response.content = content[start:end] + content = resolve_content(response)[start:end] + response.content = content + response.headers.set("Content-Length", len(content)) return response @@ -425,11 +426,12 @@ def template(request, content, escape_type="html"): tokens = deque(tokens) token_type, field = tokens.popleft() - field = field.decode("ascii") + assert isinstance(field, text_type) if token_type == "var": variable = field token_type, field = tokens.popleft() + assert isinstance(field, text_type) else: variable = None diff --git a/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests-noNamesGiven.tentative.html b/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests-noNamesGiven.tentative.html index 49a9506b5a7..2fc8f012256 100644 --- a/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests-noNamesGiven.tentative.html +++ b/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests-noNamesGiven.tentative.html @@ -7,8 +7,9 @@ <script> //No name given test test(t => { - let policy = window.TrustedTypes.createPolicy('SomeName', { createHTML: s => s } ); - assert_equals(policy.name, 'SomeName'); - }, "No name list given - policy creation works"); + assert_throws(new TypeError(), _ => { + window.TrustedTypes.createPolicy('SomeName', { createHTML: s => s } ); + }); + }, "No name list given - policy creation throws"); </script> diff --git a/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests-wildcard.tentative.html b/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests-wildcard.tentative.html new file mode 100644 index 00000000000..7edc64be314 --- /dev/null +++ b/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests-wildcard.tentative.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js" ></script> +<script src="/resources/testharnessreport.js"></script> +<script src="support/helper.sub.js"></script> +<meta http-equiv="Content-Security-Policy" content="trusted-types *"> +<body> +<script> + //No name given test + test(t => { + let policy = window.TrustedTypes.createPolicy('SomeName', { createHTML: s => s } ); + assert_equals(policy.name, 'SomeName'); + }, "Wildcard given - policy creation works"); +</script> + diff --git a/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-isXXX.tentative.html b/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-isXXX.tentative.html index 9b48fa7fede..c03b4b81d03 100644 --- a/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-isXXX.tentative.html +++ b/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-isXXX.tentative.html @@ -3,7 +3,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="support/helper.sub.js"></script> -<meta http-equiv="Content-Security-Policy" content="trusted-types"> +<meta http-equiv="Content-Security-Policy" content="trusted-types *"> <body> <script> // Policy settings for all tests diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-DOMParser-parseFromString.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-DOMParser-parseFromString.tentative.html index 366bdd2ab6d..ec19ebc8db8 100644 --- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-DOMParser-parseFromString.tentative.html +++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-DOMParser-parseFromString.tentative.html @@ -3,7 +3,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="support/helper.sub.js"></script> -<meta http-equiv="Content-Security-Policy" content="trusted-types"> +<meta http-equiv="Content-Security-Policy" content="trusted-types *"> <body> <script> // Trusted HTML assignments do not throw. diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-DOMWindowTimers-setTimeout-setInterval.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-DOMWindowTimers-setTimeout-setInterval.tentative.html index f27678ab364..99e187d45be 100644 --- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-DOMWindowTimers-setTimeout-setInterval.tentative.html +++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-DOMWindowTimers-setTimeout-setInterval.tentative.html @@ -3,7 +3,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="support/helper.sub.js"></script> -<meta http-equiv="Content-Security-Policy" content="trusted-types"> +<meta http-equiv="Content-Security-Policy" content="trusted-types *"> <body> <script> // setTimeout tests diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Document-write.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Document-write.tentative.html index ce530d49bb6..beb31445b47 100644 --- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Document-write.tentative.html +++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Document-write.tentative.html @@ -5,7 +5,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="support/helper.sub.js"></script> - <meta http-equiv="Content-Security-Policy" content="trusted-types"> + <meta http-equiv="Content-Security-Policy" content="trusted-types *"> </head> <body> <script> diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html index 593d6c64a7c..162505a6ae3 100644 --- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html +++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html @@ -5,7 +5,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="support/helper.sub.js"></script> - <meta http-equiv="Content-Security-Policy" content="trusted-types"> + <meta http-equiv="Content-Security-Policy" content="trusted-types *"> </head> <body> <div id="container"></div> diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-outerHTML.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-outerHTML.tentative.html index c9bde5eb6d5..fde0c172f52 100644 --- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-outerHTML.tentative.html +++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-outerHTML.tentative.html @@ -5,7 +5,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="support/helper.sub.js"></script> - <meta http-equiv="Content-Security-Policy" content="trusted-types"> + <meta http-equiv="Content-Security-Policy" content="trusted-types *"> </head> <body> <div id="container"></div> diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-setAttribute.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-setAttribute.tentative.html index 3553f2b0768..26aaa5123e7 100644 --- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-setAttribute.tentative.html +++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-setAttribute.tentative.html @@ -5,7 +5,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="support/helper.sub.js"></script> - <meta http-equiv="Content-Security-Policy" content="trusted-types"> + <meta http-equiv="Content-Security-Policy" content="trusted-types *"> </head> <body> <script> diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-setAttributeNS.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-setAttributeNS.tentative.html index 5a72992100c..3ad27e219e9 100644 --- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-setAttributeNS.tentative.html +++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-setAttributeNS.tentative.html @@ -5,7 +5,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="support/helper.sub.js"></script> - <meta http-equiv="Content-Security-Policy" content="trusted-types"> + <meta http-equiv="Content-Security-Policy" content="trusted-types *"> </head> <body> <script> diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html index f31fce629bc..ceac828d7bd 100644 --- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html +++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html @@ -5,7 +5,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="support/helper.sub.js"></script> - <meta http-equiv="Content-Security-Policy" content="trusted-types"> + <meta http-equiv="Content-Security-Policy" content="trusted-types *"> </head> <body> <script> diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-assign.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-assign.tentative.html index 5de5fecda0b..c0817d669a1 100644 --- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-assign.tentative.html +++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-assign.tentative.html @@ -5,7 +5,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="support/helper.sub.js"></script> - <meta http-equiv="Content-Security-Policy" content="trusted-types"> + <meta http-equiv="Content-Security-Policy" content="trusted-types *"> </head> <body> <script> diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-href.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-href.tentative.html index 24312617892..2a29e1e233e 100644 --- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-href.tentative.html +++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-href.tentative.html @@ -5,7 +5,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="support/helper.sub.js"></script> - <meta http-equiv="Content-Security-Policy" content="trusted-types"> + <meta http-equiv="Content-Security-Policy" content="trusted-types *"> </head> <body> <script> diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-replace.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-replace.tentative.html index 40752157059..8e534bf8382 100644 --- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-replace.tentative.html +++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-replace.tentative.html @@ -5,7 +5,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="support/helper.sub.js"></script> - <meta http-equiv="Content-Security-Policy" content="trusted-types"> + <meta http-equiv="Content-Security-Policy" content="trusted-types *"> </head> <body> <script> diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Range-createContextualFragment.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Range-createContextualFragment.tentative.html index 1cae5c74e96..f44266a3074 100644 --- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Range-createContextualFragment.tentative.html +++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Range-createContextualFragment.tentative.html @@ -3,7 +3,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="support/helper.sub.js"></script> -<meta http-equiv="Content-Security-Policy" content="trusted-types"> +<meta http-equiv="Content-Security-Policy" content="trusted-types *"> <body> <script> // TrustedHTML assignments do not throw. diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Window-open.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Window-open.tentative.html index 8070b4a4896..7b917dbf642 100644 --- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Window-open.tentative.html +++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Window-open.tentative.html @@ -5,7 +5,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="support/helper.sub.js"></script> - <meta http-equiv="Content-Security-Policy" content="trusted-types"> + <meta http-equiv="Content-Security-Policy" content="trusted-types *"> </head> <body> <script> diff --git a/tests/wpt/web-platform-tests/webdriver/tests/add_cookie/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/add_cookie/user_prompts.py new file mode 100644 index 00000000000..f58aacd02a7 --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/tests/add_cookie/user_prompts.py @@ -0,0 +1,137 @@ +# META: timeout=long + +import pytest + +from webdriver.error import NoSuchCookieException + +from tests.support.asserts import assert_dialog_handled, assert_error, assert_success + + +def add_cookie(session, cookie): + return session.transport.send( + "POST", "session/{session_id}/cookie".format(**vars(session)), + {"cookie": cookie}) + + +@pytest.fixture +def check_user_prompt_closed_without_exception(session, url, create_dialog): + def check_user_prompt_closed_without_exception(dialog_type, retval): + new_cookie = { + "name": "foo", + "value": "bar", + } + + session.url = url("/common/blank.html") + + create_dialog(dialog_type, text=dialog_type) + + response = add_cookie(session, new_cookie) + assert_success(response) + + assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval) + + assert session.cookies("foo") + + return check_user_prompt_closed_without_exception + + +@pytest.fixture +def check_user_prompt_closed_with_exception(session, url, create_dialog): + def check_user_prompt_closed_with_exception(dialog_type, retval): + new_cookie = { + "name": "foo", + "value": "bar", + } + + session.url = url("/common/blank.html") + + create_dialog(dialog_type, text=dialog_type) + + response = add_cookie(session, new_cookie) + assert_error(response, "unexpected alert open") + + assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval) + + with pytest.raises(NoSuchCookieException): + assert session.cookies("foo") + + return check_user_prompt_closed_with_exception + + +@pytest.fixture +def check_user_prompt_not_closed_but_exception(session, url, create_dialog): + def check_user_prompt_not_closed_but_exception(dialog_type): + new_cookie = { + "name": "foo", + "value": "bar", + } + + session.url = url("/common/blank.html") + + create_dialog(dialog_type, text=dialog_type) + + response = add_cookie(session, new_cookie) + assert_error(response, "unexpected alert open") + + assert session.alert.text == dialog_type + session.alert.dismiss() + + with pytest.raises(NoSuchCookieException): + assert session.cookies("foo") + + return check_user_prompt_not_closed_but_exception + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", True), + ("prompt", ""), +]) +def test_accept(check_user_prompt_closed_without_exception, dialog_type, retval): + check_user_prompt_closed_without_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept and notify"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", True), + ("prompt", ""), +]) +def test_accept_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_dismiss(check_user_prompt_closed_without_exception, dialog_type, retval): + check_user_prompt_closed_without_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss and notify"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_dismiss_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "ignore"}) +@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) +def test_ignore(check_user_prompt_not_closed_but_exception, dialog_type): + check_user_prompt_not_closed_but_exception(dialog_type) + + +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_default(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/delete_all_cookies/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/delete_all_cookies/user_prompts.py new file mode 100644 index 00000000000..dca4f3c8bf6 --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/tests/delete_all_cookies/user_prompts.py @@ -0,0 +1,119 @@ +# META: timeout=long + +import pytest + +from webdriver.error import NoSuchCookieException + +from tests.support.asserts import assert_dialog_handled, assert_error, assert_success + + +def delete_all_cookies(session): + return session.transport.send( + "DELETE", "/session/{session_id}/cookie".format(**vars(session))) + + +@pytest.fixture +def check_user_prompt_closed_without_exception(session, create_dialog, create_cookie): + def check_user_prompt_closed_without_exception(dialog_type, retval): + create_cookie("foo", value="bar", path="/common/blank.html") + + create_dialog(dialog_type, text=dialog_type) + + response = delete_all_cookies(session) + assert_success(response) + + assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval) + + assert session.cookies() == [] + + return check_user_prompt_closed_without_exception + + +@pytest.fixture +def check_user_prompt_closed_with_exception(session, create_dialog, create_cookie): + def check_user_prompt_closed_with_exception(dialog_type, retval): + create_cookie("foo", value="bar", path="/common/blank.html") + + create_dialog(dialog_type, text=dialog_type) + + response = delete_all_cookies(session) + assert_error(response, "unexpected alert open") + + assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval) + + assert session.cookies() != [] + + return check_user_prompt_closed_with_exception + + +@pytest.fixture +def check_user_prompt_not_closed_but_exception(session, create_dialog, create_cookie): + def check_user_prompt_not_closed_but_exception(dialog_type): + create_cookie("foo", value="bar", path="/common/blank.html") + + create_dialog(dialog_type, text=dialog_type) + + response = delete_all_cookies(session) + assert_error(response, "unexpected alert open") + + assert session.alert.text == dialog_type + session.alert.dismiss() + + assert session.cookies() != [] + + return check_user_prompt_not_closed_but_exception + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", True), + ("prompt", ""), +]) +def test_accept(check_user_prompt_closed_without_exception, dialog_type, retval): + check_user_prompt_closed_without_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept and notify"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", True), + ("prompt", ""), +]) +def test_accept_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_dismiss(check_user_prompt_closed_without_exception, dialog_type, retval): + check_user_prompt_closed_without_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss and notify"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_dismiss_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "ignore"}) +@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) +def test_ignore(check_user_prompt_not_closed_but_exception, dialog_type): + check_user_prompt_not_closed_but_exception(dialog_type) + + +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_default(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_clear/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/element_clear/user_prompts.py new file mode 100644 index 00000000000..cfb850e08d5 --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/tests/element_clear/user_prompts.py @@ -0,0 +1,132 @@ +# META: timeout=long + +import pytest + +from tests.support.asserts import assert_dialog_handled, assert_error, assert_success +from tests.support.inline import inline + + +def element_clear(session, element): + return session.transport.send( + "POST", "/session/{session_id}/element/{element_id}/clear".format( + session_id=session.session_id, + element_id=element.id)) + + +@pytest.fixture +def check_user_prompt_closed_without_exception(session, create_dialog): + def check_user_prompt_closed_without_exception(dialog_type, retval): + session.url = inline("<input type=text>") + element = session.find.css("input", all=False) + element.send_keys("foo") + + assert element.property("value") == "foo" + + create_dialog(dialog_type, text=dialog_type) + + response = element_clear(session, element) + assert_success(response) + + assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval) + + assert element.property("value") == "" + + return check_user_prompt_closed_without_exception + + +@pytest.fixture +def check_user_prompt_closed_with_exception(session, create_dialog): + def check_user_prompt_closed_with_exception(dialog_type, retval): + session.url = inline("<input type=text>") + element = session.find.css("input", all=False) + element.send_keys("foo") + + assert element.property("value") == "foo" + + create_dialog(dialog_type, text=dialog_type) + + response = element_clear(session, element) + assert_error(response, "unexpected alert open") + + assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval) + + assert element.property("value") == "foo" + + return check_user_prompt_closed_with_exception + + +@pytest.fixture +def check_user_prompt_not_closed_but_exception(session, create_dialog): + def check_user_prompt_not_closed_but_exception(dialog_type): + session.url = inline("<input type=text>") + element = session.find.css("input", all=False) + element.send_keys("foo") + + assert element.property("value") == "foo" + + create_dialog(dialog_type, text=dialog_type) + + response = element_clear(session, element) + assert_error(response, "unexpected alert open") + + assert session.alert.text == dialog_type + session.alert.dismiss() + + assert element.property("value") == "foo" + + return check_user_prompt_not_closed_but_exception + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", True), + ("prompt", ""), +]) +def test_accept(check_user_prompt_closed_without_exception, dialog_type, retval): + check_user_prompt_closed_without_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept and notify"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", True), + ("prompt", ""), +]) +def test_accept_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_dismiss(check_user_prompt_closed_without_exception, dialog_type, retval): + check_user_prompt_closed_without_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss and notify"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_dismiss_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "ignore"}) +@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) +def test_ignore(check_user_prompt_not_closed_but_exception, dialog_type): + check_user_prompt_not_closed_but_exception(dialog_type) + + +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_default(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_click/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/element_click/user_prompts.py new file mode 100644 index 00000000000..b3706fe4af1 --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/tests/element_click/user_prompts.py @@ -0,0 +1,123 @@ +# META: timeout=long + +import pytest + +from tests.support.asserts import assert_dialog_handled, assert_error, assert_success +from tests.support.inline import inline + + +def element_click(session, element): + return session.transport.send( + "POST", "session/{session_id}/element/{element_id}/click".format( + session_id=session.session_id, + element_id=element.id)) + + +@pytest.fixture +def check_user_prompt_closed_without_exception(session, create_dialog): + def check_user_prompt_closed_without_exception(dialog_type, retval): + session.url = inline("<input type=text>") + element = session.find.css("input", all=False) + + create_dialog(dialog_type, text=dialog_type) + + response = element_click(session, element) + assert_success(response) + + assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval) + + assert session.active_element == element + + return check_user_prompt_closed_without_exception + + +@pytest.fixture +def check_user_prompt_closed_with_exception(session, create_dialog): + def check_user_prompt_closed_with_exception(dialog_type, retval): + session.url = inline("<input type=text>") + element = session.find.css("input", all=False) + + create_dialog(dialog_type, text=dialog_type) + + response = element_click(session, element) + assert_error(response, "unexpected alert open") + + assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval) + + assert session.active_element != element + + return check_user_prompt_closed_with_exception + + +@pytest.fixture +def check_user_prompt_not_closed_but_exception(session, create_dialog): + def check_user_prompt_not_closed_but_exception(dialog_type): + session.url = inline("<input type=text>") + element = session.find.css("input", all=False) + + create_dialog(dialog_type, text=dialog_type) + + response = element_click(session, element) + assert_error(response, "unexpected alert open") + + assert session.alert.text == dialog_type + session.alert.dismiss() + + assert session.active_element != element + + return check_user_prompt_not_closed_but_exception + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", True), + ("prompt", ""), +]) +def test_accept(check_user_prompt_closed_without_exception, dialog_type, retval): + check_user_prompt_closed_without_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept and notify"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", True), + ("prompt", ""), +]) +def test_accept_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_dismiss(check_user_prompt_closed_without_exception, dialog_type, retval): + check_user_prompt_closed_without_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss and notify"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_dismiss_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "ignore"}) +@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) +def test_ignore(check_user_prompt_not_closed_but_exception, dialog_type): + check_user_prompt_not_closed_but_exception(dialog_type) + + +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_default(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_active_element/get.py b/tests/wpt/web-platform-tests/webdriver/tests/get_active_element/get.py index ac4f14d37c0..1fea56a0d7a 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_active_element/get.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/get_active_element/get.py @@ -1,4 +1,4 @@ -from tests.support.asserts import assert_error, assert_same_element +from tests.support.asserts import assert_error, assert_is_active_element, assert_success from tests.support.inline import inline @@ -11,37 +11,12 @@ def get_active_element(session): "GET", "session/{session_id}/element/active".format(**vars(session))) -def assert_is_active_element(session, response): - """Ensure that the provided object is a successful WebDriver - response describing an element reference and that the referenced - element matches the element returned by the `activeElement` - attribute of the current browsing context's active document. - - """ - assert response.status == 200 - assert "value" in response.body - - from_js = session.execute_script("return document.activeElement") - - if response.body["value"] is None: - assert from_js is None - else: - assert_same_element(session, response.body["value"], from_js) - - def test_no_browsing_context(session, closed_window): response = get_active_element(session) assert_error(response, "no such window") def test_success_document(session): - """ - > [...] - > 3. Let active element be the active element of the current browsing - > context's document element. - > 4. Let active web element be the JSON Serialization of active element. - > 5. Return success with data active web element. - """ session.url = inline(""" <body> <h1>Heading</h1> @@ -50,8 +25,10 @@ def test_success_document(session): <input style="opacity: 0" /> <p>Another element</p> </body>""") + response = get_active_element(session) - assert_is_active_element(session, response) + element = assert_success(response) + assert_is_active_element(session, element) def test_sucess_input(session): @@ -62,8 +39,10 @@ def test_sucess_input(session): <input style="opacity: 0" /> <p>Another element</p> </body>""") + response = get_active_element(session) - assert_is_active_element(session, response) + element = assert_success(response) + assert_is_active_element(session, element) def test_sucess_input_non_interactable(session): @@ -74,8 +53,10 @@ def test_sucess_input_non_interactable(session): <input style="opacity: 0" autofocus /> <p>Another element</p> </body>""") + response = get_active_element(session) - assert_is_active_element(session, response) + element = assert_success(response) + assert_is_active_element(session, element) def test_success_explicit_focus(session): @@ -88,15 +69,18 @@ def test_success_explicit_focus(session): session.execute_script("document.body.getElementsByTagName('h1')[0].focus()") response = get_active_element(session) - assert_is_active_element(session, response) + element = assert_success(response) + assert_is_active_element(session, element) session.execute_script("document.body.getElementsByTagName('input')[0].focus()") response = get_active_element(session) - assert_is_active_element(session, response) + element = assert_success(response) + assert_is_active_element(session, element) session.execute_script("document.body.getElementsByTagName('iframe')[0].focus()") response = get_active_element(session) - assert_is_active_element(session, response) + element = assert_success(response) + assert_is_active_element(session, element) session.execute_script("document.body.getElementsByTagName('iframe')[0].focus();") session.execute_script(""" @@ -107,11 +91,13 @@ def test_success_explicit_focus(session): iframe.removeNode(true); }""") response = get_active_element(session) - assert_is_active_element(session, response) + element = assert_success(response) + assert_is_active_element(session, element) session.execute_script("document.body.appendChild(document.createElement('textarea'))") response = get_active_element(session) - assert_is_active_element(session, response) + element = assert_success(response) + assert_is_active_element(session, element) def test_success_iframe_content(session): @@ -125,7 +111,8 @@ def test_success_iframe_content(session): """) response = get_active_element(session) - assert_is_active_element(session, response) + element = assert_success(response) + assert_is_active_element(session, element) def test_missing_document_element(session): diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_active_element/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/get_active_element/user_prompts.py new file mode 100644 index 00000000000..7fa7be1dde9 --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/tests/get_active_element/user_prompts.py @@ -0,0 +1,119 @@ +# META: timeout=long + +import pytest + +from tests.support.asserts import ( + assert_dialog_handled, + assert_error, + assert_is_active_element, + assert_success +) +from tests.support.inline import inline + + +def get_active_element(session): + return session.transport.send( + "GET", "session/{session_id}/element/active".format(**vars(session))) + + +@pytest.fixture +def check_user_prompt_closed_without_exception(session, create_dialog): + def check_user_prompt_closed_without_exception(dialog_type, retval): + session.url = inline("<input type=text>") + + create_dialog(dialog_type, text=dialog_type) + + response = get_active_element(session) + element = assert_success(response) + + assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval) + + assert_is_active_element(session, element) + + return check_user_prompt_closed_without_exception + + +@pytest.fixture +def check_user_prompt_closed_with_exception(session, create_dialog): + def check_user_prompt_closed_with_exception(dialog_type, retval): + session.url = inline("<input type=text>") + + create_dialog(dialog_type, text=dialog_type) + + response = get_active_element(session) + assert_error(response, "unexpected alert open") + + assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval) + + return check_user_prompt_closed_with_exception + + +@pytest.fixture +def check_user_prompt_not_closed_but_exception(session, create_dialog): + def check_user_prompt_not_closed_but_exception(dialog_type): + session.url = inline("<input type=text>") + + create_dialog(dialog_type, text=dialog_type) + + response = get_active_element(session) + assert_error(response, "unexpected alert open") + + assert session.alert.text == dialog_type + session.alert.dismiss() + + return check_user_prompt_not_closed_but_exception + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", True), + ("prompt", ""), +]) +def test_accept(check_user_prompt_closed_without_exception, dialog_type, retval): + check_user_prompt_closed_without_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept and notify"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", True), + ("prompt", ""), +]) +def test_accept_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_dismiss(check_user_prompt_closed_without_exception, dialog_type, retval): + check_user_prompt_closed_without_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss and notify"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_dismiss_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "ignore"}) +@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) +def test_ignore(check_user_prompt_not_closed_but_exception, dialog_type): + check_user_prompt_not_closed_but_exception(dialog_type) + + +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_default(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_attribute/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/get_element_attribute/user_prompts.py new file mode 100644 index 00000000000..5ee7929afdf --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/tests/get_element_attribute/user_prompts.py @@ -0,0 +1,118 @@ +# META: timeout=long + +import pytest + +from tests.support.asserts import assert_error, assert_success, assert_dialog_handled +from tests.support.inline import inline + + +def get_element_attribute(session, element, attr): + return session.transport.send( + "GET", "session/{session_id}/element/{element_id}/attribute/{attr}".format( + session_id=session.session_id, + element_id=element, + attr=attr)) + + +@pytest.fixture +def check_user_prompt_closed_without_exception(session, create_dialog): + def check_user_prompt_closed_without_exception(dialog_type, retval): + session.url = inline("<input id=foo>") + element = session.find.css("#foo", all=False) + + create_dialog(dialog_type, text=dialog_type) + + response = get_element_attribute(session, element.id, "id") + assert_success(response, "foo") + + assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval) + + return check_user_prompt_closed_without_exception + + +@pytest.fixture +def check_user_prompt_closed_with_exception(session, create_dialog): + def check_user_prompt_closed_with_exception(dialog_type, retval): + session.url = inline("<input id=foo>") + element = session.find.css("#foo", all=False) + + create_dialog(dialog_type, text=dialog_type) + + response = get_element_attribute(session, element.id, "id") + assert_error(response, "unexpected alert open") + + assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval) + + return check_user_prompt_closed_with_exception + + +@pytest.fixture +def check_user_prompt_not_closed_but_exception(session, create_dialog): + def check_user_prompt_not_closed_but_exception(dialog_type): + session.url = inline("<input id=foo>") + element = session.find.css("#foo", all=False) + + create_dialog(dialog_type, text=dialog_type) + + response = get_element_attribute(session, element.id, "id") + assert_error(response, "unexpected alert open") + + assert session.alert.text == dialog_type + session.alert.dismiss() + + return check_user_prompt_not_closed_but_exception + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", True), + ("prompt", ""), +]) +def test_accept(check_user_prompt_closed_without_exception, dialog_type, retval): + check_user_prompt_closed_without_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept and notify"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", True), + ("prompt", ""), +]) +def test_accept_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_dismiss(check_user_prompt_closed_without_exception, dialog_type, retval): + check_user_prompt_closed_without_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss and notify"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_dismiss_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "ignore"}) +@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) +def test_ignore(check_user_prompt_not_closed_but_exception, dialog_type): + check_user_prompt_not_closed_but_exception(dialog_type) + + +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_default(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_text/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/get_element_text/user_prompts.py new file mode 100644 index 00000000000..1ee5cde4da5 --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/tests/get_element_text/user_prompts.py @@ -0,0 +1,117 @@ +# META: timeout=long + +import pytest + +from tests.support.asserts import assert_error, assert_success, assert_dialog_handled +from tests.support.inline import inline + + +def get_element_text(session, element_id): + return session.transport.send( + "GET", "session/{session_id}/element/{element_id}/text".format( + session_id=session.session_id, + element_id=element_id)) + + +@pytest.fixture +def check_user_prompt_closed_without_exception(session, create_dialog): + def check_user_prompt_closed_without_exception(dialog_type, retval): + session.url = inline("<p id=foo>bar</p>") + element = session.find.css("#foo", all=False) + + create_dialog(dialog_type, text=dialog_type) + + response = get_element_text(session, element.id) + assert_success(response, "bar") + + assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval) + + return check_user_prompt_closed_without_exception + + +@pytest.fixture +def check_user_prompt_closed_with_exception(session, create_dialog): + def check_user_prompt_closed_with_exception(dialog_type, retval): + session.url = inline("<p id=foo>bar</p>") + element = session.find.css("#foo", all=False) + + create_dialog(dialog_type, text=dialog_type) + + response = get_element_text(session, element.id) + assert_error(response, "unexpected alert open") + + assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval) + + return check_user_prompt_closed_with_exception + + +@pytest.fixture +def check_user_prompt_not_closed_but_exception(session, create_dialog): + def check_user_prompt_not_closed_but_exception(dialog_type): + session.url = inline("<p id=foo>bar</p>") + element = session.find.css("#foo", all=False) + + create_dialog(dialog_type, text=dialog_type) + + response = get_element_text(session, element.id) + assert_error(response, "unexpected alert open") + + assert session.alert.text == dialog_type + session.alert.dismiss() + + return check_user_prompt_not_closed_but_exception + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", True), + ("prompt", ""), +]) +def test_accept(check_user_prompt_closed_without_exception, dialog_type, retval): + check_user_prompt_closed_without_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept and notify"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", True), + ("prompt", ""), +]) +def test_accept_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_dismiss(check_user_prompt_closed_without_exception, dialog_type, retval): + check_user_prompt_closed_without_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss and notify"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_dismiss_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "ignore"}) +@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) +def test_ignore(check_user_prompt_not_closed_but_exception, dialog_type): + check_user_prompt_not_closed_but_exception(dialog_type) + + +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_default(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_named_cookie/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/get_named_cookie/user_prompts.py new file mode 100644 index 00000000000..3ef52a58a41 --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/tests/get_named_cookie/user_prompts.py @@ -0,0 +1,118 @@ +# META: timeout=long + +import pytest + +from webdriver.error import NoSuchCookieException + +from tests.support.asserts import assert_dialog_handled, assert_error, assert_success + + +def get_named_cookie(session, name): + return session.transport.send( + "GET", "session/{session_id}/cookie/{name}".format( + session_id=session.session_id, + name=name)) + + +@pytest.fixture +def check_user_prompt_closed_without_exception(session, create_dialog, create_cookie): + def check_user_prompt_closed_without_exception(dialog_type, retval): + create_cookie("foo", value="bar", path="/common/blank.html") + + create_dialog(dialog_type, text=dialog_type) + + response = get_named_cookie(session, "foo") + cookie = assert_success(response) + + assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval) + + assert cookie["name"] == "foo" + assert cookie["value"] == "bar" + + return check_user_prompt_closed_without_exception + + +@pytest.fixture +def check_user_prompt_closed_with_exception(session, create_dialog, create_cookie): + def check_user_prompt_closed_with_exception(dialog_type, retval): + create_cookie("foo", value="bar", path="/common/blank.html") + + create_dialog(dialog_type, text=dialog_type) + + response = get_named_cookie(session, "foo") + assert_error(response, "unexpected alert open") + + assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval) + + return check_user_prompt_closed_with_exception + + +@pytest.fixture +def check_user_prompt_not_closed_but_exception(session, create_dialog, create_cookie): + def check_user_prompt_not_closed_but_exception(dialog_type): + create_cookie("foo", value="bar", path="/common/blank.html") + + create_dialog(dialog_type, text=dialog_type) + + response = get_named_cookie(session, "foo") + assert_error(response, "unexpected alert open") + + assert session.alert.text == dialog_type + session.alert.dismiss() + + return check_user_prompt_not_closed_but_exception + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", True), + ("prompt", ""), +]) +def test_accept(check_user_prompt_closed_without_exception, dialog_type, retval): + check_user_prompt_closed_without_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept and notify"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", True), + ("prompt", ""), +]) +def test_accept_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_dismiss(check_user_prompt_closed_without_exception, dialog_type, retval): + check_user_prompt_closed_without_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss and notify"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_dismiss_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "ignore"}) +@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) +def test_ignore(check_user_prompt_not_closed_but_exception, dialog_type): + check_user_prompt_not_closed_but_exception(dialog_type) + + +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_default(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/page_source/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/get_page_source/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/page_source/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/get_page_source/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/page_source/source.py b/tests/wpt/web-platform-tests/webdriver/tests/get_page_source/source.py index 0deb1b46488..0deb1b46488 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/page_source/source.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/get_page_source/source.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_page_source/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/get_page_source/user_prompts.py new file mode 100644 index 00000000000..3b0cdff97dd --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/tests/get_page_source/user_prompts.py @@ -0,0 +1,113 @@ +# META: timeout=long + +import pytest + +from tests.support.asserts import assert_error, assert_success, assert_dialog_handled +from tests.support.inline import inline + + +def get_page_source(session): + return session.transport.send( + "GET", "session/{session_id}/source".format(**vars(session))) + + +@pytest.fixture +def check_user_prompt_closed_without_exception(session, create_dialog): + def check_user_prompt_closed_without_exception(dialog_type, retval): + session.url = inline("<div/>") + expected = session.execute_script("return document.documentElement.outerHTML") + + create_dialog(dialog_type, text=dialog_type) + + response = get_page_source(session) + assert_success(response, expected) + + assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval) + + return check_user_prompt_closed_without_exception + + +@pytest.fixture +def check_user_prompt_closed_with_exception(session, create_dialog): + def check_user_prompt_closed_with_exception(dialog_type, retval): + session.url = inline("<div/>") + + create_dialog(dialog_type, text=dialog_type) + + response = get_page_source(session) + assert_error(response, "unexpected alert open") + + assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval) + + return check_user_prompt_closed_with_exception + + +@pytest.fixture +def check_user_prompt_not_closed_but_exception(session, create_dialog): + def check_user_prompt_not_closed_but_exception(dialog_type): + session.url = inline("<div/>") + + create_dialog(dialog_type, text=dialog_type) + + response = get_page_source(session) + assert_error(response, "unexpected alert open") + + assert session.alert.text == dialog_type + session.alert.dismiss() + + return check_user_prompt_not_closed_but_exception + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", True), + ("prompt", ""), +]) +def test_accept(check_user_prompt_closed_without_exception, dialog_type, retval): + check_user_prompt_closed_without_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept and notify"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", True), + ("prompt", ""), +]) +def test_accept_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_dismiss(check_user_prompt_closed_without_exception, dialog_type, retval): + check_user_prompt_closed_without_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss and notify"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_dismiss_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "ignore"}) +@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) +def test_ignore(check_user_prompt_not_closed_but_exception, dialog_type): + check_user_prompt_not_closed_but_exception(dialog_type) + + +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_default(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/navigate_to/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/navigate_to/user_prompts.py new file mode 100644 index 00000000000..6a94c11bf1d --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/tests/navigate_to/user_prompts.py @@ -0,0 +1,113 @@ +# META: timeout=long + +import pytest + +from tests.support.asserts import assert_error, assert_success, assert_dialog_handled +from tests.support.inline import inline + + +def navigate_to(session, url): + return session.transport.send( + "POST", "session/{session_id}/url".format(**vars(session)), + {"url": url}) + + +@pytest.fixture +def check_user_prompt_closed_without_exception(session, create_dialog): + def check_user_prompt_closed_without_exception(dialog_type, retval): + url = inline("<div/>") + + create_dialog(dialog_type, text=dialog_type) + + response = navigate_to(session, url) + assert_success(response) + + assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval) + + assert session.url == url + + return check_user_prompt_closed_without_exception + + +@pytest.fixture +def check_user_prompt_closed_with_exception(session, create_dialog): + def check_user_prompt_closed_with_exception(dialog_type, retval): + url = inline("<div/>") + + create_dialog(dialog_type, text=dialog_type) + + response = navigate_to(session, url) + assert_error(response, "unexpected alert open") + + assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval) + + assert session.url != url + + return check_user_prompt_closed_with_exception + + +@pytest.fixture +def check_user_prompt_not_closed_but_exception(session, create_dialog): + def check_user_prompt_not_closed_but_exception(dialog_type): + url = inline("<div/>") + + create_dialog(dialog_type, text=dialog_type) + + response = navigate_to(session, url) + assert_error(response, "unexpected alert open") + + assert session.alert.text == dialog_type + session.alert.dismiss() + + assert session.url != url + + return check_user_prompt_not_closed_but_exception + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept"}) +@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) +def test_accept(check_user_prompt_closed_without_exception, dialog_type): + # retval not testable for confirm and prompt because window is gone + check_user_prompt_closed_without_exception(dialog_type, None) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept and notify"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", True), + ("prompt", ""), +]) +def test_accept_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss"}) +@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) +def test_dismiss(check_user_prompt_closed_without_exception, dialog_type): + # retval not testable for confirm and prompt because window is gone + check_user_prompt_closed_without_exception(dialog_type, None) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss and notify"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_dismiss_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "ignore"}) +@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) +def test_ignore(check_user_prompt_not_closed_but_exception, dialog_type): + check_user_prompt_not_closed_but_exception(dialog_type) + + +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_default(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/user_prompts.py new file mode 100644 index 00000000000..6bbd22a2a29 --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/user_prompts.py @@ -0,0 +1,124 @@ +# META: timeout=long + +import pytest + +from tests.perform_actions.support.refine import get_keys +from tests.support.asserts import assert_error, assert_success, assert_dialog_handled + + +actions = [{ + "type": "key", + "id": "foobar", + "actions": [ + {"type": "keyDown", "value": "a"}, + {"type": "keyUp", "value": "a"}, + ] +}] + + +def perform_actions(session, actions): + return session.transport.send( + "POST", + "/session/{session_id}/actions".format(session_id=session.session_id), + {"actions": actions}) + + +@pytest.fixture +def check_user_prompt_closed_without_exception(session, create_dialog, key_chain, key_reporter): + def check_user_prompt_closed_without_exception(dialog_type, retval): + create_dialog(dialog_type, text=dialog_type) + + response = perform_actions(session, actions) + assert_success(response) + + assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval) + + assert get_keys(key_reporter) == "a" + + return check_user_prompt_closed_without_exception + + +@pytest.fixture +def check_user_prompt_closed_with_exception(session, create_dialog, key_chain, key_reporter): + def check_user_prompt_closed_with_exception(dialog_type, retval): + create_dialog(dialog_type, text=dialog_type) + + response = perform_actions(session, actions) + assert_error(response, "unexpected alert open") + + assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval) + + assert get_keys(key_reporter) == "" + + return check_user_prompt_closed_with_exception + + +@pytest.fixture +def check_user_prompt_not_closed_but_exception(session, create_dialog, key_reporter): + def check_user_prompt_not_closed_but_exception(dialog_type): + create_dialog(dialog_type, text=dialog_type) + + response = perform_actions(session, actions) + assert_error(response, "unexpected alert open") + + assert session.alert.text == dialog_type + session.alert.dismiss() + + assert get_keys(key_reporter) == "" + + return check_user_prompt_not_closed_but_exception + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", True), + ("prompt", ""), +]) +def test_accept(check_user_prompt_closed_without_exception, dialog_type, retval): + check_user_prompt_closed_without_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept and notify"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", True), + ("prompt", ""), +]) +def test_accept_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_dismiss(check_user_prompt_closed_without_exception, dialog_type, retval): + check_user_prompt_closed_without_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss and notify"}) +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_dismiss_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "ignore"}) +@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) +def test_ignore(check_user_prompt_not_closed_but_exception, dialog_type): + check_user_prompt_not_closed_but_exception(dialog_type) + + +@pytest.mark.parametrize("dialog_type, retval", [ + ("alert", None), + ("confirm", False), + ("prompt", None), +]) +def test_default(check_user_prompt_closed_with_exception, dialog_type, retval): + check_user_prompt_closed_with_exception(dialog_type, retval) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/support/asserts.py b/tests/wpt/web-platform-tests/webdriver/tests/support/asserts.py index 2d305a0f3be..cdf313bc04b 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/support/asserts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/support/asserts.py @@ -115,6 +115,16 @@ def assert_files_uploaded(session, element, files): assert get_file_contents(index) == f.read() +def assert_is_active_element(session, element): + """Verify that element reference is the active element.""" + from_js = session.execute_script("return document.activeElement") + + if element is None: + assert from_js is None + else: + assert_same_element(session, element, from_js) + + def assert_same_element(session, a, b): """Verify that two element references describe the same element.""" if isinstance(a, dict): diff --git a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-helper.js b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-helper.js index 27ff1873790..b13e580998e 100644 --- a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-helper.js +++ b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-helper.js @@ -463,11 +463,13 @@ function getUserMediaTracksAndStreams(count, type = 'audio') { }); } +// Performs an offer exchange caller -> callee. async function exchangeOffer(caller, callee) { const offer = await caller.createOffer(); await caller.setLocalDescription(offer); return callee.setRemoteDescription(offer); } +// Performs an answer exchange caller -> callee. async function exchangeAnswer(caller, callee) { const answer = await callee.createAnswer(); await callee.setLocalDescription(answer); @@ -477,7 +479,18 @@ async function exchangeOfferAnswer(caller, callee) { await exchangeOffer(caller, callee); return exchangeAnswer(caller, callee); } - +// The returned promise is resolved with caller's ontrack event. +async function exchangeAnswerAndListenToOntrack(t, caller, callee) { + const ontrackPromise = addEventListenerPromise(t, caller, 'track'); + await exchangeAnswer(caller, callee); + return ontrackPromise; +} +// The returned promise is resolved with callee's ontrack event. +async function exchangeOfferAndListenToOntrack(t, caller, callee) { + const ontrackPromise = addEventListenerPromise(t, callee, 'track'); + await exchangeOffer(caller, callee); + return ontrackPromise; +} // The resolver has a |promise| that can be resolved or rejected using |resolve| // or |reject|. @@ -503,3 +516,27 @@ function addEventListenerPromise(t, target, type, listener) { })); }); } + +function createPeerConnectionWithCleanup(t) { + const pc = new RTCPeerConnection(); + t.add_cleanup(() => pc.close()); + return pc; +} + +async function createTrackAndStreamWithCleanup(t, kind = 'audio') { + let constraints = {}; + constraints[kind] = true; + const stream = await navigator.mediaDevices.getUserMedia(constraints); + const [track] = stream.getTracks(); + t.add_cleanup(() => track.stop()); + return [track, stream]; +} + +function findTransceiverForSender(pc, sender) { + const transceivers = pc.getTransceivers(); + for (let i = 0; i < transceivers.length; ++i) { + if (transceivers[i].sender == sender) + return transceivers[i]; + } + return null; +} diff --git a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-remote-track-mute.https.html b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-remote-track-mute.https.html new file mode 100644 index 00000000000..56fe7614250 --- /dev/null +++ b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-remote-track-mute.https.html @@ -0,0 +1,98 @@ +<!doctype html> +<meta charset=utf-8> +<title>RTCPeerConnection-transceivers.https.html</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="RTCPeerConnection-helper.js"></script> +<script> +'use strict'; + +// The following helper functions are called from RTCPeerConnection-helper.js: +// exchangeOffer +// exchangeOfferAndListenToOntrack +// exchangeAnswer +// exchangeAnswerAndListenToOntrack +// addEventListenerPromise +// createPeerConnectionWithCleanup +// createTrackAndStreamWithCleanup +// findTransceiverForSender + +promise_test(async t => { + const pc1 = createPeerConnectionWithCleanup(t); + pc1.addTrack(... await createTrackAndStreamWithCleanup(t)); + const pc2 = createPeerConnectionWithCleanup(t); + exchangeIceCandidates(pc1, pc2); + + const unmuteResolver = new Resolver(); + let remoteTrack = null; + // The unmuting it timing sensitive so we hook up to the event directly + // instead of wrapping it in an EventWatcher which uses promises. + pc2.ontrack = t.step_func(e => { + remoteTrack = e.track; + assert_true(remoteTrack.muted, 'track is muted in ontrack'); + remoteTrack.onunmute = t.step_func(e => { + assert_false(remoteTrack.muted, 'track is unmuted in onunmute'); + unmuteResolver.resolve(); + }); + pc2.ontrack = t.step_func(e => { + assert_unreached('ontrack fired unexpectedly'); + }); + }); + await exchangeOfferAnswer(pc1, pc2); + await unmuteResolver.promise; +}, 'ontrack: track goes from muted to unmuted'); + +promise_test(async t => { + const pc1 = createPeerConnectionWithCleanup(t); + const pc1Sender = pc1.addTrack(... await createTrackAndStreamWithCleanup(t)); + const localTransceiver = findTransceiverForSender(pc1, pc1Sender); + const pc2 = createPeerConnectionWithCleanup(t); + exchangeIceCandidates(pc1, pc2); + + const e = await exchangeOfferAndListenToOntrack(t, pc1, pc2); + await exchangeAnswer(pc1, pc2); + + const muteWatcher = new EventWatcher(t, e.track, ['mute']); + const mutePromise = muteWatcher.wait_for('mute'); + localTransceiver.direction = 'inactive'; + await exchangeOfferAnswer(pc1, pc2); + + await mutePromise; +}, 'Changing transceiver direction to \'inactive\' mutes the remote track'); + +promise_test(async t => { + const pc1 = createPeerConnectionWithCleanup(t); + const pc1Sender = pc1.addTrack(... await createTrackAndStreamWithCleanup(t)); + const localTransceiver = findTransceiverForSender(pc1, pc1Sender); + const pc2 = createPeerConnectionWithCleanup(t); + exchangeIceCandidates(pc1, pc2); + + const e = await exchangeOfferAndListenToOntrack(t, pc1, pc2); + await exchangeAnswer(pc1, pc2); + localTransceiver.direction = 'inactive'; + await exchangeOfferAnswer(pc1, pc2); + + const unmuteWatcher = new EventWatcher(t, e.track, ['unmute']); + const unmutePromise = unmuteWatcher.wait_for('unmute'); + localTransceiver.direction = 'sendrecv'; + await exchangeOfferAnswer(pc1, pc2); + + await unmutePromise; +}, 'Changing transceiver direction to \'sendrecv\' unmutes the remote track'); + +promise_test(async t => { + const pc1 = createPeerConnectionWithCleanup(t); + const pc1Sender = pc1.addTrack(... await createTrackAndStreamWithCleanup(t)); + const localTransceiver = findTransceiverForSender(pc1, pc1Sender); + const pc2 = createPeerConnectionWithCleanup(t); + exchangeIceCandidates(pc1, pc2); + + const e = await exchangeOfferAndListenToOntrack(t, pc1, pc2); + await exchangeAnswer(pc1, pc2); + const muteWatcher = new EventWatcher(t, e.track, ['mute']); + const mutePromise = muteWatcher.wait_for('mute'); + pc2.close(); + await mutePromise; +}, 'pc.close() mutes remote tracks'); + +</script> diff --git a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-transceivers.https.html b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-transceivers.https.html index c89737c99fc..1f980ea389a 100644 --- a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-transceivers.https.html +++ b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-transceivers.https.html @@ -8,59 +8,14 @@ 'use strict'; // The following helper functions are called from RTCPeerConnection-helper.js: +// exchangeOffer +// exchangeOfferAndListenToOntrack +// exchangeAnswer +// exchangeAnswerAndListenToOntrack // addEventListenerPromise - -function createPeerConnectionWithCleanup(t) { - const pc = new RTCPeerConnection(); - t.add_cleanup(() => pc.close()); - return pc; -} - -async function createTrackAndStreamWithCleanup(t, kind = 'audio') { - let constraints = {}; - constraints[kind] = true; - const stream = await navigator.mediaDevices.getUserMedia(constraints); - const [track] = stream.getTracks(); - t.add_cleanup(() => track.stop()); - return [track, stream]; -} - -function findTransceiverForSender(pc, sender) { - const transceivers = pc.getTransceivers(); - for (let i = 0; i < transceivers.length; ++i) { - if (transceivers[i].sender == sender) - return transceivers[i]; - } - return null; -} - -// Performs an offer exchange pc1 -> pc2. -async function exchangeOffer(pc1, pc2) { - const offer = await pc1.createOffer(); - await pc1.setLocalDescription(offer); - await pc2.setRemoteDescription(offer); -} - -// The returned promise is resolved with pc2's ontrack event. -async function exchangeOfferAndListenToOntrack(t, pc1, pc2) { - const ontrackPromise = addEventListenerPromise(t, pc2, 'track'); - await exchangeOffer(pc1, pc2); - return ontrackPromise; -} - -// Performs an answer exchange pc2 -> pc1. -async function exchangeAnswer(pc1, pc2) { - const answer = await pc2.createAnswer(); - await pc2.setLocalDescription(answer); - await pc1.setRemoteDescription(answer); -} - -// The returned promise is resolved with pc1's ontrack event. -async function exchangeAnswerAndListenToOntrack(t, pc1, pc2) { - const ontrackPromise = addEventListenerPromise(t, pc1, 'track'); - await exchangeAnswer(pc1, pc2); - return ontrackPromise; -} +// createPeerConnectionWithCleanup +// createTrackAndStreamWithCleanup +// findTransceiverForSender promise_test(async t => { const pc = createPeerConnectionWithCleanup(t); @@ -493,4 +448,20 @@ promise_test(async t => { assert_true(transceiver.stopped); }, 'Closing the PC stops the transceivers'); +promise_test(async t => { + const pc1 = createPeerConnectionWithCleanup(t); + const pc1Sender = pc1.addTrack(... await createTrackAndStreamWithCleanup(t)); + const localTransceiver = findTransceiverForSender(pc1, pc1Sender); + const pc2 = createPeerConnectionWithCleanup(t); + exchangeIceCandidates(pc1, pc2); + + const e = await exchangeOfferAndListenToOntrack(t, pc1, pc2); + await exchangeAnswer(pc1, pc2); + localTransceiver.direction = 'inactive'; + await exchangeOfferAnswer(pc1, pc2); + + localTransceiver.direction = 'sendrecv'; + await exchangeOfferAndListenToOntrack(t, pc1, pc2); +}, 'Changing transceiver direction to \'sendrecv\' makes ontrack fire'); + </script> diff --git a/tests/wpt/web-platform-tests/webstorage/event_constructor.html b/tests/wpt/web-platform-tests/webstorage/event_constructor.html index c74f08aadab..fe7fca77a93 100644 --- a/tests/wpt/web-platform-tests/webstorage/event_constructor.html +++ b/tests/wpt/web-platform-tests/webstorage/event_constructor.html @@ -1,32 +1,81 @@ <!DOCTYPE HTML> <html> <head> - <title>WebStorage Test: StorageEvent - init value</title> + <title>WebStorage Test: StorageEvent - constructor</title> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> </head> <body> - <h1>event_session_Constructor</h1> - <div id="log"></div> <script> test(function() { - var t = async_test("storageeventinit test"); - function onStorageEvent(event) { - t.step(function() { - assert_equals(event.type, 'storage'); - assert_equals(event.key, null); - assert_equals(event.oldValue, null); - assert_equals(event.newValue, null); - assert_equals(event.url, ''); - assert_equals(event.storageArea, null); - }); - t.done(); - } + assert_throws(new TypeError, () => new StorageEvent()); + // should be redundant, but .length can be wrong with custom bindings + assert_equals(StorageEvent.length, 1, 'StorageEvent.length'); + }, 'constructor with no arguments'); - window.addEventListener('storage', onStorageEvent, false); - var event = new StorageEvent('storage'); - window.dispatchEvent(event); - }, "The initial values of storage event properties."); + test(function() { + var event = new StorageEvent('type'); + assert_equals(event.type, 'type', 'type'); + assert_equals(event.key, null, 'key'); + assert_equals(event.oldValue, null, 'oldValue'); + assert_equals(event.newValue, null, 'newValue'); + assert_equals(event.url, '', 'url'); + assert_equals(event.storageArea, null, 'storageArea'); + }, 'constructor with just type argument'); + + test(function() { + assert_not_equals(localStorage, null, 'localStorage'); // precondition + + var event = new StorageEvent('storage', { + bubbles: true, + cancelable: true, + key: 'key', + oldValue: 'oldValue', + newValue: 'newValue', + url: 'url', // not an absolute URL to ensure it isn't resolved + storageArea: localStorage + }); + assert_equals(event.type, 'storage', 'type'); + assert_equals(event.bubbles, true, 'bubbles'); + assert_equals(event.cancelable, true, 'cancelable'); + assert_equals(event.key, 'key', 'key'); + assert_equals(event.oldValue, 'oldValue', 'oldValue'); + assert_equals(event.newValue, 'newValue', 'newValue'); + assert_equals(event.url, 'url', 'url'); + assert_equals(event.storageArea, localStorage, 'storageArea'); + }, 'constructor with sensible type argument and members'); + + test(function() { + var event = new StorageEvent(null, { + key: null, + oldValue: null, + newValue: null, + url: null, + storageArea: null + }); + assert_equals(event.type, 'null', 'type'); + assert_equals(event.key, null, 'key'); + assert_equals(event.oldValue, null, 'oldValue'); + assert_equals(event.newValue, null, 'newValue'); + assert_equals(event.url, 'null', 'url'); + assert_equals(event.storageArea, null, 'storageArea'); + }, 'constructor with null type argument and members'); + + test(function() { + var event = new StorageEvent(undefined, { + key: undefined, + oldValue: undefined, + newValue: undefined, + url: undefined, + storageArea: undefined + }); + assert_equals(event.type, 'undefined', 'type'); + assert_equals(event.key, null, 'key'); + assert_equals(event.oldValue, null, 'oldValue'); + assert_equals(event.newValue, null, 'newValue'); + assert_equals(event.url, '', 'url'); // not 'undefined'! + assert_equals(event.storageArea, null, 'storageArea'); + }, 'constructor with undefined type argument and members'); </script> </body> </html> diff --git a/tests/wpt/web-platform-tests/webstorage/event_constructor_eventinit.html b/tests/wpt/web-platform-tests/webstorage/event_constructor_eventinit.html deleted file mode 100644 index 3b4a77cb2cb..00000000000 --- a/tests/wpt/web-platform-tests/webstorage/event_constructor_eventinit.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE HTML> -<html> - <head> - <title>WebStorage Test: StorageEvent - StorageEventInit with null value</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - </head> - <body> - <h1>event_Constructor</h1> - <div id="log"></div> - <script> - async_test(function(t) { - function onStorageEvent(event) { - assert_equals(event.type, 'storage', 'type'); - assert_equals(event.key, null, 'key'); - assert_equals(event.oldValue, null, 'oldValue'); - assert_equals(event.newValue, null, 'newValue'); - assert_equals(event.url, 'null', 'url'); - assert_equals(event.storageArea, null, 'storageArea'); - t.done(); - } - - window.addEventListener('storage', t.step_func(onStorageEvent), false); - var event = new StorageEvent('storage', { - key: null, - oldValue: null, - newValue: null, - url: null - }); - window.dispatchEvent(event); - }, "StorageEvent constructor and nulls - Construct StorageEvent with StorageEventInit."); - </script> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/webstorage/event_initstorageevent.html b/tests/wpt/web-platform-tests/webstorage/event_initstorageevent.html new file mode 100644 index 00000000000..656fc351da3 --- /dev/null +++ b/tests/wpt/web-platform-tests/webstorage/event_initstorageevent.html @@ -0,0 +1,72 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>WebStorage Test: StorageEvent - initStorageEvent</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <script> + test(() => { + const event = new StorageEvent('storage'); + assert_throws(new TypeError, () => event.initStorageEvent()); + // should be redundant, but .length can be wrong with custom bindings + assert_equals(event.initStorageEvent.length, 1, 'event.initStorageEvent.length'); + }, 'initStorageEvent with 0 arguments'); + + test(() => { + const event = new StorageEvent('storage'); + event.initStorageEvent('type'); + assert_equals(event.type, 'type', 'event.type'); + assert_equals(event.bubbles, false, 'event.bubbles'); + assert_equals(event.cancelable, false, 'event.cancelable'); + assert_equals(event.key, null, 'event.key'); + assert_equals(event.oldValue, null, 'event.oldValue'); + assert_equals(event.newValue, null, 'event.newValue'); + assert_equals(event.url, '', 'event.url'); + assert_equals(event.storageArea, null, 'event.storageArea'); + }, 'initStorageEvent with 1 argument'); + + test(() => { + assert_not_equals(localStorage, null, 'localStorage'); // precondition + + const event = new StorageEvent('storage'); + event.initStorageEvent('type', true, true, 'key', 'oldValue', 'newValue', 'url', localStorage); + assert_equals(event.type, 'type', 'event.type'); + assert_equals(event.bubbles, true, 'event.bubbles'); + assert_equals(event.cancelable, true, 'event.cancelable'); + assert_equals(event.key, 'key', 'event.key'); + assert_equals(event.oldValue, 'oldValue', 'event.oldValue'); + assert_equals(event.newValue, 'newValue', 'event.newValue'); + assert_equals(event.url, 'url', 'event.url'); + assert_equals(event.storageArea, localStorage, 'event.storageArea'); + }, 'initStorageEvent with 8 sensible arguments'); + + test(() => { + const event = new StorageEvent('storage'); + event.initStorageEvent(null, null, null, null, null, null, null, null); + assert_equals(event.type, 'null', 'event.type'); + assert_equals(event.bubbles, false, 'event.bubbles'); + assert_equals(event.cancelable, false, 'event.cancelable'); + assert_equals(event.key, null, 'event.key'); + assert_equals(event.oldValue, null, 'event.oldValue'); + assert_equals(event.newValue, null, 'event.newValue'); + assert_equals(event.url, 'null', 'event.url'); + assert_equals(event.storageArea, null, 'event.storageArea'); + }, 'initStorageEvent with 8 null arguments'); + + test(() => { + const event = new StorageEvent('storage'); + event.initStorageEvent(undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined); + assert_equals(event.type, 'undefined', 'event.type'); + assert_equals(event.bubbles, false, 'event.bubbles'); + assert_equals(event.cancelable, false, 'event.cancelable'); + assert_equals(event.key, null, 'event.key'); + assert_equals(event.oldValue, null, 'event.oldValue'); + assert_equals(event.newValue, null, 'event.newValue'); + assert_equals(event.url, 'undefined', 'event.url'); + assert_equals(event.storageArea, null, 'event.storageArea'); + }, 'initStorageEvent with 8 undefined arguments'); + </script> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/webstorage/event_local_storageeventinit.html b/tests/wpt/web-platform-tests/webstorage/event_local_storageeventinit.html deleted file mode 100644 index 3a7e5d18f47..00000000000 --- a/tests/wpt/web-platform-tests/webstorage/event_local_storageeventinit.html +++ /dev/null @@ -1,37 +0,0 @@ -<!DOCTYPE HTML> -<html> - <head> - <title>WebStorage Test: localStorage event - StorageEventInit</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - </head> - <body> - <h1>event_local_StorageEventInit</h1> - <div id="log"></div> - <script> - async_test(function(t) { - - function onStorageEvent(event) { - assert_equals(event.key, 'key'); - assert_equals(event.oldValue, 'oldValue'); - assert_equals(event.newValue, 'newValue'); - assert_equals(event.url, window.location.href); - assert_equals(event.storageArea, window.localStorage); - t.done(); - } - - window.addEventListener('storage', t.step_func(onStorageEvent), false); - - var event = new StorageEvent('storage', { - key: 'key', - oldValue: 'oldValue', - newValue: 'newValue', - url: window.location.href, - storageArea: window.localStorage - }); - - window.dispatchEvent(event); - }, "storageeventinit test - Storage event is fired due to set values for StorageEventInit."); - </script> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/webstorage/event_session_storageeventinit.html b/tests/wpt/web-platform-tests/webstorage/event_session_storageeventinit.html deleted file mode 100644 index 69539df41a4..00000000000 --- a/tests/wpt/web-platform-tests/webstorage/event_session_storageeventinit.html +++ /dev/null @@ -1,36 +0,0 @@ -<!DOCTYPE HTML> -<html> - <head> - <title>WebStorage Test: sessionStorage event - StorageEventInit</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - </head> - <body> - <h1>event_session_StorageEventInit</h1> - <div id="log"></div> - <script> - async_test(function(t) { - function onStorageEvent(event) { - assert_equals(event.key, 'key'); - assert_equals(event.oldValue, 'oldValue'); - assert_equals(event.newValue, 'newValue'); - assert_equals(event.url, window.location.href); - assert_equals(event.storageArea, window.sessionStorage); - t.done(); - } - - window.addEventListener('storage', t.step_func(onStorageEvent), false); - - var event = new StorageEvent('storage', { - key: 'key', - oldValue: 'oldValue', - newValue: 'newValue', - url: window.location.href, - storageArea: window.sessionStorage - }); - - window.dispatchEvent(event); - }, "storageeventinit test - Storage event is fired due to set values for StorageEventInit."); - </script> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/webstorage/missing_arguments.html b/tests/wpt/web-platform-tests/webstorage/missing_arguments.html index 34f54bc3566..38c52cf6275 100644 --- a/tests/wpt/web-platform-tests/webstorage/missing_arguments.html +++ b/tests/wpt/web-platform-tests/webstorage/missing_arguments.html @@ -6,8 +6,6 @@ <script src="/resources/testharnessreport.js"></script> </head> <body> - <h1>missing_arguments</h1> - <div id="log"></div> <script> var tests = [ function() { localStorage.key(); }, @@ -20,7 +18,6 @@ function() { sessionStorage.setItem(); }, function() { sessionStorage.setItem("a"); }, function() { sessionStorage.removeItem(); }, - function() { new StorageEvent(); } ]; tests.forEach(function(fun) { test(function() { |