From e8ed816728fa0339cf7c4b08a1bd4af48c008804 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Thu, 11 Feb 2016 17:10:01 +0100 Subject: [PATCH] Update web-platform-tests to revision 95aad3bd9b82b5c65d84d53517b65ba084de9394 --- tests/wpt/metadata/MANIFEST.json | 114 +++++-- tests/wpt/metadata/dom/interfaces.html.ini | 27 ++ .../dom/nodes/Element-classlist.html.ini | 5 + .../dom/nodes/Node-isEqualNode.html.ini | 5 + .../dom/ranges/Range-deleteContents.html.ini | 1 + .../dom/ranges/Range-extractContents.html.ini | 1 + .../scroll-restoration-basic.html.ini | 11 + ...n-fragment-scrolling-cross-origin.html.ini | 6 + ...ration-fragment-scrolling-samedoc.html.ini | 5 + ...storation-navigation-cross-origin.html.ini | 5 + ...ll-restoration-navigation-samedoc.html.ini | 5 + .../wpt/metadata/html/dom/interfaces.html.ini | 33 ++ .../media-elements/video_008.htm.ini | 6 + .../forms/the-input-element/checkbox.html.ini | 3 + .../forms/the-input-element/radio.html.ini | 2 +- ...ompiled-raw-handler-compiled-once.html.ini | 2 +- tests/wpt/metadata/mozilla-sync | 2 +- .../wpt/metadata/url/url-constructor.html.ini | 3 + .../workers/nested_worker.worker.js.ini | 1 + tests/wpt/web-platform-tests/DOMEvents/OWNERS | 3 + tests/wpt/web-platform-tests/FileAPI/OWNERS | 6 + tests/wpt/web-platform-tests/IndexedDB/OWNERS | 8 + .../IndexedDB/idbindex_get7.htm | 11 +- .../IndexedDB/idbindex_get8.htm | 27 ++ .../IndexedDB/idbindex_getKey7.htm | 11 +- .../IndexedDB/idbindex_getKey8.htm | 27 ++ .../IndexedDB/idbindex_openCursor2.htm | 9 +- .../IndexedDB/idbindex_openCursor3.htm | 27 ++ .../IndexedDB/idbindex_openKeyCursor3.htm | 9 +- .../IndexedDB/idbindex_openKeyCursor4.htm | 27 ++ .../web-platform-tests/WebCryptoAPI/OWNERS | 2 + .../web-platform-tests/XMLHttpRequest/OWNERS | 13 + .../event-readystate-sync-open.htm | 33 ++ .../open-method-responsetype-set-sync.htm | 5 +- .../responsexml-document-properties.htm | 2 +- .../web-platform-tests/ambient-light/OWNERS | 3 + tests/wpt/web-platform-tests/app-uri/OWNERS | 1 + tests/wpt/web-platform-tests/common/OWNERS | 4 + .../conformance-checkers/OWNERS | 1 + .../content-security-policy/OWNERS | 2 + tests/wpt/web-platform-tests/cors/OWNERS | 5 + .../wpt/web-platform-tests/cssom-view/OWNERS | 1 + .../cssom-view/negativeMargins.html | 32 ++ .../web-platform-tests/custom-elements/OWNERS | 3 + tests/wpt/web-platform-tests/docs/OWNERS | 4 + tests/wpt/web-platform-tests/dom/OWNERS | 6 + .../web-platform-tests/dom/historical.html | 1 + .../dom/interface-objects.html | 3 +- .../web-platform-tests/dom/interfaces.html | 9 +- .../dom/nodes/Element-classlist.html | 14 +- .../dom/nodes/Node-isEqualNode.html | 161 ++++++++++ .../wpt/web-platform-tests/domparsing/OWNERS | 5 + tests/wpt/web-platform-tests/domxpath/OWNERS | 3 + tests/wpt/web-platform-tests/editing/OWNERS | 1 + tests/wpt/web-platform-tests/encoding/OWNERS | 2 + .../wpt/web-platform-tests/eventsource/OWNERS | 5 + tests/wpt/web-platform-tests/fetch/OWNERS | 2 + .../fetch/api/request/request-clone.sub.html | 17 +- .../fetch/api/request/request-consume.html | 18 ++ .../fetch/api/request/request-init-002.html | 7 +- .../fetch/api/request/request-structure.html | 8 +- tests/wpt/web-platform-tests/gamepad/OWNERS | 1 + .../web-platform-tests/geolocation-API/OWNERS | 2 + tests/wpt/web-platform-tests/hr-time/OWNERS | 2 + .../web-platform-tests/html-imports/OWNERS | 1 + .../web-platform-tests/html-longdesc/OWNERS | 2 + .../html-media-capture/OWNERS | 2 + tests/wpt/web-platform-tests/html/OWNERS | 1 + .../resources/blank1.html | 8 + .../resources/blank2.html | 8 + .../resources/page-with-fragment.html | 20 ++ .../scroll-restoration-basic.html | 34 +++ ...ation-fragment-scrolling-cross-origin.html | 67 ++++ ...estoration-fragment-scrolling-samedoc.html | 54 ++++ ...l-restoration-navigation-cross-origin.html | 71 +++++ ...scroll-restoration-navigation-samedoc.html | 81 +++++ .../html/dom/interfaces.html | 41 +-- .../focus-event-targets-simple.html | 33 ++ .../lists/li-type-supported-ref.html | 6 +- .../lists/li-type-supported.html | 6 +- .../lists/li-type-supported.xhtml | 6 +- .../media-elements/video_008.htm | 45 +++ .../media-elements/historical.html | 1 - .../the-embed-element/embed-document.html | 10 +- .../the-button-element/button-events.html | 16 +- .../forms/the-input-element/checkbox.html | 28 +- .../forms/the-input-element/file-manual.html | 4 +- .../forms/the-input-element/radio.html | 58 ++-- tests/wpt/web-platform-tests/images/OWNERS | 2 + .../web-platform-tests/media-source/OWNERS | 4 + tests/wpt/web-platform-tests/media/OWNERS | 2 + .../mediacapture-streams/OWNERS | 3 + .../web-platform-tests/mixed-content/OWNERS | 1 + .../navigation-timing/OWNERS | 2 + .../web-platform-tests/notifications/OWNERS | 4 + .../Microsoft/sandbox/sandbox_011.htm | 38 +-- .../web-platform-tests/page-visibility/OWNERS | 2 + .../performance-timeline/OWNERS | 1 + .../web-platform-tests/pointerevents/OWNERS | 7 + .../wpt/web-platform-tests/pointerlock/OWNERS | 1 + tests/wpt/web-platform-tests/proximity/OWNERS | 2 + .../wpt/web-platform-tests/quirks-mode/OWNERS | 1 + .../web-platform-tests/referrer-policy/OWNERS | 1 + .../web-platform-tests/resource-timing/OWNERS | 3 + .../screen-orientation/OWNERS | 1 + tests/wpt/web-platform-tests/selection/OWNERS | 1 + .../attribute-case/cssom.html | 7 - .../web-platform-tests/service-workers/OWNERS | 1 + .../service-workers/cache-storage/OWNERS | 2 + .../cache-storage/resources/test-helpers.js | 200 ++++++++++++ .../resources/testharness-helpers.js | 67 ---- .../cache-storage/script-tests/cache-add.js | 138 ++++++++- .../cache-storage/script-tests/cache-match.js | 289 ++---------------- .../script-tests/cache-matchAll.js | 154 ++++++++++ .../cache-storage/script-tests/cache-put.js | 22 +- .../script-tests/cache-storage.js | 3 +- .../serviceworker/cache-match.https.html | 2 +- .../serviceworker/cache-matchAll.https.html | 10 + .../window/cache-match.https.html | 2 +- .../window/cache-matchAll.https.html | 9 + .../worker/cache-match.https.html | 2 +- .../worker/cache-matchAll.https.html | 9 + .../wpt/web-platform-tests/shadow-dom/OWNERS | 5 + .../subresource-integrity/OWNERS | 6 + tests/wpt/web-platform-tests/svg/OWNERS | 2 + .../web-platform-tests/touch-events/OWNERS | 3 + .../wpt/web-platform-tests/typedarrays/OWNERS | 4 + .../mouse-events/click-on-div-manual.html | 43 +++ tests/wpt/web-platform-tests/url/OWNERS | 8 + tests/wpt/web-platform-tests/url/README.md | 23 +- .../web-platform-tests/url/urltestdata.json | 6 +- .../wpt/web-platform-tests/user-timing/OWNERS | 1 + tests/wpt/web-platform-tests/vibration/OWNERS | 3 + .../web-platform-tests/web-animations/OWNERS | 1 + .../keyframe-effect/constructor.html | 2 +- tests/wpt/web-platform-tests/webaudio/OWNERS | 1 + tests/wpt/web-platform-tests/webdriver/OWNERS | 4 + .../conformance/programs/program-test.html | 6 +- .../web-platform-tests/webmessaging/OWNERS | 6 + tests/wpt/web-platform-tests/webrtc/OWNERS | 4 + ...Secure-valid-url-protocol-setCorrectly.htm | 2 +- .../wpt/web-platform-tests/websockets/OWNERS | 9 + .../websockets/websocket.js | 72 ++--- .../wpt/web-platform-tests/webstorage/OWNERS | 9 + tests/wpt/web-platform-tests/workers/OWNERS | 6 + 145 files changed, 2024 insertions(+), 578 deletions(-) create mode 100644 tests/wpt/metadata/dom/nodes/Element-classlist.html.ini create mode 100644 tests/wpt/metadata/dom/nodes/Node-isEqualNode.html.ini create mode 100644 tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-basic.html.ini create mode 100644 tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html.ini create mode 100644 tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-samedoc.html.ini create mode 100644 tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-navigation-cross-origin.html.ini create mode 100644 tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-navigation-samedoc.html.ini create mode 100644 tests/wpt/metadata/html/semantics/embedded-content-0/media-elements/video_008.htm.ini create mode 100644 tests/wpt/web-platform-tests/DOMEvents/OWNERS create mode 100644 tests/wpt/web-platform-tests/FileAPI/OWNERS create mode 100644 tests/wpt/web-platform-tests/IndexedDB/OWNERS create mode 100644 tests/wpt/web-platform-tests/IndexedDB/idbindex_get8.htm create mode 100644 tests/wpt/web-platform-tests/IndexedDB/idbindex_getKey8.htm create mode 100644 tests/wpt/web-platform-tests/IndexedDB/idbindex_openCursor3.htm create mode 100644 tests/wpt/web-platform-tests/IndexedDB/idbindex_openKeyCursor4.htm create mode 100644 tests/wpt/web-platform-tests/WebCryptoAPI/OWNERS create mode 100644 tests/wpt/web-platform-tests/XMLHttpRequest/OWNERS create mode 100644 tests/wpt/web-platform-tests/XMLHttpRequest/event-readystate-sync-open.htm create mode 100644 tests/wpt/web-platform-tests/ambient-light/OWNERS create mode 100644 tests/wpt/web-platform-tests/app-uri/OWNERS create mode 100644 tests/wpt/web-platform-tests/common/OWNERS create mode 100644 tests/wpt/web-platform-tests/conformance-checkers/OWNERS create mode 100644 tests/wpt/web-platform-tests/content-security-policy/OWNERS create mode 100644 tests/wpt/web-platform-tests/cors/OWNERS create mode 100644 tests/wpt/web-platform-tests/cssom-view/OWNERS create mode 100644 tests/wpt/web-platform-tests/cssom-view/negativeMargins.html create mode 100644 tests/wpt/web-platform-tests/custom-elements/OWNERS create mode 100644 tests/wpt/web-platform-tests/docs/OWNERS create mode 100644 tests/wpt/web-platform-tests/dom/OWNERS create mode 100644 tests/wpt/web-platform-tests/dom/nodes/Node-isEqualNode.html create mode 100644 tests/wpt/web-platform-tests/domparsing/OWNERS create mode 100644 tests/wpt/web-platform-tests/domxpath/OWNERS create mode 100644 tests/wpt/web-platform-tests/editing/OWNERS create mode 100644 tests/wpt/web-platform-tests/encoding/OWNERS create mode 100644 tests/wpt/web-platform-tests/eventsource/OWNERS create mode 100644 tests/wpt/web-platform-tests/fetch/OWNERS create mode 100644 tests/wpt/web-platform-tests/gamepad/OWNERS create mode 100644 tests/wpt/web-platform-tests/geolocation-API/OWNERS create mode 100644 tests/wpt/web-platform-tests/hr-time/OWNERS create mode 100644 tests/wpt/web-platform-tests/html-imports/OWNERS create mode 100644 tests/wpt/web-platform-tests/html-longdesc/OWNERS create mode 100644 tests/wpt/web-platform-tests/html-media-capture/OWNERS create mode 100644 tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/resources/blank1.html create mode 100644 tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/resources/blank2.html create mode 100644 tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/resources/page-with-fragment.html create mode 100644 tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-basic.html create mode 100644 tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html create mode 100644 tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-samedoc.html create mode 100644 tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-navigation-cross-origin.html create mode 100644 tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-navigation-samedoc.html create mode 100644 tests/wpt/web-platform-tests/html/editing/focus/focus-management/focus-event-targets-simple.html create mode 100644 tests/wpt/web-platform-tests/html/semantics/embedded-content-0/media-elements/video_008.htm create mode 100644 tests/wpt/web-platform-tests/images/OWNERS create mode 100644 tests/wpt/web-platform-tests/media-source/OWNERS create mode 100644 tests/wpt/web-platform-tests/media/OWNERS create mode 100644 tests/wpt/web-platform-tests/mediacapture-streams/OWNERS create mode 100644 tests/wpt/web-platform-tests/mixed-content/OWNERS create mode 100644 tests/wpt/web-platform-tests/navigation-timing/OWNERS create mode 100644 tests/wpt/web-platform-tests/notifications/OWNERS create mode 100644 tests/wpt/web-platform-tests/page-visibility/OWNERS create mode 100644 tests/wpt/web-platform-tests/performance-timeline/OWNERS create mode 100644 tests/wpt/web-platform-tests/pointerevents/OWNERS create mode 100644 tests/wpt/web-platform-tests/pointerlock/OWNERS create mode 100644 tests/wpt/web-platform-tests/proximity/OWNERS create mode 100644 tests/wpt/web-platform-tests/quirks-mode/OWNERS create mode 100644 tests/wpt/web-platform-tests/referrer-policy/OWNERS create mode 100644 tests/wpt/web-platform-tests/resource-timing/OWNERS create mode 100644 tests/wpt/web-platform-tests/screen-orientation/OWNERS create mode 100644 tests/wpt/web-platform-tests/selection/OWNERS create mode 100644 tests/wpt/web-platform-tests/service-workers/OWNERS create mode 100644 tests/wpt/web-platform-tests/service-workers/cache-storage/OWNERS create mode 100644 tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-matchAll.js create mode 100644 tests/wpt/web-platform-tests/service-workers/cache-storage/serviceworker/cache-matchAll.https.html create mode 100644 tests/wpt/web-platform-tests/service-workers/cache-storage/window/cache-matchAll.https.html create mode 100644 tests/wpt/web-platform-tests/service-workers/cache-storage/worker/cache-matchAll.https.html create mode 100644 tests/wpt/web-platform-tests/shadow-dom/OWNERS create mode 100644 tests/wpt/web-platform-tests/subresource-integrity/OWNERS create mode 100644 tests/wpt/web-platform-tests/svg/OWNERS create mode 100644 tests/wpt/web-platform-tests/touch-events/OWNERS create mode 100644 tests/wpt/web-platform-tests/typedarrays/OWNERS create mode 100644 tests/wpt/web-platform-tests/uievents/order-of-events/mouse-events/click-on-div-manual.html create mode 100644 tests/wpt/web-platform-tests/url/OWNERS create mode 100644 tests/wpt/web-platform-tests/user-timing/OWNERS create mode 100644 tests/wpt/web-platform-tests/vibration/OWNERS create mode 100644 tests/wpt/web-platform-tests/web-animations/OWNERS create mode 100644 tests/wpt/web-platform-tests/webaudio/OWNERS create mode 100644 tests/wpt/web-platform-tests/webdriver/OWNERS create mode 100644 tests/wpt/web-platform-tests/webmessaging/OWNERS create mode 100644 tests/wpt/web-platform-tests/webrtc/OWNERS create mode 100644 tests/wpt/web-platform-tests/websockets/OWNERS create mode 100644 tests/wpt/web-platform-tests/webstorage/OWNERS create mode 100644 tests/wpt/web-platform-tests/workers/OWNERS diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 0f68f756995..38784ef366e 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -3229,6 +3229,10 @@ "path": "uievents/order-of-events/mouse-events/click-on-body-manual.html", "url": "/uievents/order-of-events/mouse-events/click-on-body-manual.html" }, + { + "path": "uievents/order-of-events/mouse-events/click-on-div-manual.html", + "url": "/uievents/order-of-events/mouse-events/click-on-div-manual.html" + }, { "path": "uievents/order-of-events/mouse-events/click-on-html-manual.html", "url": "/uievents/order-of-events/mouse-events/click-on-html-manual.html" @@ -11647,6 +11651,10 @@ "path": "IndexedDB/idbindex_get7.htm", "url": "/IndexedDB/idbindex_get7.htm" }, + { + "path": "IndexedDB/idbindex_get8.htm", + "url": "/IndexedDB/idbindex_get8.htm" + }, { "path": "IndexedDB/idbindex_getAll.html", "url": "/IndexedDB/idbindex_getAll.html" @@ -11683,6 +11691,10 @@ "path": "IndexedDB/idbindex_getKey7.htm", "url": "/IndexedDB/idbindex_getKey7.htm" }, + { + "path": "IndexedDB/idbindex_getKey8.htm", + "url": "/IndexedDB/idbindex_getKey8.htm" + }, { "path": "IndexedDB/idbindex_indexNames.htm", "url": "/IndexedDB/idbindex_indexNames.htm" @@ -11695,6 +11707,10 @@ "path": "IndexedDB/idbindex_openCursor2.htm", "url": "/IndexedDB/idbindex_openCursor2.htm" }, + { + "path": "IndexedDB/idbindex_openCursor3.htm", + "url": "/IndexedDB/idbindex_openCursor3.htm" + }, { "path": "IndexedDB/idbindex_openKeyCursor.htm", "url": "/IndexedDB/idbindex_openKeyCursor.htm" @@ -11707,6 +11723,10 @@ "path": "IndexedDB/idbindex_openKeyCursor3.htm", "url": "/IndexedDB/idbindex_openKeyCursor3.htm" }, + { + "path": "IndexedDB/idbindex_openKeyCursor4.htm", + "url": "/IndexedDB/idbindex_openKeyCursor4.htm" + }, { "path": "IndexedDB/idbkeyrange.htm", "url": "/IndexedDB/idbkeyrange.htm" @@ -12239,6 +12259,10 @@ "path": "XMLHttpRequest/event-progress.htm", "url": "/XMLHttpRequest/event-progress.htm" }, + { + "path": "XMLHttpRequest/event-readystate-sync-open.htm", + "url": "/XMLHttpRequest/event-readystate-sync-open.htm" + }, { "path": "XMLHttpRequest/event-readystatechange-loaded.htm", "url": "/XMLHttpRequest/event-readystatechange-loaded.htm" @@ -13583,6 +13607,10 @@ "path": "cssom-view/elementsFromPoint.html", "url": "/cssom-view/elementsFromPoint.html" }, + { + "path": "cssom-view/negativeMargins.html", + "url": "/cssom-view/negativeMargins.html" + }, { "path": "cssom-view/scrollingElement.html", "url": "/cssom-view/scrollingElement.html" @@ -14387,6 +14415,10 @@ "path": "dom/nodes/Node-insertBefore.html", "url": "/dom/nodes/Node-insertBefore.html" }, + { + "path": "dom/nodes/Node-isEqualNode.html", + "url": "/dom/nodes/Node-isEqualNode.html" + }, { "path": "dom/nodes/Node-isEqualNode.xhtml", "url": "/dom/nodes/Node-isEqualNode.xhtml" @@ -15627,6 +15659,18 @@ "path": "html/browsers/browsing-the-web/history-traversal/hashchange_event.html", "url": "/html/browsers/browsing-the-web/history-traversal/hashchange_event.html" }, + { + "path": "html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-basic.html", + "url": "/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-basic.html" + }, + { + "path": "html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-samedoc.html", + "url": "/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-samedoc.html" + }, + { + "path": "html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-navigation-samedoc.html", + "url": "/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-navigation-samedoc.html" + }, { "path": "html/browsers/browsing-the-web/history-traversal/popstate_event.html", "url": "/html/browsers/browsing-the-web/history-traversal/popstate_event.html" @@ -17063,6 +17107,10 @@ "path": "html/editing/focus/document-level-focus-apis/document-level-apis.html", "url": "/html/editing/focus/document-level-focus-apis/document-level-apis.html" }, + { + "path": "html/editing/focus/focus-management/focus-event-targets-simple.html", + "url": "/html/editing/focus/focus-management/focus-event-targets-simple.html" + }, { "path": "html/editing/focus/focus-management/focus-events.html", "url": "/html/editing/focus/focus-management/focus-events.html" @@ -17247,6 +17295,10 @@ "path": "html/semantics/edits/the-ins-element/ins_effect.html", "url": "/html/semantics/edits/the-ins-element/ins_effect.html" }, + { + "path": "html/semantics/embedded-content-0/media-elements/video_008.htm", + "url": "/html/semantics/embedded-content-0/media-elements/video_008.htm" + }, { "path": "html/semantics/embedded-content/media-elements/audio_volume_check.html", "url": "/html/semantics/embedded-content/media-elements/audio_volume_check.html" @@ -19523,6 +19575,14 @@ "path": "html/webappapis/scripting/events/event-handler-spec-example.html", "url": "/html/webappapis/scripting/events/event-handler-spec-example.html" }, + { + "path": "html/webappapis/scripting/events/inline-event-handler-ordering.html", + "url": "/html/webappapis/scripting/events/inline-event-handler-ordering.html" + }, + { + "path": "html/webappapis/scripting/events/invalid-uncompiled-raw-handler-compiled-once.html", + "url": "/html/webappapis/scripting/events/invalid-uncompiled-raw-handler-compiled-once.html" + }, { "path": "html/webappapis/scripting/events/onerroreventhandler.html", "url": "/html/webappapis/scripting/events/onerroreventhandler.html" @@ -30895,6 +30955,10 @@ "path": "websockets/Send-data.htm", "url": "/websockets/Send-data.htm" }, + { + "path": "websockets/Send-data.worker.js", + "url": "/websockets/Send-data.worker" + }, { "path": "websockets/Send-null.htm", "url": "/websockets/Send-null.htm" @@ -32502,6 +32566,16 @@ "timeout": "long", "url": "/eventsource/shared-worker/eventsource-constructor-non-same-origin.htm" }, + { + "path": "html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html", + "timeout": "long", + "url": "/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html" + }, + { + "path": "html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-navigation-cross-origin.html", + "timeout": "long", + "url": "/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-navigation-cross-origin.html" + }, { "path": "html/browsers/browsing-the-web/scroll-to-fragid/007.html", "timeout": "long", @@ -33432,6 +33506,11 @@ "timeout": "long", "url": "/service-workers/cache-storage/serviceworker/cache-match.https.html" }, + { + "path": "service-workers/cache-storage/serviceworker/cache-matchAll.https.html", + "timeout": "long", + "url": "/service-workers/cache-storage/serviceworker/cache-matchAll.https.html" + }, { "path": "service-workers/cache-storage/serviceworker/cache-put.https.html", "timeout": "long", @@ -33467,6 +33546,11 @@ "timeout": "long", "url": "/service-workers/cache-storage/window/cache-match.https.html" }, + { + "path": "service-workers/cache-storage/window/cache-matchAll.https.html", + "timeout": "long", + "url": "/service-workers/cache-storage/window/cache-matchAll.https.html" + }, { "path": "service-workers/cache-storage/window/cache-put.https.html", "timeout": "long", @@ -33507,6 +33591,11 @@ "timeout": "long", "url": "/service-workers/cache-storage/worker/cache-match.https.html" }, + { + "path": "service-workers/cache-storage/worker/cache-matchAll.https.html", + "timeout": "long", + "url": "/service-workers/cache-storage/worker/cache-matchAll.https.html" + }, { "path": "service-workers/cache-storage/worker/cache-put.https.html", "timeout": "long", @@ -33717,28 +33806,7 @@ }, "local_changes": { "deleted": [], - "items": { - "testharness": { - "html/webappapis/scripting/events/inline-event-handler-ordering.html": [ - { - "path": "html/webappapis/scripting/events/inline-event-handler-ordering.html", - "url": "/html/webappapis/scripting/events/inline-event-handler-ordering.html" - } - ], - "html/webappapis/scripting/events/invalid-uncompiled-raw-handler-compiled-once.html": [ - { - "path": "html/webappapis/scripting/events/invalid-uncompiled-raw-handler-compiled-once.html", - "url": "/html/webappapis/scripting/events/invalid-uncompiled-raw-handler-compiled-once.html" - } - ], - "websockets/Send-data.worker.js": [ - { - "path": "websockets/Send-data.worker.js", - "url": "/websockets/Send-data.worker" - } - ] - } - }, + "items": {}, "reftest_nodes": {} }, "reftest_nodes": { @@ -39851,7 +39919,7 @@ } ] }, - "rev": "7f2f85a88f434798e9d643427b34b05fab8278c6", + "rev": "95aad3bd9b82b5c65d84d53517b65ba084de9394", "url_base": "/", "version": 2 } diff --git a/tests/wpt/metadata/dom/interfaces.html.ini b/tests/wpt/metadata/dom/interfaces.html.ini index 837106ef25f..f45ecd075a1 100644 --- a/tests/wpt/metadata/dom/interfaces.html.ini +++ b/tests/wpt/metadata/dom/interfaces.html.ini @@ -171,3 +171,30 @@ [DOMSettableTokenList interface object name] expected: FAIL + [Element interface: attribute classList] + expected: FAIL + + [DOMTokenList interface: operation replace(DOMString,DOMString)] + expected: FAIL + + [DOMTokenList interface: operation supports(DOMString)] + expected: FAIL + + [DOMTokenList interface: attribute value] + expected: FAIL + + [DOMTokenList interface: document.body.classList must inherit property "replace" with the proper type (6)] + expected: FAIL + + [DOMTokenList interface: calling replace(DOMString,DOMString) on document.body.classList with too few arguments must throw TypeError] + expected: FAIL + + [DOMTokenList interface: document.body.classList must inherit property "supports" with the proper type (7)] + expected: FAIL + + [DOMTokenList interface: calling supports(DOMString) on document.body.classList with too few arguments must throw TypeError] + expected: FAIL + + [DOMTokenList interface: document.body.classList must inherit property "value" with the proper type (8)] + expected: FAIL + diff --git a/tests/wpt/metadata/dom/nodes/Element-classlist.html.ini b/tests/wpt/metadata/dom/nodes/Element-classlist.html.ini new file mode 100644 index 00000000000..bbaaad3e9e9 --- /dev/null +++ b/tests/wpt/metadata/dom/nodes/Element-classlist.html.ini @@ -0,0 +1,5 @@ +[Element-classlist.html] + type: testharness + [classList must have [PutForwards=value\]] + expected: FAIL + diff --git a/tests/wpt/metadata/dom/nodes/Node-isEqualNode.html.ini b/tests/wpt/metadata/dom/nodes/Node-isEqualNode.html.ini new file mode 100644 index 00000000000..c239f2eec91 --- /dev/null +++ b/tests/wpt/metadata/dom/nodes/Node-isEqualNode.html.ini @@ -0,0 +1,5 @@ +[Node-isEqualNode.html] + type: testharness + [documents should not be compared based on properties] + expected: FAIL + diff --git a/tests/wpt/metadata/dom/ranges/Range-deleteContents.html.ini b/tests/wpt/metadata/dom/ranges/Range-deleteContents.html.ini index 19938bac34f..61ba2ed3da6 100644 --- a/tests/wpt/metadata/dom/ranges/Range-deleteContents.html.ini +++ b/tests/wpt/metadata/dom/ranges/Range-deleteContents.html.ini @@ -35,3 +35,4 @@ [Resulting cursor position for range 51 [paras[3\], 1, comment, 8\]] expected: FAIL + diff --git a/tests/wpt/metadata/dom/ranges/Range-extractContents.html.ini b/tests/wpt/metadata/dom/ranges/Range-extractContents.html.ini index a6e3eea1263..e509efc61c4 100644 --- a/tests/wpt/metadata/dom/ranges/Range-extractContents.html.ini +++ b/tests/wpt/metadata/dom/ranges/Range-extractContents.html.ini @@ -14,3 +14,4 @@ [Resulting cursor position for range 51 [paras[3\], 1, comment, 8\]] expected: FAIL + diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-basic.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-basic.html.ini new file mode 100644 index 00000000000..3e73c51da3a --- /dev/null +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-basic.html.ini @@ -0,0 +1,11 @@ +[scroll-restoration-basic.html] + type: testharness + [Default value is "auto"] + expected: FAIL + + [It is writable] + expected: FAIL + + [Invalid values are ignored] + expected: FAIL + diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html.ini new file mode 100644 index 00000000000..8fb86a1ad58 --- /dev/null +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html.ini @@ -0,0 +1,6 @@ +[scroll-restoration-fragment-scrolling-cross-origin.html] + type: testharness + expected: TIMEOUT + [Manual scroll restoration should take precedent over scrolling to fragment in cross origin navigation] + expected: TIMEOUT + diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-samedoc.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-samedoc.html.ini new file mode 100644 index 00000000000..3322eb2c441 --- /dev/null +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-samedoc.html.ini @@ -0,0 +1,5 @@ +[scroll-restoration-fragment-scrolling-samedoc.html] + type: testharness + [Manual scroll restoration should take precedent over scrolling to fragment in cross doc navigation] + expected: FAIL + diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-navigation-cross-origin.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-navigation-cross-origin.html.ini new file mode 100644 index 00000000000..295ba613754 --- /dev/null +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-navigation-cross-origin.html.ini @@ -0,0 +1,5 @@ +[scroll-restoration-navigation-cross-origin.html] + type: testharness + [Navigating to new page should reset to "auto" and navigating back should restore and respect scroll restoration mode] + expected: FAIL + diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-navigation-samedoc.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-navigation-samedoc.html.ini new file mode 100644 index 00000000000..a83f5e92d92 --- /dev/null +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-navigation-samedoc.html.ini @@ -0,0 +1,5 @@ +[scroll-restoration-navigation-samedoc.html] + type: testharness + [history.{push,replace}State retain scroll restoration mode and navigation in the same document respects it] + expected: FAIL + diff --git a/tests/wpt/metadata/html/dom/interfaces.html.ini b/tests/wpt/metadata/html/dom/interfaces.html.ini index 113ec51d195..c6484c38c3a 100644 --- a/tests/wpt/metadata/html/dom/interfaces.html.ini +++ b/tests/wpt/metadata/html/dom/interfaces.html.ini @@ -9057,3 +9057,36 @@ [WebSocket interface: new WebSocket("ws://foo") must inherit property "extensions" with the proper type (10)] expected: FAIL + [HTMLLinkElement interface: attribute relList] + expected: FAIL + + [HTMLAnchorElement interface: attribute relList] + expected: FAIL + + [HTMLAreaElement interface: attribute relList] + expected: FAIL + + [History interface: attribute scrollRestoration] + expected: FAIL + + [History interface: window.history must inherit property "scrollRestoration" with the proper type (1)] + expected: FAIL + + [History interface: window.history must inherit property "state" with the proper type (2)] + expected: FAIL + + [History interface: window.history must inherit property "go" with the proper type (3)] + expected: FAIL + + [History interface: window.history must inherit property "back" with the proper type (4)] + expected: FAIL + + [History interface: window.history must inherit property "forward" with the proper type (5)] + expected: FAIL + + [History interface: window.history must inherit property "pushState" with the proper type (6)] + expected: FAIL + + [History interface: window.history must inherit property "replaceState" with the proper type (7)] + expected: FAIL + diff --git a/tests/wpt/metadata/html/semantics/embedded-content-0/media-elements/video_008.htm.ini b/tests/wpt/metadata/html/semantics/embedded-content-0/media-elements/video_008.htm.ini new file mode 100644 index 00000000000..4fa459700a7 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/embedded-content-0/media-elements/video_008.htm.ini @@ -0,0 +1,6 @@ +[video_008.htm] + type: testharness + expected: TIMEOUT + [HTML5 Media Elements: 'media' attribute] + expected: NOTRUN + diff --git a/tests/wpt/metadata/html/semantics/forms/the-input-element/checkbox.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/checkbox.html.ini index afdd08c6014..8c1a6388ba5 100644 --- a/tests/wpt/metadata/html/semantics/forms/the-input-element/checkbox.html.ini +++ b/tests/wpt/metadata/html/semantics/forms/the-input-element/checkbox.html.ini @@ -6,3 +6,6 @@ [canceled activation steps on unchecked checkbox (indeterminate=true in onclick)] expected: FAIL + [click on mutable checkbox fires a click event, then an input event, then a change event] + expected: FAIL + diff --git a/tests/wpt/metadata/html/semantics/forms/the-input-element/radio.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/radio.html.ini index 212ef8ec4a3..3abe4b7fbf8 100644 --- a/tests/wpt/metadata/html/semantics/forms/the-input-element/radio.html.ini +++ b/tests/wpt/metadata/html/semantics/forms/the-input-element/radio.html.ini @@ -1,5 +1,5 @@ [radio.html] type: testharness - [canceled activation steps on unchecked radio] + [click on mutable radio fires click event, then input event, then change event] expected: FAIL diff --git a/tests/wpt/metadata/html/webappapis/scripting/events/invalid-uncompiled-raw-handler-compiled-once.html.ini b/tests/wpt/metadata/html/webappapis/scripting/events/invalid-uncompiled-raw-handler-compiled-once.html.ini index 64e90b81cc2..0bdfff20821 100644 --- a/tests/wpt/metadata/html/webappapis/scripting/events/invalid-uncompiled-raw-handler-compiled-once.html.ini +++ b/tests/wpt/metadata/html/webappapis/scripting/events/invalid-uncompiled-raw-handler-compiled-once.html.ini @@ -1,6 +1,6 @@ [invalid-uncompiled-raw-handler-compiled-once.html] type: testharness note: remove inline-event-listener-panic.html when onerror is implemented properly. - [Invalid uncompiled raw handlers should only be compiled once.] expected: FAIL + diff --git a/tests/wpt/metadata/mozilla-sync b/tests/wpt/metadata/mozilla-sync index 920426dca89..f77bf2c935c 100644 --- a/tests/wpt/metadata/mozilla-sync +++ b/tests/wpt/metadata/mozilla-sync @@ -1 +1 @@ -6b1a08c051f3be4b7bc7e6200053dfa530ecd106 \ No newline at end of file +5942e9e3cb2fb588eb82198fd5548a42303a559f \ No newline at end of file diff --git a/tests/wpt/metadata/url/url-constructor.html.ini b/tests/wpt/metadata/url/url-constructor.html.ini index d3d842822bc..fb8ac6d4bbb 100644 --- a/tests/wpt/metadata/url/url-constructor.html.ini +++ b/tests/wpt/metadata/url/url-constructor.html.ini @@ -192,3 +192,6 @@ [Parsing: against ] expected: FAIL + [Parsing: against ] + expected: FAIL + diff --git a/tests/wpt/metadata/workers/nested_worker.worker.js.ini b/tests/wpt/metadata/workers/nested_worker.worker.js.ini index 0eebb6460c4..4a839a55bca 100644 --- a/tests/wpt/metadata/workers/nested_worker.worker.js.ini +++ b/tests/wpt/metadata/workers/nested_worker.worker.js.ini @@ -3,6 +3,7 @@ expected: TIMEOUT [Nested worker] expected: FAIL + [Checking contents for text file] expected: FAIL diff --git a/tests/wpt/web-platform-tests/DOMEvents/OWNERS b/tests/wpt/web-platform-tests/DOMEvents/OWNERS new file mode 100644 index 00000000000..50802902fb8 --- /dev/null +++ b/tests/wpt/web-platform-tests/DOMEvents/OWNERS @@ -0,0 +1,3 @@ +@jdm +@zqzhang +@Ms2ger diff --git a/tests/wpt/web-platform-tests/FileAPI/OWNERS b/tests/wpt/web-platform-tests/FileAPI/OWNERS new file mode 100644 index 00000000000..03bb9336574 --- /dev/null +++ b/tests/wpt/web-platform-tests/FileAPI/OWNERS @@ -0,0 +1,6 @@ +@inexorabletash +@plehegar +@zqzhang +@zcorpan +@jdm +@Ms2ger diff --git a/tests/wpt/web-platform-tests/IndexedDB/OWNERS b/tests/wpt/web-platform-tests/IndexedDB/OWNERS new file mode 100644 index 00000000000..711894a54b3 --- /dev/null +++ b/tests/wpt/web-platform-tests/IndexedDB/OWNERS @@ -0,0 +1,8 @@ +@Velmont +@inexorabletash +@chunywang +@dumbmatter +@zqzhang +@yunxiaoxie +@zhaozihao +@foolip diff --git a/tests/wpt/web-platform-tests/IndexedDB/idbindex_get7.htm b/tests/wpt/web-platform-tests/IndexedDB/idbindex_get7.htm index daf0f574968..e28fed4c591 100644 --- a/tests/wpt/web-platform-tests/IndexedDB/idbindex_get7.htm +++ b/tests/wpt/web-platform-tests/IndexedDB/idbindex_get7.htm @@ -17,13 +17,16 @@ var store = db.createObjectStore("store", { keyPath: "key" }); var index = store.createIndex("index", "indexedProperty"); store.add({ key: 1, indexedProperty: "data" }); + } + open_rq.onsuccess = function(e) { + db = e.target.result; + var tx = db.transaction('store'); + var index = tx.objectStore('store').index('index'); + tx.abort(); - e.target.transaction.abort(); - - assert_throws("InvalidStateError", function(){ + assert_throws("TransactionInactiveError", function(){ index.get("data"); }); t.done(); } - diff --git a/tests/wpt/web-platform-tests/IndexedDB/idbindex_get8.htm b/tests/wpt/web-platform-tests/IndexedDB/idbindex_get8.htm new file mode 100644 index 00000000000..ef67c6d6d22 --- /dev/null +++ b/tests/wpt/web-platform-tests/IndexedDB/idbindex_get8.htm @@ -0,0 +1,27 @@ + + +IDBIndex.get() - throw InvalidStateError on index deleted by aborted upgrade + + + + +
+ diff --git a/tests/wpt/web-platform-tests/IndexedDB/idbindex_getKey7.htm b/tests/wpt/web-platform-tests/IndexedDB/idbindex_getKey7.htm index f41f7635211..c949d39b3aa 100644 --- a/tests/wpt/web-platform-tests/IndexedDB/idbindex_getKey7.htm +++ b/tests/wpt/web-platform-tests/IndexedDB/idbindex_getKey7.htm @@ -17,13 +17,16 @@ var store = db.createObjectStore("store", { keyPath: "key" }); var index = store.createIndex("index", "indexedProperty"); store.add({ key: 1, indexedProperty: "data" }); + } + open_rq.onsuccess = function(e) { + db = e.target.result; + var tx = db.transaction('store'); + var index = tx.objectStore('store').index('index'); + tx.abort(); - e.target.transaction.abort(); - - assert_throws("InvalidStateError", function(){ + assert_throws("TransactionInactiveError", function(){ index.getKey("data"); }); t.done(); } - diff --git a/tests/wpt/web-platform-tests/IndexedDB/idbindex_getKey8.htm b/tests/wpt/web-platform-tests/IndexedDB/idbindex_getKey8.htm new file mode 100644 index 00000000000..e46f7bc3617 --- /dev/null +++ b/tests/wpt/web-platform-tests/IndexedDB/idbindex_getKey8.htm @@ -0,0 +1,27 @@ + + +IDBIndex.getKey() - throw InvalidStateError on index deleted by aborted upgrade + + + + +
+ diff --git a/tests/wpt/web-platform-tests/IndexedDB/idbindex_openCursor2.htm b/tests/wpt/web-platform-tests/IndexedDB/idbindex_openCursor2.htm index d39254055f1..7ce967e0b98 100644 --- a/tests/wpt/web-platform-tests/IndexedDB/idbindex_openCursor2.htm +++ b/tests/wpt/web-platform-tests/IndexedDB/idbindex_openCursor2.htm @@ -17,8 +17,12 @@ var store = db.createObjectStore("store", { keyPath: "key" }); var index = store.createIndex("index", "indexedProperty"); store.add({ key: 1, indexedProperty: "data" }); - - e.target.transaction.abort(); + } + open_rq.onsuccess = function(e) { + db = e.target.result; + var tx = db.transaction('store'); + var index = tx.objectStore('store').index('index'); + tx.abort(); assert_throws("TransactionInactiveError", function(){ index.openCursor(); @@ -26,4 +30,3 @@ t.done(); } - diff --git a/tests/wpt/web-platform-tests/IndexedDB/idbindex_openCursor3.htm b/tests/wpt/web-platform-tests/IndexedDB/idbindex_openCursor3.htm new file mode 100644 index 00000000000..fea479e9cc1 --- /dev/null +++ b/tests/wpt/web-platform-tests/IndexedDB/idbindex_openCursor3.htm @@ -0,0 +1,27 @@ + + +IDBIndex.openCursor() - throw InvalidStateError on index deleted by aborted upgrade + + + + +
+ diff --git a/tests/wpt/web-platform-tests/IndexedDB/idbindex_openKeyCursor3.htm b/tests/wpt/web-platform-tests/IndexedDB/idbindex_openKeyCursor3.htm index b4af3172417..f009cef49ac 100644 --- a/tests/wpt/web-platform-tests/IndexedDB/idbindex_openKeyCursor3.htm +++ b/tests/wpt/web-platform-tests/IndexedDB/idbindex_openKeyCursor3.htm @@ -17,8 +17,12 @@ var store = db.createObjectStore("store", { keyPath: "key" }); var index = store.createIndex("index", "indexedProperty"); store.add({ key: 1, indexedProperty: "data" }); - - e.target.transaction.abort(); + } + open_rq.onsuccess = function(e) { + db = e.target.result; + var tx = db.transaction('store'); + var index = tx.objectStore('store').index('index'); + tx.abort(); assert_throws("TransactionInactiveError", function(){ index.openKeyCursor(); @@ -26,4 +30,3 @@ t.done(); } - diff --git a/tests/wpt/web-platform-tests/IndexedDB/idbindex_openKeyCursor4.htm b/tests/wpt/web-platform-tests/IndexedDB/idbindex_openKeyCursor4.htm new file mode 100644 index 00000000000..bf134dff18a --- /dev/null +++ b/tests/wpt/web-platform-tests/IndexedDB/idbindex_openKeyCursor4.htm @@ -0,0 +1,27 @@ + + +IDBIndex.openKeyCursor() - throw InvalidStateError on index deleted by aborted upgrade + + + + +
+ diff --git a/tests/wpt/web-platform-tests/WebCryptoAPI/OWNERS b/tests/wpt/web-platform-tests/WebCryptoAPI/OWNERS new file mode 100644 index 00000000000..70190999b7c --- /dev/null +++ b/tests/wpt/web-platform-tests/WebCryptoAPI/OWNERS @@ -0,0 +1,2 @@ +@Wafflespeanut +@Ms2ger diff --git a/tests/wpt/web-platform-tests/XMLHttpRequest/OWNERS b/tests/wpt/web-platform-tests/XMLHttpRequest/OWNERS new file mode 100644 index 00000000000..7a809e70f6c --- /dev/null +++ b/tests/wpt/web-platform-tests/XMLHttpRequest/OWNERS @@ -0,0 +1,13 @@ +@ecoal95 +@hallvors +@kangxu +@caitp +@Manishearth +@plehegar +@foolip +@jungkees +@ibelem +@mathiasbynens +@ronkorving +@jdm +@Ms2ger diff --git a/tests/wpt/web-platform-tests/XMLHttpRequest/event-readystate-sync-open.htm b/tests/wpt/web-platform-tests/XMLHttpRequest/event-readystate-sync-open.htm new file mode 100644 index 00000000000..ae9697ea13a --- /dev/null +++ b/tests/wpt/web-platform-tests/XMLHttpRequest/event-readystate-sync-open.htm @@ -0,0 +1,33 @@ + + + + XMLHttpRequest: open() call fires sync readystate event + + + + + + +
+ + + diff --git a/tests/wpt/web-platform-tests/XMLHttpRequest/open-method-responsetype-set-sync.htm b/tests/wpt/web-platform-tests/XMLHttpRequest/open-method-responsetype-set-sync.htm index 543a1390cdd..0b4d814041c 100644 --- a/tests/wpt/web-platform-tests/XMLHttpRequest/open-method-responsetype-set-sync.htm +++ b/tests/wpt/web-platform-tests/XMLHttpRequest/open-method-responsetype-set-sync.htm @@ -4,7 +4,7 @@ XMLHttpRequest: open() sync request not allowed if responseType is set - + @@ -15,6 +15,9 @@ function request(type) { test(function() { var client = new XMLHttpRequest() + client.onreadystatechange = this.step_func(function(){ + assert_unreached('No events should fire here') + }) client.responseType = type assert_throws("InvalidAccessError", function() { client.open('GET', "...", false) }) }, document.title + " (" + type + ")") diff --git a/tests/wpt/web-platform-tests/XMLHttpRequest/responsexml-document-properties.htm b/tests/wpt/web-platform-tests/XMLHttpRequest/responsexml-document-properties.htm index ed53996dcec..a1bdc8e97db 100644 --- a/tests/wpt/web-platform-tests/XMLHttpRequest/responsexml-document-properties.htm +++ b/tests/wpt/web-platform-tests/XMLHttpRequest/responsexml-document-properties.htm @@ -43,7 +43,7 @@ } test(function() { - assert_true((new Date(client.getResponseHeader('Last-Modified'))).getTime() == (new Date(client.responseXML.lastModified)).getTime(), 'responseXML.lastModified time shoud be equal to time in response Last-Modified header') + assert_true((new Date(client.getResponseHeader('Last-Modified'))).getTime() == (new Date(client.responseXML.lastModified)).getTime(), 'responseXML.lastModified time should be equal to time in response Last-Modified header') }, 'lastModified set according to HTTP header') test(function() { diff --git a/tests/wpt/web-platform-tests/ambient-light/OWNERS b/tests/wpt/web-platform-tests/ambient-light/OWNERS new file mode 100644 index 00000000000..548c25a14da --- /dev/null +++ b/tests/wpt/web-platform-tests/ambient-light/OWNERS @@ -0,0 +1,3 @@ +@zqzhang +@Volker-E +@dontcallmedom diff --git a/tests/wpt/web-platform-tests/app-uri/OWNERS b/tests/wpt/web-platform-tests/app-uri/OWNERS new file mode 100644 index 00000000000..261dea7df72 --- /dev/null +++ b/tests/wpt/web-platform-tests/app-uri/OWNERS @@ -0,0 +1 @@ +@happyoungj diff --git a/tests/wpt/web-platform-tests/common/OWNERS b/tests/wpt/web-platform-tests/common/OWNERS new file mode 100644 index 00000000000..1da08cf4983 --- /dev/null +++ b/tests/wpt/web-platform-tests/common/OWNERS @@ -0,0 +1,4 @@ +@zqzhang +@foolip +@dontcallmedom +@deniak diff --git a/tests/wpt/web-platform-tests/conformance-checkers/OWNERS b/tests/wpt/web-platform-tests/conformance-checkers/OWNERS new file mode 100644 index 00000000000..2ac6145caa8 --- /dev/null +++ b/tests/wpt/web-platform-tests/conformance-checkers/OWNERS @@ -0,0 +1 @@ +@sideshowbarker diff --git a/tests/wpt/web-platform-tests/content-security-policy/OWNERS b/tests/wpt/web-platform-tests/content-security-policy/OWNERS new file mode 100644 index 00000000000..27348607493 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/OWNERS @@ -0,0 +1,2 @@ +@sideshowbarker +@hillbrad diff --git a/tests/wpt/web-platform-tests/cors/OWNERS b/tests/wpt/web-platform-tests/cors/OWNERS new file mode 100644 index 00000000000..c8979792445 --- /dev/null +++ b/tests/wpt/web-platform-tests/cors/OWNERS @@ -0,0 +1,5 @@ +@sideshowbarker +@zqzhang +@Velmont +@hillbrad +@jdm diff --git a/tests/wpt/web-platform-tests/cssom-view/OWNERS b/tests/wpt/web-platform-tests/cssom-view/OWNERS new file mode 100644 index 00000000000..cd9ff2eee4b --- /dev/null +++ b/tests/wpt/web-platform-tests/cssom-view/OWNERS @@ -0,0 +1 @@ +@AutomatedTester diff --git a/tests/wpt/web-platform-tests/cssom-view/negativeMargins.html b/tests/wpt/web-platform-tests/cssom-view/negativeMargins.html new file mode 100644 index 00000000000..0616e8b4999 --- /dev/null +++ b/tests/wpt/web-platform-tests/cssom-view/negativeMargins.html @@ -0,0 +1,32 @@ + + +cssom-view - elementFromPoint and elementsFromPoint dealing with negative margins + + + +
+
+ Hello +
+ + diff --git a/tests/wpt/web-platform-tests/custom-elements/OWNERS b/tests/wpt/web-platform-tests/custom-elements/OWNERS new file mode 100644 index 00000000000..4671167903f --- /dev/null +++ b/tests/wpt/web-platform-tests/custom-elements/OWNERS @@ -0,0 +1,3 @@ +@deepak-sa +@sgrekhov +@alsemenov diff --git a/tests/wpt/web-platform-tests/docs/OWNERS b/tests/wpt/web-platform-tests/docs/OWNERS new file mode 100644 index 00000000000..af3e0845c35 --- /dev/null +++ b/tests/wpt/web-platform-tests/docs/OWNERS @@ -0,0 +1,4 @@ +@sideshowbarker +@dontcallmedom +@zcorpan +@Ms2ger diff --git a/tests/wpt/web-platform-tests/dom/OWNERS b/tests/wpt/web-platform-tests/dom/OWNERS new file mode 100644 index 00000000000..fad498154e4 --- /dev/null +++ b/tests/wpt/web-platform-tests/dom/OWNERS @@ -0,0 +1,6 @@ +@ayg +@jdm +@Ms2ger +@plehegar +@zcorpan +@zqzhang diff --git a/tests/wpt/web-platform-tests/dom/historical.html b/tests/wpt/web-platform-tests/dom/historical.html index 727a9e73e5c..1f065ed4cd3 100644 --- a/tests/wpt/web-platform-tests/dom/historical.html +++ b/tests/wpt/web-platform-tests/dom/historical.html @@ -18,6 +18,7 @@ var nukedInterfaces = [ "DOMImplementationSource", "DOMLocator", "DOMObject", + "DOMSettableTokenList", "DOMUserData", "Entity", "EntityReference", diff --git a/tests/wpt/web-platform-tests/dom/interface-objects.html b/tests/wpt/web-platform-tests/dom/interface-objects.html index 6d250671dec..df4ca51e477 100644 --- a/tests/wpt/web-platform-tests/dom/interface-objects.html +++ b/tests/wpt/web-platform-tests/dom/interface-objects.html @@ -31,8 +31,7 @@ var interfaces = [ "NodeFilter", "NodeList", "HTMLCollection", - "DOMTokenList", - "DOMSettableTokenList" + "DOMTokenList" ]; test(function() { for (var p in window) { diff --git a/tests/wpt/web-platform-tests/dom/interfaces.html b/tests/wpt/web-platform-tests/dom/interfaces.html index cb368b357af..00cf70eb92d 100644 --- a/tests/wpt/web-platform-tests/dom/interfaces.html +++ b/tests/wpt/web-platform-tests/dom/interfaces.html @@ -283,7 +283,7 @@ interface Element : Node { attribute DOMString id; attribute DOMString className; - [SameObject] readonly attribute DOMTokenList classList; + [SameObject, PutForwards=value] readonly attribute DOMTokenList classList; boolean hasAttributes(); [SameObject] readonly attribute NamedNodeMap attributes; @@ -460,13 +460,12 @@ interface DOMTokenList { void add(DOMString... tokens); void remove(DOMString... tokens); boolean toggle(DOMString token, optional boolean force); + void replace(DOMString token, DOMString newToken); + boolean supports(DOMString token); + attribute DOMString value; stringifier; // iterable; }; - -interface DOMSettableTokenList : DOMTokenList { - attribute DOMString value; -}; diff --git a/tests/wpt/web-platform-tests/dom/nodes/Node-isEqualNode.html b/tests/wpt/web-platform-tests/dom/nodes/Node-isEqualNode.html new file mode 100644 index 00000000000..9ff4c5b03cc --- /dev/null +++ b/tests/wpt/web-platform-tests/dom/nodes/Node-isEqualNode.html @@ -0,0 +1,161 @@ + + +Node.prototype.isEqualNode + + + + + diff --git a/tests/wpt/web-platform-tests/domparsing/OWNERS b/tests/wpt/web-platform-tests/domparsing/OWNERS new file mode 100644 index 00000000000..113c79d205d --- /dev/null +++ b/tests/wpt/web-platform-tests/domparsing/OWNERS @@ -0,0 +1,5 @@ +@sideshowbarker +@ChrisParis +@deniak +@jdm +@Ms2ger diff --git a/tests/wpt/web-platform-tests/domxpath/OWNERS b/tests/wpt/web-platform-tests/domxpath/OWNERS new file mode 100644 index 00000000000..7c764a42450 --- /dev/null +++ b/tests/wpt/web-platform-tests/domxpath/OWNERS @@ -0,0 +1,3 @@ +@gsnedders +@zqzhang +@deniak diff --git a/tests/wpt/web-platform-tests/editing/OWNERS b/tests/wpt/web-platform-tests/editing/OWNERS new file mode 100644 index 00000000000..ce908c45b4a --- /dev/null +++ b/tests/wpt/web-platform-tests/editing/OWNERS @@ -0,0 +1 @@ +@ayg diff --git a/tests/wpt/web-platform-tests/encoding/OWNERS b/tests/wpt/web-platform-tests/encoding/OWNERS new file mode 100644 index 00000000000..4917e26650a --- /dev/null +++ b/tests/wpt/web-platform-tests/encoding/OWNERS @@ -0,0 +1,2 @@ +@inexorabletash +@sideshowbarker diff --git a/tests/wpt/web-platform-tests/eventsource/OWNERS b/tests/wpt/web-platform-tests/eventsource/OWNERS new file mode 100644 index 00000000000..4f8d605d71c --- /dev/null +++ b/tests/wpt/web-platform-tests/eventsource/OWNERS @@ -0,0 +1,5 @@ +@zqzhang +@sideshowbarker +@deniak +@Velmont +@Yaffle diff --git a/tests/wpt/web-platform-tests/fetch/OWNERS b/tests/wpt/web-platform-tests/fetch/OWNERS new file mode 100644 index 00000000000..fbeac366e3c --- /dev/null +++ b/tests/wpt/web-platform-tests/fetch/OWNERS @@ -0,0 +1,2 @@ +@jdm +@youennf diff --git a/tests/wpt/web-platform-tests/fetch/api/request/request-clone.sub.html b/tests/wpt/web-platform-tests/fetch/api/request/request-clone.sub.html index ae784564d70..40beb650390 100644 --- a/tests/wpt/web-platform-tests/fetch/api/request/request-clone.sub.html +++ b/tests/wpt/web-platform-tests/fetch/api/request/request-clone.sub.html @@ -11,7 +11,7 @@ diff --git a/tests/wpt/web-platform-tests/fetch/api/request/request-consume.html b/tests/wpt/web-platform-tests/fetch/api/request/request-consume.html index d0f756dc402..3c45ee6a288 100644 --- a/tests/wpt/web-platform-tests/fetch/api/request/request-consume.html +++ b/tests/wpt/web-platform-tests/fetch/api/request/request-consume.html @@ -84,6 +84,24 @@ checkRequestBody("This is request's body", "arrayBuffer", checkBodyArrayBuffer); checkRequestBody(JSON.stringify("This is request's body"), "json", checkBodyJSON); checkRequestBody(formData, "formData", checkBodyFormData); + + var goodJSONValues = ["null", "1", "true", "\"string\""]; + goodJSONValues.forEach(function(value) { + promise_test(function(test) { + var request = new Request("", {"method": "POST", "body": value}); + return request.json().then(function(v) { + assert_equals(v, JSON.parse(value)); + }); + }, "Consume JSON from text: '" + JSON.stringify(value) + "'"); + }); + + var badJSONValues = ["undefined", "{", "a", "["]; + badJSONValues.forEach(function(value) { + promise_test(function(test) { + var request = new Request("", {"method": "POST", "body": value}); + return promise_rejects(test, new SyntaxError(), request.json()); + }, "Trying to consume bad JSON text as JSON: '" + value + "'"); + }); diff --git a/tests/wpt/web-platform-tests/fetch/api/request/request-init-002.html b/tests/wpt/web-platform-tests/fetch/api/request/request-init-002.html index 46246c11eaf..baacc67e430 100644 --- a/tests/wpt/web-platform-tests/fetch/api/request/request-init-002.html +++ b/tests/wpt/web-platform-tests/fetch/api/request/request-init-002.html @@ -29,6 +29,9 @@ assert_throws(new TypeError(), function() { new Request("", {"method": "GET", "body": body}); } ); + assert_throws(new TypeError(), + function() { new Request("", {"method": "HEAD", "body": body}); } + ); var reqHeaders = request.headers; var mime = reqHeaders.get("Content-Type"); assert_true(mime && mime.search(bodyType) > -1, "Content-Type header should be \"" + bodyType + "\", not \"" + mime + "\""); @@ -36,7 +39,7 @@ //not equals: cannot guess formData exact value assert_true( bodyAsText.search(expectedTextBody) > -1, "Retrieve and verify request body"); }); - }, "Initialize Response's body with " + bodyType); + }, "Initialize Request's body with " + bodyType); } var blob = new Blob(["This is a blob"], {type: "application/octet-binary"}); @@ -55,7 +58,7 @@ } else { promise_test(function(test) { return Promise.reject("URLSearchParams not supported"); - }, "Initialize Response's body with application/x-www-form-urlencoded;charset=UTF-8"); + }, "Initialize Request's body with application/x-www-form-urlencoded;charset=UTF-8"); } diff --git a/tests/wpt/web-platform-tests/fetch/api/request/request-structure.html b/tests/wpt/web-platform-tests/fetch/api/request/request-structure.html index 2d7d4dba7bf..cbe6cee999f 100644 --- a/tests/wpt/web-platform-tests/fetch/api/request/request-structure.html +++ b/tests/wpt/web-platform-tests/fetch/api/request/request-structure.html @@ -51,7 +51,7 @@ break; case "headers": - request.headers = new Headers ( {"name":"value"} ); + request.headers = new Headers ({"name":"value"}); assert_false(request.headers.has("name"), "Headers attribute is read only"); return; break; @@ -117,16 +117,18 @@ "Attribute " + attributeToCheck + " is read only. Default value is " + defaultValue); } - for (var idx in methods) + for (var idx in methods) { test(function() { assert_true(methods[idx] in request, "request has " + methods[idx] + " method"); }, "Request has " + methods[idx] + " method"); + } - for (var idx in attributes) + for (var idx in attributes) { test(function() { assert_true(attributes[idx] in request, "request has " + attributes[idx] + " attribute"); IsreadOnly(request, attributes[idx]); }, "Check " + attributes[idx] + " attribute"); + } diff --git a/tests/wpt/web-platform-tests/gamepad/OWNERS b/tests/wpt/web-platform-tests/gamepad/OWNERS new file mode 100644 index 00000000000..d7fbc2625bd --- /dev/null +++ b/tests/wpt/web-platform-tests/gamepad/OWNERS @@ -0,0 +1 @@ +@luser diff --git a/tests/wpt/web-platform-tests/geolocation-API/OWNERS b/tests/wpt/web-platform-tests/geolocation-API/OWNERS new file mode 100644 index 00000000000..64e2488b4ba --- /dev/null +++ b/tests/wpt/web-platform-tests/geolocation-API/OWNERS @@ -0,0 +1,2 @@ +@zqzhang +@jdm diff --git a/tests/wpt/web-platform-tests/hr-time/OWNERS b/tests/wpt/web-platform-tests/hr-time/OWNERS new file mode 100644 index 00000000000..ffa09d9ade9 --- /dev/null +++ b/tests/wpt/web-platform-tests/hr-time/OWNERS @@ -0,0 +1,2 @@ +@plehegar +@foolip diff --git a/tests/wpt/web-platform-tests/html-imports/OWNERS b/tests/wpt/web-platform-tests/html-imports/OWNERS new file mode 100644 index 00000000000..edda46755d6 --- /dev/null +++ b/tests/wpt/web-platform-tests/html-imports/OWNERS @@ -0,0 +1 @@ +@omo diff --git a/tests/wpt/web-platform-tests/html-longdesc/OWNERS b/tests/wpt/web-platform-tests/html-longdesc/OWNERS new file mode 100644 index 00000000000..91527fa2ac9 --- /dev/null +++ b/tests/wpt/web-platform-tests/html-longdesc/OWNERS @@ -0,0 +1,2 @@ +@chaals +@cptvitamin diff --git a/tests/wpt/web-platform-tests/html-media-capture/OWNERS b/tests/wpt/web-platform-tests/html-media-capture/OWNERS new file mode 100644 index 00000000000..b45f53558b6 --- /dev/null +++ b/tests/wpt/web-platform-tests/html-media-capture/OWNERS @@ -0,0 +1,2 @@ +@haoxli +@zqzhang diff --git a/tests/wpt/web-platform-tests/html/OWNERS b/tests/wpt/web-platform-tests/html/OWNERS index 210a621c919..ef22027135b 100644 --- a/tests/wpt/web-platform-tests/html/OWNERS +++ b/tests/wpt/web-platform-tests/html/OWNERS @@ -1,5 +1,6 @@ @Ms2ger @gsnedders +@jdm @jgraham @plehegar @sideshowbarker diff --git a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/resources/blank1.html b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/resources/blank1.html new file mode 100644 index 00000000000..6b4df1ef2fc --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/resources/blank1.html @@ -0,0 +1,8 @@ + + + Blank 1 \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/resources/blank2.html b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/resources/blank2.html new file mode 100644 index 00000000000..def21396675 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/resources/blank2.html @@ -0,0 +1,8 @@ + + + Blank 2 diff --git a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/resources/page-with-fragment.html b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/resources/page-with-fragment.html new file mode 100644 index 00000000000..11737661d0f --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/resources/page-with-fragment.html @@ -0,0 +1,20 @@ + + + +Page with fragment + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-basic.html b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-basic.html new file mode 100644 index 00000000000..e47cd9c3833 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-basic.html @@ -0,0 +1,34 @@ + +Verify existence and basic read/write function of history.scrollRestoration + + + + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html new file mode 100644 index 00000000000..e3da59e3900 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html @@ -0,0 +1,67 @@ + + +Precedence of scroll restoration mode over fragment scrolling in cross-origin history traversal + + + + + + + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-samedoc.html b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-samedoc.html new file mode 100644 index 00000000000..d837b8f63f0 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-samedoc.html @@ -0,0 +1,54 @@ + + + + + + + + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-navigation-cross-origin.html b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-navigation-cross-origin.html new file mode 100644 index 00000000000..87a337b2da3 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-navigation-cross-origin.html @@ -0,0 +1,71 @@ + + +Correct behaviour of scroll restoration mode is cross origin history traversal + + + + + + + + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-navigation-samedoc.html b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-navigation-samedoc.html new file mode 100644 index 00000000000..46d40eedc62 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-navigation-samedoc.html @@ -0,0 +1,81 @@ + +Correct behaviour of scroll restoration mode in same document history traversals + + + + + + + diff --git a/tests/wpt/web-platform-tests/html/dom/interfaces.html b/tests/wpt/web-platform-tests/html/dom/interfaces.html index 8eb7df805fb..598f99f5a23 100644 --- a/tests/wpt/web-platform-tests/html/dom/interfaces.html +++ b/tests/wpt/web-platform-tests/html/dom/interfaces.html @@ -285,7 +285,7 @@ interface Element : Node { attribute DOMString id; attribute DOMString className; - [SameObject] readonly attribute DOMTokenList classList; + [SameObject, PutForwards=value] readonly attribute DOMTokenList classList; boolean hasAttributes(); [SameObject] readonly attribute NamedNodeMap attributes; @@ -462,14 +462,12 @@ interface DOMTokenList { void add(DOMString... tokens); void remove(DOMString... tokens); boolean toggle(DOMString token, optional boolean force); + void replace(DOMString token, DOMString newToken); + boolean supports(DOMString token); + attribute DOMString value; stringifier; // iterable; -}; - -interface DOMSettableTokenList : DOMTokenList { - attribute DOMString value; -}; - +}; + + + + + + + diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/lists/li-type-supported-ref.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/lists/li-type-supported-ref.html index 3e76576f76c..0de7ff329c2 100644 --- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/lists/li-type-supported-ref.html +++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/lists/li-type-supported-ref.html @@ -19,7 +19,7 @@
  • fifth item
  • sixth item
  • seventh item
  • -
  • eigth item
  • +
  • eighth item
  • ninth item
    1. first ordered item
    2. @@ -29,7 +29,7 @@
    3. fifth ordered item
    4. sixth ordered item
    5. seventh ordered item
    6. -
    7. eigth ordered item
    8. +
    9. eighth ordered item
    10. ninth ordered item
      @@ -40,6 +40,6 @@
    • fifth unordered item
    • sixth unordered item
    • seventh unordered item
    • -
    • eigth unordered item
    • +
    • eighth unordered item
    • ninth unordered item
    diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/lists/li-type-supported.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/lists/li-type-supported.html index 0fe85bd0492..ddd9024c117 100644 --- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/lists/li-type-supported.html +++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/lists/li-type-supported.html @@ -9,7 +9,7 @@
  • fifth item
  • sixth item
  • seventh item
  • -
  • eigth item
  • +
  • eighth item
  • ninth item
    1. first ordered item
    2. @@ -19,7 +19,7 @@
    3. fifth ordered item
    4. sixth ordered item
    5. seventh ordered item
    6. -
    7. eigth ordered item
    8. +
    9. eighth ordered item
    10. ninth ordered item
      @@ -30,6 +30,6 @@
    • fifth unordered item
    • sixth unordered item
    • seventh unordered item
    • -
    • eigth unordered item
    • +
    • eighth unordered item
    • ninth unordered item
    diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/lists/li-type-supported.xhtml b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/lists/li-type-supported.xhtml index 69f96e894bf..7a7640e03f0 100644 --- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/lists/li-type-supported.xhtml +++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/lists/li-type-supported.xhtml @@ -12,7 +12,7 @@
  • fifth item
  • sixth item
  • seventh item
  • -
  • eigth item
  • +
  • eighth item
  • ninth item
    1. first ordered item
    2. @@ -22,7 +22,7 @@
    3. fifth ordered item
    4. sixth ordered item
    5. seventh ordered item
    6. -
    7. eigth ordered item
    8. +
    9. eighth ordered item
    10. ninth ordered item
      @@ -33,7 +33,7 @@
    • fifth unordered item
    • sixth unordered item
    • seventh unordered item
    • -
    • eigth unordered item
    • +
    • eighth unordered item
    • ninth unordered item
    diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content-0/media-elements/video_008.htm b/tests/wpt/web-platform-tests/html/semantics/embedded-content-0/media-elements/video_008.htm new file mode 100644 index 00000000000..dff49d82418 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content-0/media-elements/video_008.htm @@ -0,0 +1,45 @@ + + + + HTML5 Media Elements: 'media' attribute + + + + + + + + + + +
    + + + + diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/historical.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/historical.html index 408bb21b7a9..99f18b69fc7 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/historical.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/historical.html @@ -22,7 +22,6 @@ t('loopCount'); // added in r692, replaced with playCount in r1105. t('currentLoop'); // added in r692, removed in r2401. t('addCuePoint'); // added in r721, replaced with addCueRange in r1106. t('removeCuePoint'); // added in r721, replaced with removeCueRanges in r1106. -t('media', 'source'); // added in r724, removed in r8472. t('playCount'); // added in r1105, removed in r2401. t('addCueRange'); // added in r1106, removed in r5070. t('removeCueRanges'); // added in r1106, removed in r5070. diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-document.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-document.html index 3dba394baa5..3d44678cf16 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-document.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-document.html @@ -3,13 +3,15 @@ HTML Test: The embed element represents a document - diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-button-element/button-events.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-button-element/button-events.html index 74b48e92100..9d308bbed3c 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/the-button-element/button-events.html +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-button-element/button-events.html @@ -23,25 +23,25 @@ var btn = document.getElementById("btn"), document.forms.fm1.onsubmit = t1.step_func(function (evt) { evt.preventDefault(); - assert_true(evt.isTrusted, "The isTrusted attribute of the submit event shoud be true."); - assert_true(evt.bubbles, "The bubbles attribute of the submit event shoud be true."); - assert_true(evt.cancelable, "The cancelable attribute of the submit event shoud be true."); + assert_true(evt.isTrusted, "The isTrusted attribute of the submit event should be true."); + assert_true(evt.bubbles, "The bubbles attribute of the submit event should be true."); + assert_true(evt.cancelable, "The cancelable attribute of the submit event should be true."); assert_true(evt instanceof Event, "The submit event is an instance of Event interface."); t1.done(); }); document.forms.fm1.onreset = t2.step_func(function (evt) { - assert_true(evt.isTrusted, "The isTrusted attribute of the reset event shoud be true."); - assert_true(evt.bubbles, "The bubbles attribute of the reset event shoud be true."); - assert_true(evt.cancelable, "The cancelable attribute of the reset event shoud be true."); + assert_true(evt.isTrusted, "The isTrusted attribute of the reset event should be true."); + assert_true(evt.bubbles, "The bubbles attribute of the reset event should be true."); + assert_true(evt.cancelable, "The cancelable attribute of the reset event should be true."); assert_true(evt instanceof Event, "The reset event is an instance of Event interface."); t2.done(); }); document.getElementById("menu").onshow = t3.step_func(function (evt) { - assert_true(evt.isTrusted, "The isTrusted attribute of the show event shoud be true."); + assert_true(evt.isTrusted, "The isTrusted attribute of the show event should be true."); assert_equals(evt.relatedTarget, menu_btn, "The relatedTarget attribute should be initialized to the related button element."); - assert_true(evt.cancelable, "The cancelable attribute of the show event shoud be true."); + assert_true(evt.cancelable, "The cancelable attribute of the show event should be true."); assert_true(evt instanceof RelatedEvent, "The show event is an instance of RelatedEvent interface."); t3.done(); }); diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/checkbox.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/checkbox.html index 12f253d67c4..d9d3ec9cf93 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/checkbox.html +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/checkbox.html @@ -2,7 +2,8 @@ input type checkbox - + +
    @@ -19,28 +20,39 @@ checkbox4 = document.getElementById('checkbox4'), checkbox5 = document.getElementById('checkbox5'), checkbox6 = document.getElementById('checkbox6'), - c1_input_fired = false, c1_change_fired = false, - t1 = async_test("click on mutable checkbox fires the input and change events"), + c1_click_fired = false, + c1_input_fired = false, + c1_change_fired = false, + t1 = async_test("click on mutable checkbox fires a click event, then an input event, then a change event"), t2 = async_test("click on non-mutable checkbox doesn't fire the input or change event"), t3 = async_test("pre-activation steps on unchecked checkbox"), t4 = async_test("pre-activation steps on checked checkbox"), t5 = async_test("canceled activation steps on unchecked checkbox"), t6 = async_test("canceled activation steps on unchecked checkbox (indeterminate=true in onclick)"); - checkbox1.oninput= t1.step_func(function(e) { + checkbox1.onclick = t1.step_func(function () { + c1_click_fired = true; + assert_false(c1_input_fired, "click event should fire before input event"); + assert_false(c1_change_fired, "click event should fire before change event"); + }); + checkbox1.oninput = t1.step_func(function(e) { c1_input_fired = true; + assert_true(c1_click_fired, "input event should fire after click event"); + assert_false(c1_change_fired, "input event should fire before change event"); assert_true(e.bubbles, "event should bubble"); - assert_true(e.isTrusted, "event should be trusted"); - assert_false(e.cancelable, "event shoud not be cancelable"); + assert_false(e.isTrusted, "click()-initiated event should be trusted"); + assert_false(e.cancelable, "event should not be cancelable"); assert_true(checkbox1.checked, "checkbox is checked"); assert_false(checkbox1.indeterminate, "checkbox is not indeterminate"); }); checkbox1.onchange = t1.step_func(function(e) { c1_change_fired = true; + assert_true(c1_click_fired, "change event should fire after click event"); + assert_true(c1_input_fired, "change event should fire after input event"); assert_true(e.bubbles, "event should bubble") - assert_true(e.isTrusted, "event should be trusted"); - assert_false(e.cancelable, "event shoud not be cancelable"); + assert_false(e.isTrusted, "click()-initiated event should be trusted"); + assert_false(e.cancelable, "event should not be cancelable"); assert_true(checkbox1.checked, "checkbox is checked"); assert_false(checkbox1.indeterminate, "checkbox is not indeterminate"); }); diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/file-manual.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/file-manual.html index 3340239881b..9e2d47c423d 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/file-manual.html +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/file-manual.html @@ -18,12 +18,12 @@ document.getElementById('file').oninput = t1.step_func_done(function(e) { assert_true(e.bubbles, "input event bubbles"); assert_true(e.isTrusted, "input event should be trusted"); - assert_false(e.cancelable, "input event shoud not be cancelable"); + assert_false(e.cancelable, "input event should not be cancelable"); }) document.getElementById('file').onchange = t2.step_func_done(function(e) { assert_true(e.bubbles, "change event bubbles"); assert_true(e.isTrusted, "change event should be trusted"); - assert_false(e.cancelable, "change event shoud not be cancelable"); + assert_false(e.cancelable, "change event should not be cancelable"); assert_true(input.files instanceof FileList); assert_equals(input.value, "C:\\fakepath\\" + input.files[0].name); }) diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/radio.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/radio.html index 3c4fea2a617..8eaec42e9cf 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/radio.html +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/radio.html @@ -15,8 +15,8 @@ - - + + @@ -37,8 +37,7 @@ radio9 = document.getElementById('radio9'), radio10 = document.getElementById('radio10'), radio11 = document.getElementById('radio11'), - t1 = async_test("click on mutable radio fires the input event"), - t2 = async_test("click on mutable radio fires the change event"), + t1 = async_test("click on mutable radio fires click event, then input event, then change event"), t3 = async_test("click on non-mutable radio doesn't fire the input event"), t4 = async_test("click on non-mutable radio doesn't fire the change event"), t5 = async_test("canceled activation steps on unchecked radio"), @@ -80,18 +79,28 @@ assert_false(radio11.checked); }, "changing the name of a radio input element and setting its checkedness to true makes all the other elements' checkedness in the same radio button group be set to false"); - radio5.oninput= t1.step_func(function(e) { - input_fired = true; - assert_true(e.bubbles, "event should bubble") - assert_true(e.isTrusted, "event should be trusted"); - assert_false(e.cancelable, "event shoud not be cancelable"); + radio5.onclick = t1.step_func(function(e) { + click_fired = true; + assert_false(input_fired, "click event should fire before input event"); + assert_false(change_fired, "click event should fire before change event"); }); - radio5.onchange = t2.step_func(function(e) { + radio5.oninput = t1.step_func(function(e) { + input_fired = true; + assert_true(click_fired, "input event should fire after click event"); + assert_false(change_fired, "input event should fire before change event"); + assert_true(e.bubbles, "input event should bubble") + assert_false(e.isTrusted, "click()-initiated input event shouldn't be trusted"); + assert_false(e.cancelable, "input event should not be cancelable"); + }); + + radio5.onchange = t1.step_func(function(e) { change_fired = true; - assert_true(e.bubbles, "event should bubble") - assert_true(e.isTrusted, "event should be trusted"); - assert_false(e.cancelable, "event shoud not be cancelable"); + assert_true(click_fired, "change event should fire after click event"); + assert_true(input_fired, "change event should fire after input event"); + assert_true(e.bubbles, "change event should bubble") + assert_false(e.isTrusted, "click()-initiated change event shouldn't be trusted"); + assert_false(e.cancelable, "change event should not be cancelable"); }); radio6.oninput= t3.step_func_done(function(e) { @@ -108,11 +117,6 @@ t1.done(); }); - t2.step(function() { - assert_true(change_fired); - t2.done(); - }) - t3.step(function(){ radio6.click(); t3.done(); @@ -120,18 +124,20 @@ }); radio72.onclick = t5.step_func_done(function(e){ - assert_false(radio71.checked); - assert_true(radio72.checked); + assert_false(radio71.checked, "click on radio should uncheck other radio in same group"); + assert_true(radio72.checked, "click on radio should check that radio"); e.preventDefault(); - assert_false(radio71.checked); - assert_true(radio72.checked); + // The cancelation of the click doesn't have an effect until after all the click event handlers have been run. + assert_false(radio71.checked, "radio remains unchecked immediately after click event on other radio in same group is canceled"); + assert_true(radio72.checked, "clicked radio remains checked immediately after click event is canceled"); }); t5.step(function(){ - assert_true(radio71.checked); - assert_false(radio72.checked); + assert_true(radio71.checked, "initially checked radio should be checked"); + assert_false(radio72.checked, "other radios in same group as initially-checked radio should be unchecked"); radio72.click(); - assert_true(radio71.checked); - assert_false(radio72.checked); + // Now that the click event has been fully dispatched, its cancelation has taken effect. + assert_true(radio71.checked, "canceled click event on radio should leave the previously-checked radio checked"); + assert_false(radio72.checked, "canceled click event on previously-unchecked radio should leave that radio unchecked"); }); diff --git a/tests/wpt/web-platform-tests/images/OWNERS b/tests/wpt/web-platform-tests/images/OWNERS new file mode 100644 index 00000000000..8ab38aed331 --- /dev/null +++ b/tests/wpt/web-platform-tests/images/OWNERS @@ -0,0 +1,2 @@ +@zqzhang +@tagawa diff --git a/tests/wpt/web-platform-tests/media-source/OWNERS b/tests/wpt/web-platform-tests/media-source/OWNERS new file mode 100644 index 00000000000..3b36dfa39a2 --- /dev/null +++ b/tests/wpt/web-platform-tests/media-source/OWNERS @@ -0,0 +1,4 @@ +@bit +@acolwell +@shishimaru +@sideshowbarker diff --git a/tests/wpt/web-platform-tests/media/OWNERS b/tests/wpt/web-platform-tests/media/OWNERS new file mode 100644 index 00000000000..96fa9523d7b --- /dev/null +++ b/tests/wpt/web-platform-tests/media/OWNERS @@ -0,0 +1,2 @@ +@hillbrad +@foolip diff --git a/tests/wpt/web-platform-tests/mediacapture-streams/OWNERS b/tests/wpt/web-platform-tests/mediacapture-streams/OWNERS new file mode 100644 index 00000000000..03ff57c28fd --- /dev/null +++ b/tests/wpt/web-platform-tests/mediacapture-streams/OWNERS @@ -0,0 +1,3 @@ +@dontcallmedom +@alvestrand + diff --git a/tests/wpt/web-platform-tests/mixed-content/OWNERS b/tests/wpt/web-platform-tests/mixed-content/OWNERS new file mode 100644 index 00000000000..db2d613c226 --- /dev/null +++ b/tests/wpt/web-platform-tests/mixed-content/OWNERS @@ -0,0 +1 @@ +@kristijanburnik diff --git a/tests/wpt/web-platform-tests/navigation-timing/OWNERS b/tests/wpt/web-platform-tests/navigation-timing/OWNERS new file mode 100644 index 00000000000..ffa09d9ade9 --- /dev/null +++ b/tests/wpt/web-platform-tests/navigation-timing/OWNERS @@ -0,0 +1,2 @@ +@plehegar +@foolip diff --git a/tests/wpt/web-platform-tests/notifications/OWNERS b/tests/wpt/web-platform-tests/notifications/OWNERS new file mode 100644 index 00000000000..992402311a2 --- /dev/null +++ b/tests/wpt/web-platform-tests/notifications/OWNERS @@ -0,0 +1,4 @@ +@chunywang +@sideshowbarker +@xinliux +@ibelem diff --git a/tests/wpt/web-platform-tests/old-tests/submission/Microsoft/sandbox/sandbox_011.htm b/tests/wpt/web-platform-tests/old-tests/submission/Microsoft/sandbox/sandbox_011.htm index 0427ec0783e..ce3ee1a7d01 100644 --- a/tests/wpt/web-platform-tests/old-tests/submission/Microsoft/sandbox/sandbox_011.htm +++ b/tests/wpt/web-platform-tests/old-tests/submission/Microsoft/sandbox/sandbox_011.htm @@ -1,11 +1,11 @@ - HTML5 Sandbox: iframe sandbox attribute value support DOMSettableTokenList interface. + HTML5 Sandbox: iframe sandbox attribute value support DOMTokenList interface. - + @@ -13,53 +13,53 @@
    diff --git a/tests/wpt/web-platform-tests/page-visibility/OWNERS b/tests/wpt/web-platform-tests/page-visibility/OWNERS new file mode 100644 index 00000000000..ffa09d9ade9 --- /dev/null +++ b/tests/wpt/web-platform-tests/page-visibility/OWNERS @@ -0,0 +1,2 @@ +@plehegar +@foolip diff --git a/tests/wpt/web-platform-tests/performance-timeline/OWNERS b/tests/wpt/web-platform-tests/performance-timeline/OWNERS new file mode 100644 index 00000000000..5a05f35799c --- /dev/null +++ b/tests/wpt/web-platform-tests/performance-timeline/OWNERS @@ -0,0 +1 @@ +@plehegar diff --git a/tests/wpt/web-platform-tests/pointerevents/OWNERS b/tests/wpt/web-platform-tests/pointerevents/OWNERS new file mode 100644 index 00000000000..af346a9323f --- /dev/null +++ b/tests/wpt/web-platform-tests/pointerevents/OWNERS @@ -0,0 +1,7 @@ +@bethge +@Steditor +@EvgenyAgafonchikov +@jacobrossi +@plehegar +@scottgonzalez +@staktrace diff --git a/tests/wpt/web-platform-tests/pointerlock/OWNERS b/tests/wpt/web-platform-tests/pointerlock/OWNERS new file mode 100644 index 00000000000..5a05f35799c --- /dev/null +++ b/tests/wpt/web-platform-tests/pointerlock/OWNERS @@ -0,0 +1 @@ +@plehegar diff --git a/tests/wpt/web-platform-tests/proximity/OWNERS b/tests/wpt/web-platform-tests/proximity/OWNERS new file mode 100644 index 00000000000..7fab6d626aa --- /dev/null +++ b/tests/wpt/web-platform-tests/proximity/OWNERS @@ -0,0 +1,2 @@ +@zqzhang +@dontcallmedom diff --git a/tests/wpt/web-platform-tests/quirks-mode/OWNERS b/tests/wpt/web-platform-tests/quirks-mode/OWNERS new file mode 100644 index 00000000000..63851614695 --- /dev/null +++ b/tests/wpt/web-platform-tests/quirks-mode/OWNERS @@ -0,0 +1 @@ +@zcorpan diff --git a/tests/wpt/web-platform-tests/referrer-policy/OWNERS b/tests/wpt/web-platform-tests/referrer-policy/OWNERS new file mode 100644 index 00000000000..db2d613c226 --- /dev/null +++ b/tests/wpt/web-platform-tests/referrer-policy/OWNERS @@ -0,0 +1 @@ +@kristijanburnik diff --git a/tests/wpt/web-platform-tests/resource-timing/OWNERS b/tests/wpt/web-platform-tests/resource-timing/OWNERS new file mode 100644 index 00000000000..29f407cf1e0 --- /dev/null +++ b/tests/wpt/web-platform-tests/resource-timing/OWNERS @@ -0,0 +1,3 @@ +@haoxli +@plehegar +@zqzhang diff --git a/tests/wpt/web-platform-tests/screen-orientation/OWNERS b/tests/wpt/web-platform-tests/screen-orientation/OWNERS new file mode 100644 index 00000000000..bbdded8fff9 --- /dev/null +++ b/tests/wpt/web-platform-tests/screen-orientation/OWNERS @@ -0,0 +1 @@ +@haoxli diff --git a/tests/wpt/web-platform-tests/selection/OWNERS b/tests/wpt/web-platform-tests/selection/OWNERS new file mode 100644 index 00000000000..ce908c45b4a --- /dev/null +++ b/tests/wpt/web-platform-tests/selection/OWNERS @@ -0,0 +1 @@ +@ayg diff --git a/tests/wpt/web-platform-tests/selectors/attribute-selectors/attribute-case/cssom.html b/tests/wpt/web-platform-tests/selectors/attribute-selectors/attribute-case/cssom.html index 4b1c7d3bcc1..af5de10eb9d 100644 --- a/tests/wpt/web-platform-tests/selectors/attribute-selectors/attribute-case/cssom.html +++ b/tests/wpt/web-platform-tests/selectors/attribute-selectors/attribute-case/cssom.html @@ -41,13 +41,6 @@ tests.forEach(function(arr) { assert_equals(sheet.cssRules[0].cssText.substr(0, expected.length), expected); }, input + ' getting CSSRule#cssText' + use_media); - test(function() { - var sheet = new_sheet(use_media); - sheet.insertRule('before_set {}', 0); - sheet.cssRules[0].cssText = input + ' {}'; - assert_equals(sheet.cssRules[0].cssText.substr(0, expected.length), expected); - }, input + ' setting CSSRule#cssText' + use_media); - test(function() { var sheet = new_sheet(use_media); sheet.insertRule(input + ' {}', 0); diff --git a/tests/wpt/web-platform-tests/service-workers/OWNERS b/tests/wpt/web-platform-tests/service-workers/OWNERS new file mode 100644 index 00000000000..e210b8f2d4c --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/OWNERS @@ -0,0 +1 @@ +@ehsan diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/OWNERS b/tests/wpt/web-platform-tests/service-workers/cache-storage/OWNERS new file mode 100644 index 00000000000..2e63dd2203e --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/OWNERS @@ -0,0 +1,2 @@ +@inexorabletash +@wanderview diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/resources/test-helpers.js b/tests/wpt/web-platform-tests/service-workers/cache-storage/resources/test-helpers.js index 91110950d56..f4145e6217f 100644 --- a/tests/wpt/web-platform-tests/service-workers/cache-storage/resources/test-helpers.js +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/resources/test-helpers.js @@ -35,3 +35,203 @@ function cache_test(test_function, description) { .then(test_function); }, description); } + +// A set of Request/Response pairs to be used with prepopulated_cache_test(). +var simple_entries = [ + { + name: 'a', + request: new Request('http://example.com/a'), + response: new Response('') + }, + + { + name: 'b', + request: new Request('http://example.com/b'), + response: new Response('') + }, + + { + name: 'a_with_query', + request: new Request('http://example.com/a?q=r'), + response: new Response('') + }, + + { + name: 'A', + request: new Request('http://example.com/A'), + response: new Response('') + }, + + { + name: 'a_https', + request: new Request('https://example.com/a'), + response: new Response('') + }, + + { + name: 'a_org', + request: new Request('http://example.org/a'), + response: new Response('') + }, + + { + name: 'cat', + request: new Request('http://example.com/cat'), + response: new Response('') + }, + + { + name: 'catmandu', + request: new Request('http://example.com/catmandu'), + response: new Response('') + }, + + { + name: 'cat_num_lives', + request: new Request('http://example.com/cat?lives=9'), + response: new Response('') + }, + + { + name: 'cat_in_the_hat', + request: new Request('http://example.com/cat/in/the/hat'), + response: new Response('') + }, + + { + name: 'non_2xx_response', + request: new Request('http://example.com/non2xx'), + response: new Response('', {status: 404, statusText: 'nope'}) + }, + + { + name: 'error_response', + request: new Request('http://example.com/error'), + response: Response.error() + }, +]; + +// A set of Request/Response pairs to be used with prepopulated_cache_test(). +// These contain a mix of test cases that use Vary headers. +var vary_entries = [ + { + name: 'vary_cookie_is_cookie', + request: new Request('http://example.com/c', + {headers: {'Cookies': 'is-for-cookie'}}), + response: new Response('', + {headers: {'Vary': 'Cookies'}}) + }, + + { + name: 'vary_cookie_is_good', + request: new Request('http://example.com/c', + {headers: {'Cookies': 'is-good-enough-for-me'}}), + response: new Response('', + {headers: {'Vary': 'Cookies'}}) + }, + + { + name: 'vary_cookie_absent', + request: new Request('http://example.com/c'), + response: new Response('', + {headers: {'Vary': 'Cookies'}}) + } +]; + +// Run |test_function| with a Cache object and a map of entries. Prior to the +// call, the Cache is populated by cache entries from |entries|. The latter is +// expected to be an Object mapping arbitrary keys to objects of the form +// {request: , response: }. There's no +// guarantee on the order in which entries will be added to the cache. +// +// |test_function| should return a Promise that can be used with promise_test. +function prepopulated_cache_test(entries, test_function, description) { + cache_test(function(cache) { + var p = Promise.resolve(); + var hash = {}; + return Promise.all(entries.map(function(entry) { + hash[entry.name] = entry; + return cache.put(entry.request.clone(), + entry.response.clone()) + .catch(function(e) { + assert_unreached( + 'Test setup failed for entry ' + entry.name + ': ' + e); + }); + })) + .then(function() { + assert_equals(Object.keys(hash).length, entries.length); + }) + .then(function() { + return test_function(cache, hash); + }); + }, description); +} + +// Helper for testing with Headers objects. Compares Headers instances +// by serializing |expected| and |actual| to arrays and comparing. +function assert_header_equals(actual, expected, description) { + assert_class_string(actual, "Headers", description); + var header; + var actual_headers = []; + var expected_headers = []; + for (header of actual) + actual_headers.push(header[0] + ": " + header[1]); + for (header of expected) + expected_headers.push(header[0] + ": " + header[1]); + assert_array_equals(actual_headers, expected_headers, + description + " Headers differ."); +} + +// Helper for testing with Response objects. Compares simple +// attributes defined on the interfaces, as well as the headers. It +// does not compare the response bodies. +function assert_response_equals(actual, expected, description) { + assert_class_string(actual, "Response", description); + ["type", "url", "status", "ok", "statusText"].forEach(function(attribute) { + assert_equals(actual[attribute], expected[attribute], + description + " Attributes differ: " + attribute + "."); + }); + assert_header_equals(actual.headers, expected.headers, description); +} + +// Assert that the two arrays |actual| and |expected| contain the same +// set of Responses as determined by assert_response_equals. The order +// is not significant. +// +// |expected| is assumed to not contain any duplicates. +function assert_response_array_equivalent(actual, expected, description) { + assert_true(Array.isArray(actual), description); + assert_equals(actual.length, expected.length, description); + expected.forEach(function(expected_element) { + // assert_response_in_array treats the first argument as being + // 'actual', and the second as being 'expected array'. We are + // switching them around because we want to be resilient + // against the |actual| array containing duplicates. + assert_response_in_array(expected_element, actual, description); + }); +} + +// Asserts that two arrays |actual| and |expected| contain the same +// set of Responses as determined by assert_response_equals(). The +// corresponding elements must occupy corresponding indices in their +// respective arrays. +function assert_response_array_equals(actual, expected, description) { + assert_true(Array.isArray(actual), description); + assert_equals(actual.length, expected.length, description); + actual.forEach(function(value, index) { + assert_response_equals(value, expected[index], + description + " : object[" + index + "]"); + }); +} + +// Equivalent to assert_in_array, but uses assert_response_equals. +function assert_response_in_array(actual, expected_array, description) { + assert_true(expected_array.some(function(element) { + try { + assert_response_equals(actual, element); + return true; + } catch (e) { + return false; + } + }), description); +} diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/resources/testharness-helpers.js b/tests/wpt/web-platform-tests/service-workers/cache-storage/resources/testharness-helpers.js index 45667056fda..e4885727b32 100644 --- a/tests/wpt/web-platform-tests/service-workers/cache-storage/resources/testharness-helpers.js +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/resources/testharness-helpers.js @@ -31,70 +31,3 @@ function assert_promise_rejects(promise, code, description) { } }); } - -// Helper for testing with Headers objects. Compares Headers instances -// by serializing |expected| and |actual| to arrays and comparing. -function assert_header_equals(actual, expected, description) { - assert_class_string(actual, "Headers", description); - var header, actual_headers = [], expected_headers = []; - for (header of actual) - actual_headers.push(header[0] + ": " + header[1]); - for (header of expected) - expected_headers.push(header[0] + ": " + header[1]); - assert_array_equals(actual_headers, expected_headers, - description + " Headers differ."); -} - -// Helper for testing with Response objects. Compares simple -// attributes defined on the interfaces, as well as the headers. It -// does not compare the response bodies. -function assert_response_equals(actual, expected, description) { - assert_class_string(actual, "Response", description); - ["type", "url", "status", "ok", "statusText"].forEach(function(attribute) { - assert_equals(actual[attribute], expected[attribute], - description + " Attributes differ: " + attribute + "."); - }); - assert_header_equals(actual.headers, expected.headers, description); -} - -// Assert that the two arrays |actual| and |expected| contain the same -// set of Responses as determined by assert_response_equals. The order -// is not significant. -// -// |expected| is assumed to not contain any duplicates. -function assert_response_array_equivalent(actual, expected, description) { - assert_true(Array.isArray(actual), description); - assert_equals(actual.length, expected.length, description); - expected.forEach(function(expected_element) { - // assert_response_in_array treats the first argument as being - // 'actual', and the second as being 'expected array'. We are - // switching them around because we want to be resilient - // against the |actual| array containing duplicates. - assert_response_in_array(expected_element, actual, description); - }); -} - -// Asserts that two arrays |actual| and |expected| contain the same -// set of Responses as determined by assert_response_equals(). The -// corresponding elements must occupy corresponding indices in their -// respective arrays. -function assert_response_array_equals(actual, expected, description) { - assert_true(Array.isArray(actual), description); - assert_equals(actual.length, expected.length, description); - actual.forEach(function(value, index) { - assert_response_equals(value, expected[index], - description + " : object[" + index + "]"); - }); -} - -// Equivalent to assert_in_array, but uses assert_response_equals. -function assert_response_in_array(actual, expected_array, description) { - assert_true(expected_array.some(function(element) { - try { - assert_response_equals(actual, element); - return true; - } catch (e) { - return false; - } - }), description); -} diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-add.js b/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-add.js index 49b8db4cd71..9fc597a4b4f 100644 --- a/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-add.js +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-add.js @@ -16,6 +16,16 @@ cache_test(function(cache) { .then(function(result) { assert_equals(result, undefined, 'Cache.add should resolve with undefined on success.'); + return cache.match('../resources/simple.txt'); + }) + .then(function(response) { + assert_class_string(response, 'Response', + 'Cache.add should put a resource in the cache.'); + return response.text(); + }) + .then(function(body) { + assert_equals(body, 'a simple text file\n', + 'Cache.add should retrieve the correct body.'); }); }, 'Cache.add called with relative URL specified as a string'); @@ -35,6 +45,15 @@ cache_test(function(cache) { }); }, 'Cache.add called with Request object'); +cache_test(function(cache) { + var request = new Request('../resources/simple.txt', + {method: 'POST', body: 'This is a body.'}); + return assert_promise_rejects( + cache.add(request), + new TypeError(), + 'Cache.add should throw a TypeError for non-GET requests.'); + }, 'Cache.add called with POST request'); + cache_test(function(cache) { var request = new Request('../resources/simple.txt'); return cache.add(request) @@ -51,6 +70,17 @@ cache_test(function(cache) { }); }, 'Cache.add called twice with the same Request object'); +cache_test(function(cache) { + var request = new Request('../resources/simple.txt'); + return request.text() + .then(function() { + assert_false(request.bodyUsed); + }) + .then(function() { + return cache.add(request); + }); + }, 'Cache.add with request with null body (not consumed)'); + cache_test(function(cache) { return cache.add('this-does-not-exist-please-dont-create-it') .then(function(result) { @@ -84,19 +114,62 @@ cache_test(function(cache) { }, 'Cache.addAll with a mix of valid and undefined arguments'); cache_test(function(cache) { - // Assumes the existence of ../resources/simple.txt and ../resources/blank.html - var urls = ['../resources/simple.txt', self.location.href, '../resources/blank.html']; + return cache.addAll([]) + .then(function(result) { + assert_equals(result, undefined, + 'Cache.addAll should resolve with undefined on ' + + 'success.'); + return cache.keys(); + }) + .then(function(result) { + assert_equals(result.length, 0, + 'There should be no entry in the cache.'); + }); + }, 'Cache.addAll with an empty array'); + +cache_test(function(cache) { + // Assumes the existence of ../resources/simple.txt and + // ../resources/blank.html + var urls = ['../resources/simple.txt', + self.location.href, + '../resources/blank.html']; return cache.addAll(urls) .then(function(result) { assert_equals(result, undefined, 'Cache.addAll should resolve with undefined on ' + 'success.'); + return Promise.all( + urls.map(function(url) { return cache.match(url); })); + }) + .then(function(responses) { + assert_class_string( + responses[0], 'Response', + 'Cache.addAll should put a resource in the cache.'); + assert_class_string( + responses[1], 'Response', + 'Cache.addAll should put a resource in the cache.'); + assert_class_string( + responses[2], 'Response', + 'Cache.addAll should put a resource in the cache.'); + return Promise.all( + responses.map(function(response) { return response.text(); })); + }) + .then(function(bodies) { + assert_equals( + bodies[0], 'a simple text file\n', + 'Cache.add should retrieve the correct body.'); + assert_equals( + bodies[2], '\nEmpty doc\n', + 'Cache.add should retrieve the correct body.'); }); }, 'Cache.addAll with string URL arguments'); cache_test(function(cache) { - // Assumes the existence of ../resources/simple.txt and ../resources/blank.html - var urls = ['../resources/simple.txt', self.location.href, '../resources/blank.html']; + // Assumes the existence of ../resources/simple.txt and + // ../resources/blank.html + var urls = ['../resources/simple.txt', + self.location.href, + '../resources/blank.html']; var requests = urls.map(function(url) { return new Request(url); }); @@ -105,13 +178,38 @@ cache_test(function(cache) { assert_equals(result, undefined, 'Cache.addAll should resolve with undefined on ' + 'success.'); + return Promise.all( + urls.map(function(url) { return cache.match(url); })); + }) + .then(function(responses) { + assert_class_string( + responses[0], 'Response', + 'Cache.addAll should put a resource in the cache.'); + assert_class_string( + responses[1], 'Response', + 'Cache.addAll should put a resource in the cache.'); + assert_class_string( + responses[2], 'Response', + 'Cache.addAll should put a resource in the cache.'); + return Promise.all( + responses.map(function(response) { return response.text(); })); + }) + .then(function(bodies) { + assert_equals( + bodies[0], 'a simple text file\n', + 'Cache.add should retrieve the correct body.'); + assert_equals( + bodies[2], '\nEmpty doc\n', + 'Cache.add should retrieve the correct body.'); }); }, 'Cache.addAll with Request arguments'); cache_test(function(cache) { - // Assumes that ../resources/simple.txt and ../resources/blank.html exist. The second - // resource does not. - var urls = ['../resources/simple.txt', 'this-resource-should-not-exist', '../resources/blank.html']; + // Assumes that ../resources/simple.txt and ../resources/blank.html exist. + // The second resource does not. + var urls = ['../resources/simple.txt', + 'this-resource-should-not-exist', + '../resources/blank.html']; var requests = urls.map(function(url) { return new Request(url); }); @@ -120,6 +218,32 @@ cache_test(function(cache) { assert_equals(result, undefined, 'Cache.addAll should resolve with undefined on ' + 'success.'); + return Promise.all( + urls.map(function(url) { return cache.match(url); })); + }) + .then(function(responses) { + assert_class_string( + responses[0], 'Response', + 'Cache.addAll should put a resource in the cache.'); + assert_class_string( + responses[1], 'Response', + 'Cache.addAll should put a resource in the cache.'); + assert_equals( + responses[1].status, 404, + 'Cache.addAll should put a 404 resource in the cache.'); + assert_class_string( + responses[2], 'Response', + 'Cache.addAll should put a resource in the cache.'); + return Promise.all( + responses.map(function(response) { return response.text(); })); + }) + .then(function(bodies) { + assert_equals( + bodies[0], 'a simple text file\n', + 'Cache.add should retrieve the correct body.'); + assert_equals( + bodies[2], '\nEmpty doc\n', + 'Cache.add should retrieve the correct body.'); }); }, 'Cache.addAll with a mix of succeeding and failing requests'); diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-match.js b/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-match.js index 02cf6cf5fb6..716bfe5a698 100644 --- a/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-match.js +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-match.js @@ -4,105 +4,6 @@ if (self.importScripts) { importScripts('../resources/test-helpers.js'); } -// A set of Request/Response pairs to be used with prepopulated_cache_test(). -var simple_entries = [ - { - name: 'a', - request: new Request('http://example.com/a'), - response: new Response('') - }, - - { - name: 'b', - request: new Request('http://example.com/b'), - response: new Response('') - }, - - { - name: 'a_with_query', - request: new Request('http://example.com/a?q=r'), - response: new Response('') - }, - - { - name: 'A', - request: new Request('http://example.com/A'), - response: new Response('') - }, - - { - name: 'a_https', - request: new Request('https://example.com/a'), - response: new Response('') - }, - - { - name: 'a_org', - request: new Request('http://example.org/a'), - response: new Response('') - }, - - { - name: 'cat', - request: new Request('http://example.com/cat'), - response: new Response('') - }, - - { - name: 'catmandu', - request: new Request('http://example.com/catmandu'), - response: new Response('') - }, - - { - name: 'cat_num_lives', - request: new Request('http://example.com/cat?lives=9'), - response: new Response('') - }, - - { - name: 'cat_in_the_hat', - request: new Request('http://example.com/cat/in/the/hat'), - response: new Response('') - } -]; - -// A set of Request/Response pairs to be used with prepopulated_cache_test(). -// These contain a mix of test cases that use Vary headers. -var vary_entries = [ - { - name: 'vary_cookie_is_cookie', - request: new Request('http://example.com/c', - {headers: {'Cookies': 'is-for-cookie'}}), - response: new Response('', - {headers: {'Vary': 'Cookies'}}) - }, - - { - name: 'vary_cookie_is_good', - request: new Request('http://example.com/c', - {headers: {'Cookies': 'is-good-enough-for-me'}}), - response: new Response('', - {headers: {'Vary': 'Cookies'}}) - }, - - { - name: 'vary_cookie_absent', - request: new Request('http://example.com/c'), - response: new Response('', - {headers: {'Vary': 'Cookies'}}) - } -]; - -prepopulated_cache_test(simple_entries, function(cache, entries) { - return cache.matchAll('not-present-in-the-cache') - .then(function(result) { - assert_response_array_equivalent( - result, [], - 'Cache.matchAll should resolve with an empty array on failure.'); - }); - }, 'Cache.matchAll with no matching entries'); - prepopulated_cache_test(simple_entries, function(cache, entries) { return cache.match('not-present-in-the-cache') .then(function(result) { @@ -111,14 +12,6 @@ prepopulated_cache_test(simple_entries, function(cache, entries) { }); }, 'Cache.match with no matching entries'); -prepopulated_cache_test(simple_entries, function(cache, entries) { - return cache.matchAll(entries.a.request.url) - .then(function(result) { - assert_response_array_equals(result, [entries.a.response], - 'Cache.matchAll should match by URL.'); - }); - }, 'Cache.matchAll with URL'); - prepopulated_cache_test(simple_entries, function(cache, entries) { return cache.match(entries.a.request.url) .then(function(result) { @@ -127,15 +20,6 @@ prepopulated_cache_test(simple_entries, function(cache, entries) { }); }, 'Cache.match with URL'); -prepopulated_cache_test(simple_entries, function(cache, entries) { - return cache.matchAll(entries.a.request) - .then(function(result) { - assert_response_array_equals( - result, [entries.a.response], - 'Cache.matchAll should match by Request.'); - }); - }, 'Cache.matchAll with Request'); - prepopulated_cache_test(simple_entries, function(cache, entries) { return cache.match(entries.a.request) .then(function(result) { @@ -144,15 +28,6 @@ prepopulated_cache_test(simple_entries, function(cache, entries) { }); }, 'Cache.match with Request'); -prepopulated_cache_test(simple_entries, function(cache, entries) { - return cache.matchAll(new Request(entries.a.request.url)) - .then(function(result) { - assert_response_array_equals( - result, [entries.a.response], - 'Cache.matchAll should match by Request.'); - }); - }, 'Cache.matchAll with new Request'); - prepopulated_cache_test(simple_entries, function(cache, entries) { return cache.match(new Request(entries.a.request.url)) .then(function(result) { @@ -161,23 +36,6 @@ prepopulated_cache_test(simple_entries, function(cache, entries) { }); }, 'Cache.match with new Request'); -prepopulated_cache_test(simple_entries, function(cache, entries) { - return cache.matchAll(entries.a.request, - {ignoreSearch: true}) - .then(function(result) { - assert_response_array_equivalent( - result, - [ - entries.a.response, - entries.a_with_query.response - ], - 'Cache.matchAll with ignoreSearch should ignore the ' + - 'search parameters of cached request.'); - }); - }, - 'Cache.matchAll with ignoreSearch option (request with no search ' + - 'parameters)'); - prepopulated_cache_test(simple_entries, function(cache, entries) { return cache.match(entries.a.request, {ignoreSearch: true}) @@ -195,22 +53,6 @@ prepopulated_cache_test(simple_entries, function(cache, entries) { 'Cache.match with ignoreSearch option (request with no search ' + 'parameters)'); -prepopulated_cache_test(simple_entries, function(cache, entries) { - return cache.matchAll(entries.a_with_query.request, - {ignoreSearch: true}) - .then(function(result) { - assert_response_array_equivalent( - result, - [ - entries.a.response, - entries.a_with_query.response - ], - 'Cache.matchAll with ignoreSearch should ignore the ' + - 'search parameters of request.'); - }); - }, - 'Cache.matchAll with ignoreSearch option (request with search parameter)'); - prepopulated_cache_test(simple_entries, function(cache, entries) { return cache.match(entries.a_with_query.request, {ignoreSearch: true}) @@ -227,18 +69,6 @@ prepopulated_cache_test(simple_entries, function(cache, entries) { }, 'Cache.match with ignoreSearch option (request with search parameter)'); -prepopulated_cache_test(simple_entries, function(cache, entries) { - return cache.matchAll(entries.cat.request.url + '#mouse') - .then(function(result) { - assert_response_array_equivalent( - result, - [ - entries.cat.response, - ], - 'Cache.matchAll should ignore URL fragment.'); - }); - }, 'Cache.matchAll with URL containing fragment'); - prepopulated_cache_test(simple_entries, function(cache, entries) { return cache.match(entries.cat.request.url + '#mouse') .then(function(result) { @@ -247,16 +77,6 @@ prepopulated_cache_test(simple_entries, function(cache, entries) { }); }, 'Cache.match with URL containing fragment'); -prepopulated_cache_test(simple_entries, function(cache, entries) { - return cache.matchAll('http') - .then(function(result) { - assert_response_array_equivalent( - result, [], - 'Cache.matchAll should treat query as a URL and not ' + - 'just a string fragment.'); - }); - }, 'Cache.matchAll with string fragment "http" as query'); - prepopulated_cache_test(simple_entries, function(cache, entries) { return cache.match('http') .then(function(result) { @@ -267,48 +87,6 @@ prepopulated_cache_test(simple_entries, function(cache, entries) { }); }, 'Cache.match with string fragment "http" as query'); -prepopulated_cache_test(vary_entries, function(cache, entries) { - return cache.matchAll('http://example.com/c') - .then(function(result) { - assert_response_array_equivalent( - result, - [ - entries.vary_cookie_absent.response - ], - 'Cache.matchAll should exclude matches if a vary header is ' + - 'missing in the query request, but is present in the cached ' + - 'request.'); - }) - - .then(function() { - return cache.matchAll( - new Request('http://example.com/c', - {headers: {'Cookies': 'none-of-the-above'}})); - }) - .then(function(result) { - assert_response_array_equivalent( - result, - [ - ], - 'Cache.matchAll should exclude matches if a vary header is ' + - 'missing in the cached request, but is present in the query ' + - 'request.'); - }) - - .then(function() { - return cache.matchAll( - new Request('http://example.com/c', - {headers: {'Cookies': 'is-for-cookie'}})); - }) - .then(function(result) { - assert_response_array_equivalent( - result, - [entries.vary_cookie_is_cookie.response], - 'Cache.matchAll should match the entire header if a vary header ' + - 'is present in both the query and cached requests.'); - }); - }, 'Cache.matchAll with responses containing "Vary" header'); - prepopulated_cache_test(vary_entries, function(cache, entries) { return cache.match('http://example.com/c') .then(function(result) { @@ -321,21 +99,6 @@ prepopulated_cache_test(vary_entries, function(cache, entries) { }); }, 'Cache.match with responses containing "Vary" header'); -prepopulated_cache_test(vary_entries, function(cache, entries) { - return cache.matchAll('http://example.com/c', - {ignoreVary: true}) - .then(function(result) { - assert_response_array_equivalent( - result, - [ - entries.vary_cookie_is_cookie.response, - entries.vary_cookie_is_good.response, - entries.vary_cookie_absent.response, - ], - 'Cache.matchAll should honor "ignoreVary" parameter.'); - }); - }, 'Cache.matchAll with "ignoreVary" parameter'); - cache_test(function(cache) { var request = new Request('http://example.com'); var response; @@ -397,7 +160,7 @@ cache_test(function(cache) { }, 'Cache.match invoked multiple times for the same Request/Response'); prepopulated_cache_test(simple_entries, function(cache, entries) { - var request = new Request(entries.a.request, { method: 'POST' }); + var request = new Request(entries.a.request.clone(), {method: 'POST'}); return cache.match(request) .then(function(result) { assert_equals(result, undefined, @@ -405,38 +168,26 @@ prepopulated_cache_test(simple_entries, function(cache, entries) { }); }, 'Cache.match with POST Request'); -// Helpers --- +prepopulated_cache_test(simple_entries, function(cache, entries) { + var response = entries.non_2xx_response.response; + return cache.match(entries.non_2xx_response.request.url) + .then(function(result) { + assert_response_equals( + result, entries.non_2xx_response.response, + 'Cache.match should return a Response object that has the ' + + 'same properties as a stored non-2xx response.'); + }); + }, 'Cache.match with a non-2xx Response'); -// Run |test_function| with a Cache object as its only parameter. Prior to the -// call, the Cache is populated by cache entries from |entries|. The latter is -// expected to be an Object mapping arbitrary keys to objects of the form -// {request: , response: }. There's no -// guarantee on the order in which entries will be added to the cache. -// -// |test_function| should return a Promise that can be used with promise_test. -function prepopulated_cache_test(entries, test_function, description) { - cache_test(function(cache) { - var p = Promise.resolve(); - var hash = {}; - entries.forEach(function(entry) { - p = p.then(function() { - return cache.put(entry.request.clone(), - entry.response.clone()) - .catch(function(e) { - assert_unreached('Test setup failed for entry ' + - entry.name + ': ' + e); - }); - }); - hash[entry.name] = entry; +prepopulated_cache_test(simple_entries, function(cache, entries) { + var response = entries.error_response.response; + return cache.match(entries.error_response.request.url) + .then(function(result) { + assert_response_equals( + result, entries.error_response.response, + 'Cache.match should return a Response object that has the ' + + 'same properties as a stored network error response.'); }); - p = p.then(function() { - assert_equals(Object.keys(hash).length, entries.length); - }); - - return p.then(function() { - return test_function(cache, hash); - }); - }, description); -} + }, 'Cache.match with a network error Response'); done(); diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-matchAll.js b/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-matchAll.js new file mode 100644 index 00000000000..2bc661a5c90 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-matchAll.js @@ -0,0 +1,154 @@ +if (self.importScripts) { + importScripts('/resources/testharness.js'); + importScripts('../resources/testharness-helpers.js'); + importScripts('../resources/test-helpers.js'); +} + +prepopulated_cache_test(simple_entries, function(cache, entries) { + return cache.matchAll('not-present-in-the-cache') + .then(function(result) { + assert_response_array_equivalent( + result, [], + 'Cache.matchAll should resolve with an empty array on failure.'); + }); + }, 'Cache.matchAll with no matching entries'); + +prepopulated_cache_test(simple_entries, function(cache, entries) { + return cache.matchAll(entries.a.request.url) + .then(function(result) { + assert_response_array_equals(result, [entries.a.response], + 'Cache.matchAll should match by URL.'); + }); + }, 'Cache.matchAll with URL'); + +prepopulated_cache_test(simple_entries, function(cache, entries) { + return cache.matchAll(entries.a.request) + .then(function(result) { + assert_response_array_equals( + result, [entries.a.response], + 'Cache.matchAll should match by Request.'); + }); + }, 'Cache.matchAll with Request'); + +prepopulated_cache_test(simple_entries, function(cache, entries) { + return cache.matchAll(new Request(entries.a.request.url)) + .then(function(result) { + assert_response_array_equals( + result, [entries.a.response], + 'Cache.matchAll should match by Request.'); + }); + }, 'Cache.matchAll with new Request'); + +prepopulated_cache_test(simple_entries, function(cache, entries) { + return cache.matchAll(entries.a.request, + {ignoreSearch: true}) + .then(function(result) { + assert_response_array_equivalent( + result, + [ + entries.a.response, + entries.a_with_query.response + ], + 'Cache.matchAll with ignoreSearch should ignore the ' + + 'search parameters of cached request.'); + }); + }, + 'Cache.matchAll with ignoreSearch option (request with no search ' + + 'parameters)'); + +prepopulated_cache_test(simple_entries, function(cache, entries) { + return cache.matchAll(entries.a_with_query.request, + {ignoreSearch: true}) + .then(function(result) { + assert_response_array_equivalent( + result, + [ + entries.a.response, + entries.a_with_query.response + ], + 'Cache.matchAll with ignoreSearch should ignore the ' + + 'search parameters of request.'); + }); + }, + 'Cache.matchAll with ignoreSearch option (request with search parameter)'); + +prepopulated_cache_test(simple_entries, function(cache, entries) { + return cache.matchAll(entries.cat.request.url + '#mouse') + .then(function(result) { + assert_response_array_equivalent( + result, + [ + entries.cat.response, + ], + 'Cache.matchAll should ignore URL fragment.'); + }); + }, 'Cache.matchAll with URL containing fragment'); + +prepopulated_cache_test(simple_entries, function(cache, entries) { + return cache.matchAll('http') + .then(function(result) { + assert_response_array_equivalent( + result, [], + 'Cache.matchAll should treat query as a URL and not ' + + 'just a string fragment.'); + }); + }, 'Cache.matchAll with string fragment "http" as query'); + +prepopulated_cache_test(vary_entries, function(cache, entries) { + return cache.matchAll('http://example.com/c') + .then(function(result) { + assert_response_array_equivalent( + result, + [ + entries.vary_cookie_absent.response + ], + 'Cache.matchAll should exclude matches if a vary header is ' + + 'missing in the query request, but is present in the cached ' + + 'request.'); + }) + + .then(function() { + return cache.matchAll( + new Request('http://example.com/c', + {headers: {'Cookies': 'none-of-the-above'}})); + }) + .then(function(result) { + assert_response_array_equivalent( + result, + [ + ], + 'Cache.matchAll should exclude matches if a vary header is ' + + 'missing in the cached request, but is present in the query ' + + 'request.'); + }) + + .then(function() { + return cache.matchAll( + new Request('http://example.com/c', + {headers: {'Cookies': 'is-for-cookie'}})); + }) + .then(function(result) { + assert_response_array_equivalent( + result, + [entries.vary_cookie_is_cookie.response], + 'Cache.matchAll should match the entire header if a vary header ' + + 'is present in both the query and cached requests.'); + }); + }, 'Cache.matchAll with responses containing "Vary" header'); + +prepopulated_cache_test(vary_entries, function(cache, entries) { + return cache.matchAll('http://example.com/c', + {ignoreVary: true}) + .then(function(result) { + assert_response_array_equivalent( + result, + [ + entries.vary_cookie_is_cookie.response, + entries.vary_cookie_is_good.response, + entries.vary_cookie_absent.response + ], + 'Cache.matchAll should honor "ignoreVary" parameter.'); + }); + }, 'Cache.matchAll with "ignoreVary" parameter'); + +done(); diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-put.js b/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-put.js index 1d0a5b9fa14..8dbaf9789d5 100644 --- a/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-put.js +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-put.js @@ -250,16 +250,22 @@ cache_test(function(cache) { assert_true( response.bodyUsed, '[https://fetch.spec.whatwg.org/#concept-body-consume-body] ' + - 'The text() method should set "body used" flag.'); - return assert_promise_rejects( - cache.put(new Request(test_url), response), - new TypeError, - '[https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#cache-put] ' + - 'Cache put should reject with TypeError when Response ' + - 'body is already used.'); - }); + 'The text() method should make the body disturbed.'); + var request = new Request(test_url); + return cache.put(request, response).then(() => { + assert_unreached('cache.put should be rejected'); + }, () => {}); + }); }, 'Cache.put with a used response body'); +cache_test(function(cache) { + var response = new Response(test_body); + return cache.put(new Request(test_url), response) + .then(function() { + assert_throws(new TypeError(), () => response.body.getReader()); + }); + }, 'getReader() after Cache.put'); + cache_test(function(cache) { return assert_promise_rejects( cache.put(new Request(test_url), diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-storage.js b/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-storage.js index a8d4e7e61de..594b01b5810 100644 --- a/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-storage.js +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-storage.js @@ -106,7 +106,6 @@ promise_test(function(t) { promise_test(function(t) { var cache_name = 'cache-storage/open'; - var url = '../resources/simple.txt'; var cache; return self.caches.delete(cache_name) .then(function() { @@ -135,7 +134,7 @@ promise_test(function(t) { assert_array_equals(actual_urls, expected_urls, 'CacheStorage.open should return a new Cache ' + 'object for the same backing store.'); - }) + }); }, 'CacheStorage.open with existing cache'); promise_test(function(t) { diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/serviceworker/cache-match.https.html b/tests/wpt/web-platform-tests/service-workers/cache-storage/serviceworker/cache-match.https.html index 859b1cd0554..6126568fb46 100644 --- a/tests/wpt/web-platform-tests/service-workers/cache-storage/serviceworker/cache-match.https.html +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/serviceworker/cache-match.https.html @@ -1,5 +1,5 @@ -Cache.match and Cache.matchAll +Cache.match diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/serviceworker/cache-matchAll.https.html b/tests/wpt/web-platform-tests/service-workers/cache-storage/serviceworker/cache-matchAll.https.html new file mode 100644 index 00000000000..878fe1209f3 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/serviceworker/cache-matchAll.https.html @@ -0,0 +1,10 @@ + +Cache.matchAll + + + + + + diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/window/cache-match.https.html b/tests/wpt/web-platform-tests/service-workers/cache-storage/window/cache-match.https.html index 093df8db4a8..a99d700accd 100644 --- a/tests/wpt/web-platform-tests/service-workers/cache-storage/window/cache-match.https.html +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/window/cache-match.https.html @@ -1,5 +1,5 @@ -Cache Storage: Cache.match and Cache.matchAll +Cache Storage: Cache.match diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/window/cache-matchAll.https.html b/tests/wpt/web-platform-tests/service-workers/cache-storage/window/cache-matchAll.https.html new file mode 100644 index 00000000000..3bd92887a49 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/window/cache-matchAll.https.html @@ -0,0 +1,9 @@ + +Cache.matchAll + + + + + + + diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/worker/cache-match.https.html b/tests/wpt/web-platform-tests/service-workers/cache-storage/worker/cache-match.https.html index b0926fce360..5304529b775 100644 --- a/tests/wpt/web-platform-tests/service-workers/cache-storage/worker/cache-match.https.html +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/worker/cache-match.https.html @@ -1,5 +1,5 @@ -Cache.match and Cache.matchAll +Cache.match diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/worker/cache-matchAll.https.html b/tests/wpt/web-platform-tests/service-workers/cache-storage/worker/cache-matchAll.https.html new file mode 100644 index 00000000000..242ccb68799 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/worker/cache-matchAll.https.html @@ -0,0 +1,9 @@ + +Cache.matchAll + + + + + diff --git a/tests/wpt/web-platform-tests/shadow-dom/OWNERS b/tests/wpt/web-platform-tests/shadow-dom/OWNERS new file mode 100644 index 00000000000..fd2132cf82d --- /dev/null +++ b/tests/wpt/web-platform-tests/shadow-dom/OWNERS @@ -0,0 +1,5 @@ +@kojiishi +@rniwa +@sideshowbarker +@sizuhiko +@yutak diff --git a/tests/wpt/web-platform-tests/subresource-integrity/OWNERS b/tests/wpt/web-platform-tests/subresource-integrity/OWNERS new file mode 100644 index 00000000000..8f7edaa358b --- /dev/null +++ b/tests/wpt/web-platform-tests/subresource-integrity/OWNERS @@ -0,0 +1,6 @@ +@metromoxie +@fmarier +@jonathanKingston +@mikewest +@hillbrad +@mastahyeti diff --git a/tests/wpt/web-platform-tests/svg/OWNERS b/tests/wpt/web-platform-tests/svg/OWNERS new file mode 100644 index 00000000000..aeee0aac345 --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/OWNERS @@ -0,0 +1,2 @@ +@heycam +@Ms2ger diff --git a/tests/wpt/web-platform-tests/touch-events/OWNERS b/tests/wpt/web-platform-tests/touch-events/OWNERS new file mode 100644 index 00000000000..ef580b2ebe7 --- /dev/null +++ b/tests/wpt/web-platform-tests/touch-events/OWNERS @@ -0,0 +1,3 @@ +@jtangelder +@zqzhang +@cynthia diff --git a/tests/wpt/web-platform-tests/typedarrays/OWNERS b/tests/wpt/web-platform-tests/typedarrays/OWNERS new file mode 100644 index 00000000000..f02987223e3 --- /dev/null +++ b/tests/wpt/web-platform-tests/typedarrays/OWNERS @@ -0,0 +1,4 @@ +@koustuvsinha +@zqzhang +@haoxli +@Ms2ger diff --git a/tests/wpt/web-platform-tests/uievents/order-of-events/mouse-events/click-on-div-manual.html b/tests/wpt/web-platform-tests/uievents/order-of-events/mouse-events/click-on-div-manual.html new file mode 100644 index 00000000000..173e520a17e --- /dev/null +++ b/tests/wpt/web-platform-tests/uievents/order-of-events/mouse-events/click-on-div-manual.html @@ -0,0 +1,43 @@ + + + + + Clicking on a div element that has no click event handler fires a click event + + + + + + + + + +

    Click on the blue square below. If a "PASS" result appears, the test passes; otherwise, it fails.

    +
    Click me
    + + + diff --git a/tests/wpt/web-platform-tests/url/OWNERS b/tests/wpt/web-platform-tests/url/OWNERS new file mode 100644 index 00000000000..b91af6024f0 --- /dev/null +++ b/tests/wpt/web-platform-tests/url/OWNERS @@ -0,0 +1,8 @@ +@mikewest +@frewsxcv +@tomalec +@rubys +@sideshowbarker +@zcorpan +@xiaojunwu +@smola diff --git a/tests/wpt/web-platform-tests/url/README.md b/tests/wpt/web-platform-tests/url/README.md index 68dfa7543ff..b5088dbf851 100644 --- a/tests/wpt/web-platform-tests/url/README.md +++ b/tests/wpt/web-platform-tests/url/README.md @@ -1,6 +1,23 @@ -The test for browsers is `a-element.html`. The reusable format is `urltestdata.txt`, which -is not documented in detail. Reverse engineering through `urltestparser.js` should not be -too hard. Documentation welcome! +These tests are for browsers, but the data for +`a-element.html`, `url-constructor.html`, and `a-element-xhtml.xhtml` +is in `urltestdata.json` and can be re-used by non-browser implementations. +This file contains a JSON array of comments as strings and test cases as objects. +The keys for each test case are: + +* `base`: an absolute URL as a string whose [parsing] without a base of its own should succeed. + This key is always present, + and may have a value like `"about:blank"` when `input` is an absolute URL. +* `input`: an URL as a string to be [parsed][parsing] with `base` as its base URL. +* Either: + * `failure` with the value `true`, indicating that parsing `input` should return failure, + * or `href`, `origin`, `protocol`, `username`, `password`, `host`, `hostname`, `port`, + `pathname`, `search`, and `hash` with string values; + indicating that parsing `input` should return an URL record + and that the getters of each corresponding attribute in that URL’s [API] + should return the corresponding value. + +[parsing]: https://url.spec.whatwg.org/#concept-basic-url-parser +[API]: https://url.spec.whatwg.org/#api [`annevk/url`](https://github.com/annevk/url) hosts some other files that might be of interest if you want to create additional tests. diff --git a/tests/wpt/web-platform-tests/url/urltestdata.json b/tests/wpt/web-platform-tests/url/urltestdata.json index 1e8c68fc46b..4ea27d73229 100644 --- a/tests/wpt/web-platform-tests/url/urltestdata.json +++ b/tests/wpt/web-platform-tests/url/urltestdata.json @@ -1938,7 +1938,7 @@ "hash": "" }, { - "input": "http://example.com/foo\t‘%91", + "input": "http://example.com/foo\t\u0091%91", "base": "about:blank", "href": "http://example.com/foo%C2%91%91", "origin": "http://example.com", @@ -2201,7 +2201,7 @@ { "input": "http://www/foo%2Ehtml", "base": "about:blank", - "href": "http://www/foo%2Ehtml", + "href": "http://www/foo.html", "origin": "http://www", "protocol": "http:", "username": "", @@ -2209,7 +2209,7 @@ "host": "www", "hostname": "www", "port": "", - "pathname": "/foo%2Ehtml", + "pathname": "/foo.html", "search": "", "hash": "" }, diff --git a/tests/wpt/web-platform-tests/user-timing/OWNERS b/tests/wpt/web-platform-tests/user-timing/OWNERS new file mode 100644 index 00000000000..5a05f35799c --- /dev/null +++ b/tests/wpt/web-platform-tests/user-timing/OWNERS @@ -0,0 +1 @@ +@plehegar diff --git a/tests/wpt/web-platform-tests/vibration/OWNERS b/tests/wpt/web-platform-tests/vibration/OWNERS new file mode 100644 index 00000000000..4020ed82efc --- /dev/null +++ b/tests/wpt/web-platform-tests/vibration/OWNERS @@ -0,0 +1,3 @@ +@dontcallmedom +@zqzhang +@xinliux diff --git a/tests/wpt/web-platform-tests/web-animations/OWNERS b/tests/wpt/web-platform-tests/web-animations/OWNERS new file mode 100644 index 00000000000..fd38f5e5b9b --- /dev/null +++ b/tests/wpt/web-platform-tests/web-animations/OWNERS @@ -0,0 +1 @@ +@birtles diff --git a/tests/wpt/web-platform-tests/web-animations/keyframe-effect/constructor.html b/tests/wpt/web-platform-tests/web-animations/keyframe-effect/constructor.html index edc5f4552b5..06af7b46261 100644 --- a/tests/wpt/web-platform-tests/web-animations/keyframe-effect/constructor.html +++ b/tests/wpt/web-platform-tests/web-animations/keyframe-effect/constructor.html @@ -108,7 +108,7 @@ test(function(t) { var effect = new KeyframeEffectReadOnly(target, { left: ["10px", "20px"] }, { easing: easing }); - assert_equals(effect.getFrames()[0].easing, expected, + assert_equals(effect.timing.easing, expected, "resulting easing for '" + easing + "'"); }); }, "easing values are parsed correctly when passed to the " + diff --git a/tests/wpt/web-platform-tests/webaudio/OWNERS b/tests/wpt/web-platform-tests/webaudio/OWNERS new file mode 100644 index 00000000000..d4865fcd085 --- /dev/null +++ b/tests/wpt/web-platform-tests/webaudio/OWNERS @@ -0,0 +1 @@ +@chrislo diff --git a/tests/wpt/web-platform-tests/webdriver/OWNERS b/tests/wpt/web-platform-tests/webdriver/OWNERS new file mode 100644 index 00000000000..45cf0102cd8 --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/OWNERS @@ -0,0 +1,4 @@ +@andreastt +@lukeis +@AutomatedTester +@shs96c diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/program-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/program-test.html index 53e1e61e3e3..18759f64af3 100644 --- a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/program-test.html +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/program-test.html @@ -228,11 +228,11 @@ function go() { checkGetAttachedShaders([fs], [], [fs], "attaching a single shader should give the expected list"); checkGetAttachedShaders([fs, vs], [], [fs, vs], "attaching some shaders should give the expected list"); - checkGetAttachedShaders([fs], [fs], [], "attaching a shader and detaching it shoud leave an empty list"); + checkGetAttachedShaders([fs], [fs], [], "attaching a shader and detaching it should leave an empty list"); checkGetAttachedShaders([fs, vs], [fs, vs], [], - "attaching some shaders and detaching them in same order shoud leave an empty list"); + "attaching some shaders and detaching them in same order should leave an empty list"); checkGetAttachedShaders([fs, vs], [vs, fs], [], - "attaching some shaders and detaching them in random order shoud leave an empty list"); + "attaching some shaders and detaching them in random order should leave an empty list"); checkGetAttachedShaders([fs, vs], [vs], [fs], "attaching and detaching some shaders should leave the difference list"); checkGetAttachedShaders([fs, vs], [fs], [vs], diff --git a/tests/wpt/web-platform-tests/webmessaging/OWNERS b/tests/wpt/web-platform-tests/webmessaging/OWNERS new file mode 100644 index 00000000000..bff9fad87de --- /dev/null +++ b/tests/wpt/web-platform-tests/webmessaging/OWNERS @@ -0,0 +1,6 @@ +@zqzhang +@sideshowbarker +@plehegar +@aogilvie +@Ms2ger +@jdm diff --git a/tests/wpt/web-platform-tests/webrtc/OWNERS b/tests/wpt/web-platform-tests/webrtc/OWNERS new file mode 100644 index 00000000000..1deb98d49c9 --- /dev/null +++ b/tests/wpt/web-platform-tests/webrtc/OWNERS @@ -0,0 +1,4 @@ +@dontcallmedom +@tidoust +@alvestrand +@phoglund diff --git a/tests/wpt/web-platform-tests/websockets/Create-Secure-valid-url-protocol-setCorrectly.htm b/tests/wpt/web-platform-tests/websockets/Create-Secure-valid-url-protocol-setCorrectly.htm index a6b429397b3..56330805f83 100644 --- a/tests/wpt/web-platform-tests/websockets/Create-Secure-valid-url-protocol-setCorrectly.htm +++ b/tests/wpt/web-platform-tests/websockets/Create-Secure-valid-url-protocol-setCorrectly.htm @@ -17,7 +17,7 @@ var isOpenCalled = false; wsocket.addEventListener('open', testOpen.step_func(function (evt) { - assert_equals(wsocket.protocol, __PROTOCOL, "protocol should be set to echo"); + assert_equals(wsocket.protocol, "echo", "protocol should be set to echo"); wsocket.close(); isOpenCalled = true; testOpen.done(); diff --git a/tests/wpt/web-platform-tests/websockets/OWNERS b/tests/wpt/web-platform-tests/websockets/OWNERS new file mode 100644 index 00000000000..a34c94d717f --- /dev/null +++ b/tests/wpt/web-platform-tests/websockets/OWNERS @@ -0,0 +1,9 @@ +@kristijanburnik +@zcorpan +@plehegar +@zqzhang +@sideshowbarker +@foolip +@Jxck +@jdm +@Ms2ger diff --git a/tests/wpt/web-platform-tests/websockets/websocket.js b/tests/wpt/web-platform-tests/websockets/websocket.js index 4b44a41608e..65c4c30365d 100644 --- a/tests/wpt/web-platform-tests/websockets/websocket.js +++ b/tests/wpt/web-platform-tests/websockets/websocket.js @@ -4,26 +4,9 @@ var __SECURE__PORT = {{ports[wss][0]}}; var __NEW__PORT = __PORT; //All ports are non-default for now var __NEW__SECURE__PORT = __SECURE__PORT; //All ports are non-default for now var __PATH = "echo"; -var __CONTROLPATH = "control"; -var __PROTOCOL = "echo"; -var __PROTOCOLS = ["echo", "chat"]; -var __REPEATED__PROTOCOLS = ["echo", "echo"]; -var __REPEATED__PROTOCOLS_CASE_INSENSITIVE = ["echo", "eCho"]; -var __URL; -var __IS__WEBSOCKET; -var __PASS = "Pass"; -var __FAIL = "Fail"; var wsocket; -var csocket; var data; -// variables for testing Close Browser/Navigate Away scenarios -var isAssociated = false; -var guid; -var dataReceived; -var closeCode; -var urlToOpen; - function IsWebSocket() { if (!self.WebSocket) { assert_true(false, "Browser does not support WebSocket"); @@ -32,92 +15,93 @@ function IsWebSocket() { function CreateWebSocketNonAbsolute() { IsWebSocket(); - __URL = __SERVER__NAME; - wsocket = new WebSocket(__URL); + var url = __SERVER__NAME; + wsocket = new WebSocket(url); } function CreateWebSocketNonWsScheme() { IsWebSocket(); - __URL = "http://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH; - wsocket = new WebSocket(__URL); + var url = "http://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH; + wsocket = new WebSocket(url); } function CreateWebSocketNonAsciiProtocol(nonAsciiProtocol) { IsWebSocket(); - __URL = "ws://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH; - wsocket = new WebSocket(__URL, nonAsciiProtocol); + var url = "ws://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH; + wsocket = new WebSocket(url, nonAsciiProtocol); } function CreateWebSocketWithAsciiSep(asciiWithSep) { IsWebSocket(); - __URL = "ws://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH; - wsocket = new WebSocket(__URL, asciiWithSep); + var url = "ws://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH; + wsocket = new WebSocket(url, asciiWithSep); } function CreateWebSocketWithBlockedPort(blockedPort) { IsWebSocket(); - __URL = "wss://" + __SERVER__NAME + ":" + blockedPort + "/" + __PATH; - wsocket = new WebSocket(__URL); + var url = "wss://" + __SERVER__NAME + ":" + blockedPort + "/" + __PATH; + wsocket = new WebSocket(url); } function CreateWebSocketWithSpaceInUrl(urlWithSpace) { IsWebSocket(); - __URL = "ws://" + urlWithSpace + ":" + __PORT + "/" + __PATH; - wsocket = new WebSocket(__URL); + var url = "ws://" + urlWithSpace + ":" + __PORT + "/" + __PATH; + wsocket = new WebSocket(url); } function CreateWebSocketWithSpaceInProtocol(protocolWithSpace) { IsWebSocket(); - __URL = "ws://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH; - wsocket = new WebSocket(__URL, protocolWithSpace); + var url = "ws://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH; + wsocket = new WebSocket(url, protocolWithSpace); } function CreateWebSocketWithRepeatedProtocols() { IsWebSocket(); - __URL = "ws://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH; - wsocket = new WebSocket(__URL, __REPEATED__PROTOCOLS); + var url = "ws://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH; + wsocket = new WebSocket(url, ["echo", "echo"]); } function CreateWebSocketWithRepeatedProtocolsCaseInsensitive() { IsWebSocket(); - __URL = "ws://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH; - wsocket = new WebSocket(__URL, __REPEATED__PROTOCOLS_CASE_INSENSITIVE); + var url = "ws://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH; + wsocket = new WebSocket(url, ["echo", "eCho"]); } function CreateWebSocket(isSecure, isProtocol, isProtocols) { IsWebSocket(); + var url; if (isSecure) { if (__SECURE__PORT === null) { throw new Error("wss not yet supported"); } - __URL = "wss://" + __SERVER__NAME + ":" + __SECURE__PORT + "/" + __PATH; + url = "wss://" + __SERVER__NAME + ":" + __SECURE__PORT + "/" + __PATH; } else { - __URL = "ws://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH; + url = "ws://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH; } if (isProtocol) { - wsocket = new WebSocket(__URL, __PROTOCOL); + wsocket = new WebSocket(url, "echo"); } else if (isProtocols) { - wsocket = new WebSocket(__URL, __PROTOCOLS); + wsocket = new WebSocket(url, ["echo", "chat"]); } else { - wsocket = new WebSocket(__URL); + wsocket = new WebSocket(url); } return wsocket; } function CreateControlWebSocket(isSecure) { IsWebSocket(); + var url; if (isSecure) { - __URL = "wss://" + __SERVER__NAME + ":" + __SECURE__PORT + "/" + __CONTROLPATH; + url = "wss://" + __SERVER__NAME + ":" + __SECURE__PORT + "/control"; } else { - __URL = "ws://" + __SERVER__NAME + ":" + __PORT + "/" + __CONTROLPATH; + url = "ws://" + __SERVER__NAME + ":" + __PORT + "/control"; } - csocket = new WebSocket(__URL); - return csocket; + return new WebSocket(url); } diff --git a/tests/wpt/web-platform-tests/webstorage/OWNERS b/tests/wpt/web-platform-tests/webstorage/OWNERS new file mode 100644 index 00000000000..3b7fb5d888f --- /dev/null +++ b/tests/wpt/web-platform-tests/webstorage/OWNERS @@ -0,0 +1,9 @@ +@siusin +@inexorabletash +@zqzhang +@chunywang +@kangxu +@plehegar +@ibelem +@jdm +@Ms2ger diff --git a/tests/wpt/web-platform-tests/workers/OWNERS b/tests/wpt/web-platform-tests/workers/OWNERS new file mode 100644 index 00000000000..d211ea968e2 --- /dev/null +++ b/tests/wpt/web-platform-tests/workers/OWNERS @@ -0,0 +1,6 @@ +@zqzhang +@chunywang +@zcorpan +@caitp +@Ms2ger +@jdm