mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Update web-platform-tests to revision bda2059150dca8ab47f088b4cc619fcdc1f262fa
This commit is contained in:
parent
3535f3f6c2
commit
7c4281f3da
182 changed files with 7692 additions and 1042 deletions
|
@ -4689,6 +4689,16 @@
|
||||||
],
|
],
|
||||||
"url": "/html/rendering/bindings/the-textarea-element-0/rows-zero.html"
|
"url": "/html/rendering/bindings/the-textarea-element-0/rows-zero.html"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "html/rendering/non-replaced-elements/flow-content-0/div-align.html",
|
||||||
|
"references": [
|
||||||
|
[
|
||||||
|
"/html/rendering/non-replaced-elements/flow-content-0/div-align-ref.html",
|
||||||
|
"=="
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"url": "/html/rendering/non-replaced-elements/flow-content-0/div-align.html"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "html/rendering/non-replaced-elements/flow-content-0/figure.html",
|
"path": "html/rendering/non-replaced-elements/flow-content-0/figure.html",
|
||||||
"references": [
|
"references": [
|
||||||
|
@ -11973,6 +11983,10 @@
|
||||||
"path": "IndexedDB/idbobjectstore_createIndex13.htm",
|
"path": "IndexedDB/idbobjectstore_createIndex13.htm",
|
||||||
"url": "/IndexedDB/idbobjectstore_createIndex13.htm"
|
"url": "/IndexedDB/idbobjectstore_createIndex13.htm"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "IndexedDB/idbobjectstore_createIndex14-exception_order.htm",
|
||||||
|
"url": "/IndexedDB/idbobjectstore_createIndex14-exception_order.htm"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "IndexedDB/idbobjectstore_createIndex2.htm",
|
"path": "IndexedDB/idbobjectstore_createIndex2.htm",
|
||||||
"url": "/IndexedDB/idbobjectstore_createIndex2.htm"
|
"url": "/IndexedDB/idbobjectstore_createIndex2.htm"
|
||||||
|
@ -12253,10 +12267,26 @@
|
||||||
"path": "IndexedDB/value_recursive.htm",
|
"path": "IndexedDB/value_recursive.htm",
|
||||||
"url": "/IndexedDB/value_recursive.htm"
|
"url": "/IndexedDB/value_recursive.htm"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "WebCryptoAPI/generateKey/failures.worker.js",
|
||||||
|
"url": "/WebCryptoAPI/generateKey/failures.worker"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "WebCryptoAPI/generateKey/successes.worker.js",
|
||||||
|
"url": "/WebCryptoAPI/generateKey/successes.worker"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "WebCryptoAPI/getRandomValues.worker.js",
|
"path": "WebCryptoAPI/getRandomValues.worker.js",
|
||||||
"url": "/WebCryptoAPI/getRandomValues.worker"
|
"url": "/WebCryptoAPI/getRandomValues.worker"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "WebCryptoAPI/idlharness.html",
|
||||||
|
"url": "/WebCryptoAPI/idlharness.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "WebCryptoAPI/idlharness.worker.js",
|
||||||
|
"url": "/WebCryptoAPI/idlharness.worker"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "WebCryptoAPI/test_getRandomValues.html",
|
"path": "WebCryptoAPI/test_getRandomValues.html",
|
||||||
"url": "/WebCryptoAPI/test_getRandomValues.html"
|
"url": "/WebCryptoAPI/test_getRandomValues.html"
|
||||||
|
@ -13805,6 +13835,10 @@
|
||||||
"path": "cssom-view/scrollingElement.html",
|
"path": "cssom-view/scrollingElement.html",
|
||||||
"url": "/cssom-view/scrollingElement.html"
|
"url": "/cssom-view/scrollingElement.html"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "custom-elements/custom-elements-registry/define.html",
|
||||||
|
"url": "/custom-elements/custom-elements-registry/define.html"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "custom-elements/v0/concepts/custom-elements-type-naming.html",
|
"path": "custom-elements/v0/concepts/custom-elements-type-naming.html",
|
||||||
"url": "/custom-elements/v0/concepts/custom-elements-type-naming.html"
|
"url": "/custom-elements/v0/concepts/custom-elements-type-naming.html"
|
||||||
|
@ -14069,14 +14103,30 @@
|
||||||
"path": "dom/events/Event-dispatch-bubbles-false.html",
|
"path": "dom/events/Event-dispatch-bubbles-false.html",
|
||||||
"url": "/dom/events/Event-dispatch-bubbles-false.html"
|
"url": "/dom/events/Event-dispatch-bubbles-false.html"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "dom/events/Event-dispatch-bubbles-true.html",
|
||||||
|
"url": "/dom/events/Event-dispatch-bubbles-true.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "dom/events/Event-dispatch-detached-click.html",
|
||||||
|
"url": "/dom/events/Event-dispatch-detached-click.html"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "dom/events/Event-dispatch-handlers-changed.html",
|
"path": "dom/events/Event-dispatch-handlers-changed.html",
|
||||||
"url": "/dom/events/Event-dispatch-handlers-changed.html"
|
"url": "/dom/events/Event-dispatch-handlers-changed.html"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "dom/events/Event-dispatch-multiple-stopPropagation.html",
|
||||||
|
"url": "/dom/events/Event-dispatch-multiple-stopPropagation.html"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "dom/events/Event-dispatch-omitted-capture.html",
|
"path": "dom/events/Event-dispatch-omitted-capture.html",
|
||||||
"url": "/dom/events/Event-dispatch-omitted-capture.html"
|
"url": "/dom/events/Event-dispatch-omitted-capture.html"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "dom/events/Event-dispatch-order.html",
|
||||||
|
"url": "/dom/events/Event-dispatch-order.html"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "dom/events/Event-dispatch-propagation-stopped.html",
|
"path": "dom/events/Event-dispatch-propagation-stopped.html",
|
||||||
"url": "/dom/events/Event-dispatch-propagation-stopped.html"
|
"url": "/dom/events/Event-dispatch-propagation-stopped.html"
|
||||||
|
@ -14097,6 +14147,14 @@
|
||||||
"path": "dom/events/Event-dispatch-target-removed.html",
|
"path": "dom/events/Event-dispatch-target-removed.html",
|
||||||
"url": "/dom/events/Event-dispatch-target-removed.html"
|
"url": "/dom/events/Event-dispatch-target-removed.html"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "dom/events/Event-dispatch-throwing.html",
|
||||||
|
"url": "/dom/events/Event-dispatch-throwing.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "dom/events/Event-init-while-dispatching.html",
|
||||||
|
"url": "/dom/events/Event-init-while-dispatching.html"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "dom/events/Event-initEvent.html",
|
"path": "dom/events/Event-initEvent.html",
|
||||||
"url": "/dom/events/Event-initEvent.html"
|
"url": "/dom/events/Event-initEvent.html"
|
||||||
|
@ -14105,6 +14163,10 @@
|
||||||
"path": "dom/events/Event-propagation.html",
|
"path": "dom/events/Event-propagation.html",
|
||||||
"url": "/dom/events/Event-propagation.html"
|
"url": "/dom/events/Event-propagation.html"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "dom/events/Event-subclasses-constructors.html",
|
||||||
|
"url": "/dom/events/Event-subclasses-constructors.html"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "dom/events/Event-type-empty.html",
|
"path": "dom/events/Event-type-empty.html",
|
||||||
"url": "/dom/events/Event-type-empty.html"
|
"url": "/dom/events/Event-type-empty.html"
|
||||||
|
@ -14113,6 +14175,18 @@
|
||||||
"path": "dom/events/Event-type.html",
|
"path": "dom/events/Event-type.html",
|
||||||
"url": "/dom/events/Event-type.html"
|
"url": "/dom/events/Event-type.html"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "dom/events/EventListener-handleEvent.html",
|
||||||
|
"url": "/dom/events/EventListener-handleEvent.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "dom/events/EventListener-incumbent-global.sub.html",
|
||||||
|
"url": "/dom/events/EventListener-incumbent-global.sub.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "dom/events/EventListenerOptions-capture.html",
|
||||||
|
"url": "/dom/events/EventListenerOptions-capture.html"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "dom/events/EventTarget-addEventListener.html",
|
"path": "dom/events/EventTarget-addEventListener.html",
|
||||||
"url": "/dom/events/EventTarget-addEventListener.html"
|
"url": "/dom/events/EventTarget-addEventListener.html"
|
||||||
|
@ -16093,6 +16167,10 @@
|
||||||
"path": "html/browsers/browsing-the-web/navigating-across-documents/javascript-url-query-fragment-components.html",
|
"path": "html/browsers/browsing-the-web/navigating-across-documents/javascript-url-query-fragment-components.html",
|
||||||
"url": "/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-query-fragment-components.html"
|
"url": "/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-query-fragment-components.html"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling.html",
|
||||||
|
"url": "/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling.html"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "html/browsers/browsing-the-web/navigating-across-documents/navigation_unload_data_url.html",
|
"path": "html/browsers/browsing-the-web/navigating-across-documents/navigation_unload_data_url.html",
|
||||||
"url": "/html/browsers/browsing-the-web/navigating-across-documents/navigation_unload_data_url.html"
|
"url": "/html/browsers/browsing-the-web/navigating-across-documents/navigation_unload_data_url.html"
|
||||||
|
@ -18853,6 +18931,10 @@
|
||||||
"path": "html/semantics/embedded-content/the-embed-element/embed-ignored-in-media-element.html",
|
"path": "html/semantics/embedded-content/the-embed-element/embed-ignored-in-media-element.html",
|
||||||
"url": "/html/semantics/embedded-content/the-embed-element/embed-ignored-in-media-element.html"
|
"url": "/html/semantics/embedded-content/the-embed-element/embed-ignored-in-media-element.html"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "html/semantics/embedded-content/the-iframe-element/iframe-allowfullscreen.html",
|
||||||
|
"url": "/html/semantics/embedded-content/the-iframe-element/iframe-allowfullscreen.html"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "html/semantics/embedded-content/the-iframe-element/iframe-load-event.html",
|
"path": "html/semantics/embedded-content/the-iframe-element/iframe-load-event.html",
|
||||||
"url": "/html/semantics/embedded-content/the-iframe-element/iframe-load-event.html"
|
"url": "/html/semantics/embedded-content/the-iframe-element/iframe-load-event.html"
|
||||||
|
@ -18865,6 +18947,14 @@
|
||||||
"path": "html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_script.html",
|
"path": "html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_script.html",
|
||||||
"url": "/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_script.html"
|
"url": "/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_script.html"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping.html",
|
||||||
|
"url": "/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping.html",
|
||||||
|
"url": "/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping.html"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_01.html",
|
"path": "html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_01.html",
|
||||||
"url": "/html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_01.html"
|
"url": "/html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_01.html"
|
||||||
|
@ -19417,6 +19507,14 @@
|
||||||
"path": "html/semantics/interfaces.html",
|
"path": "html/semantics/interfaces.html",
|
||||||
"url": "/html/semantics/interfaces.html"
|
"url": "/html/semantics/interfaces.html"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_attribute-getter-setter.html",
|
||||||
|
"url": "/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_attribute-getter-setter.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_getter.html",
|
||||||
|
"url": "/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_getter.html"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "html/semantics/scripting-1/the-script-element/async_001.htm",
|
"path": "html/semantics/scripting-1/the-script-element/async_001.htm",
|
||||||
"url": "/html/semantics/scripting-1/the-script-element/async_001.htm"
|
"url": "/html/semantics/scripting-1/the-script-element/async_001.htm"
|
||||||
|
@ -28417,6 +28515,10 @@
|
||||||
"path": "shadow-dom/Element-interface-shadowRoot-attribute.html",
|
"path": "shadow-dom/Element-interface-shadowRoot-attribute.html",
|
||||||
"url": "/shadow-dom/Element-interface-shadowRoot-attribute.html"
|
"url": "/shadow-dom/Element-interface-shadowRoot-attribute.html"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "shadow-dom/HTMLSlotElement-interface.html",
|
||||||
|
"url": "/shadow-dom/HTMLSlotElement-interface.html"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "shadow-dom/Node-prototype-cloneNode.html",
|
"path": "shadow-dom/Node-prototype-cloneNode.html",
|
||||||
"url": "/shadow-dom/Node-prototype-cloneNode.html"
|
"url": "/shadow-dom/Node-prototype-cloneNode.html"
|
||||||
|
@ -28425,10 +28527,22 @@
|
||||||
"path": "shadow-dom/ShadowRoot-interface.html",
|
"path": "shadow-dom/ShadowRoot-interface.html",
|
||||||
"url": "/shadow-dom/ShadowRoot-interface.html"
|
"url": "/shadow-dom/ShadowRoot-interface.html"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "shadow-dom/leaktests/get-elements.html",
|
||||||
|
"url": "/shadow-dom/leaktests/get-elements.html"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "shadow-dom/leaktests/html-collection.html",
|
"path": "shadow-dom/leaktests/html-collection.html",
|
||||||
"url": "/shadow-dom/leaktests/html-collection.html"
|
"url": "/shadow-dom/leaktests/html-collection.html"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "shadow-dom/leaktests/window-frames.html",
|
||||||
|
"url": "/shadow-dom/leaktests/window-frames.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "shadow-dom/scroll-to-the-fragment-in-shadow-tree.html",
|
||||||
|
"url": "/shadow-dom/scroll-to-the-fragment-in-shadow-tree.html"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "shadow-dom/untriaged/elements-and-dom-objects/extensions-to-element-interface/attributes/test-006.html",
|
"path": "shadow-dom/untriaged/elements-and-dom-objects/extensions-to-element-interface/attributes/test-006.html",
|
||||||
"url": "/shadow-dom/untriaged/elements-and-dom-objects/extensions-to-element-interface/attributes/test-006.html"
|
"url": "/shadow-dom/untriaged/elements-and-dom-objects/extensions-to-element-interface/attributes/test-006.html"
|
||||||
|
@ -28809,26 +28923,6 @@
|
||||||
"path": "typedarrays/constructors.html",
|
"path": "typedarrays/constructors.html",
|
||||||
"url": "/typedarrays/constructors.html"
|
"url": "/typedarrays/constructors.html"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "uievents/ClickFakeEvent.nondocument.html",
|
|
||||||
"url": "/uievents/ClickFakeEvent.nondocument.html"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "uievents/constructors/constructors.html",
|
|
||||||
"url": "/uievents/constructors/constructors.html"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "uievents/legacy-domevents-tests/approved/DOM.event.flow.html",
|
|
||||||
"url": "/uievents/legacy-domevents-tests/approved/DOM.event.flow.html"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "uievents/legacy-domevents-tests/approved/EventListener.eventHandler.html",
|
|
||||||
"url": "/uievents/legacy-domevents-tests/approved/EventListener.eventHandler.html"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "uievents/legacy-domevents-tests/approved/EventObject.multiple.dispatchEvent.html",
|
|
||||||
"url": "/uievents/legacy-domevents-tests/approved/EventObject.multiple.dispatchEvent.html"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "uievents/legacy-domevents-tests/approved/ProcessingInstruction.DOMCharacterDataModified.html",
|
"path": "uievents/legacy-domevents-tests/approved/ProcessingInstruction.DOMCharacterDataModified.html",
|
||||||
"url": "/uievents/legacy-domevents-tests/approved/ProcessingInstruction.DOMCharacterDataModified.html"
|
"url": "/uievents/legacy-domevents-tests/approved/ProcessingInstruction.DOMCharacterDataModified.html"
|
||||||
|
@ -28853,22 +28947,6 @@
|
||||||
"path": "uievents/legacy-domevents-tests/submissions/Microsoft/converted/EventListener.dispatch.new.event.html",
|
"path": "uievents/legacy-domevents-tests/submissions/Microsoft/converted/EventListener.dispatch.new.event.html",
|
||||||
"url": "/uievents/legacy-domevents-tests/submissions/Microsoft/converted/EventListener.dispatch.new.event.html"
|
"url": "/uievents/legacy-domevents-tests/submissions/Microsoft/converted/EventListener.dispatch.new.event.html"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "uievents/order-of-events/event-phases-order.html",
|
|
||||||
"url": "/uievents/order-of-events/event-phases-order.html"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "uievents/order-of-events/init-event-while-dispatching.html",
|
|
||||||
"url": "/uievents/order-of-events/init-event-while-dispatching.html"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "uievents/throwing-in-listener-and-window-error-event.html",
|
|
||||||
"url": "/uievents/throwing-in-listener-and-window-error-event.html"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "uievents/throwing-in-listener-when-all-have-not-run-yet.html",
|
|
||||||
"url": "/uievents/throwing-in-listener-when-all-have-not-run-yet.html"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "url/a-element-xhtml.xhtml",
|
"path": "url/a-element-xhtml.xhtml",
|
||||||
"url": "/url/a-element-xhtml.xhtml"
|
"url": "/url/a-element-xhtml.xhtml"
|
||||||
|
@ -28893,6 +28971,10 @@
|
||||||
"path": "url/url-constructor.html",
|
"path": "url/url-constructor.html",
|
||||||
"url": "/url/url-constructor.html"
|
"url": "/url/url-constructor.html"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "url/url-setters.html",
|
||||||
|
"url": "/url/url-setters.html"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "url/urlsearchparams-append.html",
|
"path": "url/urlsearchparams-append.html",
|
||||||
"url": "/url/urlsearchparams-append.html"
|
"url": "/url/urlsearchparams-append.html"
|
||||||
|
@ -28989,153 +29071,153 @@
|
||||||
"path": "vibration/silent-ignore.html",
|
"path": "vibration/silent-ignore.html",
|
||||||
"url": "/vibration/silent-ignore.html"
|
"url": "/vibration/silent-ignore.html"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "web-animations/animatable/animate.html",
|
|
||||||
"url": "/web-animations/animatable/animate.html"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "web-animations/animation-effect-timing/delay.html",
|
|
||||||
"url": "/web-animations/animation-effect-timing/delay.html"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "web-animations/animation-effect-timing/direction.html",
|
|
||||||
"url": "/web-animations/animation-effect-timing/direction.html"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "web-animations/animation-effect-timing/duration.html",
|
|
||||||
"url": "/web-animations/animation-effect-timing/duration.html"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "web-animations/animation-effect-timing/easing.html",
|
|
||||||
"url": "/web-animations/animation-effect-timing/easing.html"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "web-animations/animation-effect-timing/endDelay.html",
|
|
||||||
"url": "/web-animations/animation-effect-timing/endDelay.html"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "web-animations/animation-effect-timing/fill.html",
|
|
||||||
"url": "/web-animations/animation-effect-timing/fill.html"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "web-animations/animation-effect-timing/getAnimations.html",
|
|
||||||
"url": "/web-animations/animation-effect-timing/getAnimations.html"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "web-animations/animation-effect-timing/getComputedStyle.html",
|
|
||||||
"url": "/web-animations/animation-effect-timing/getComputedStyle.html"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "web-animations/animation-effect-timing/iterationStart.html",
|
|
||||||
"url": "/web-animations/animation-effect-timing/iterationStart.html"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "web-animations/animation-effect-timing/iterations.html",
|
|
||||||
"url": "/web-animations/animation-effect-timing/iterations.html"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "web-animations/animation-model/animation-types/discrete-animation.html",
|
"path": "web-animations/animation-model/animation-types/discrete-animation.html",
|
||||||
"url": "/web-animations/animation-model/animation-types/discrete-animation.html"
|
"url": "/web-animations/animation-model/animation-types/discrete-animation.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/animation-model/animation-types/not-animatable.html",
|
"path": "web-animations/animation-model/keyframe-effects/effect-value-context.html",
|
||||||
"url": "/web-animations/animation-model/animation-types/not-animatable.html"
|
"url": "/web-animations/animation-model/keyframe-effects/effect-value-context.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/animation-model/keyframes/effect-value-context.html",
|
"path": "web-animations/animation-model/keyframe-effects/the-effect-value-of-a-keyframe-effect.html",
|
||||||
"url": "/web-animations/animation-model/keyframes/effect-value-context.html"
|
"url": "/web-animations/animation-model/keyframe-effects/the-effect-value-of-a-keyframe-effect.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/animation-timeline/document-timeline.html",
|
"path": "web-animations/interfaces/Animatable/animate.html",
|
||||||
"url": "/web-animations/animation-timeline/document-timeline.html"
|
"url": "/web-animations/interfaces/Animatable/animate.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/animation-timeline/idlharness.html",
|
"path": "web-animations/interfaces/Animation/cancel.html",
|
||||||
"url": "/web-animations/animation-timeline/idlharness.html"
|
"url": "/web-animations/interfaces/Animation/cancel.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/animation/cancel.html",
|
"path": "web-animations/interfaces/Animation/constructor.html",
|
||||||
"url": "/web-animations/animation/cancel.html"
|
"url": "/web-animations/interfaces/Animation/constructor.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/animation/constructor.html",
|
"path": "web-animations/interfaces/Animation/finish.html",
|
||||||
"url": "/web-animations/animation/constructor.html"
|
"url": "/web-animations/interfaces/Animation/finish.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/animation/finish.html",
|
"path": "web-animations/interfaces/Animation/finished.html",
|
||||||
"url": "/web-animations/animation/finish.html"
|
"url": "/web-animations/interfaces/Animation/finished.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/animation/finished.html",
|
"path": "web-animations/interfaces/Animation/id.html",
|
||||||
"url": "/web-animations/animation/finished.html"
|
"url": "/web-animations/interfaces/Animation/id.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/animation/id.html",
|
"path": "web-animations/interfaces/Animation/oncancel.html",
|
||||||
"url": "/web-animations/animation/id.html"
|
"url": "/web-animations/interfaces/Animation/oncancel.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/animation/oncancel.html",
|
"path": "web-animations/interfaces/Animation/onfinish.html",
|
||||||
"url": "/web-animations/animation/oncancel.html"
|
"url": "/web-animations/interfaces/Animation/onfinish.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/animation/onfinish.html",
|
"path": "web-animations/interfaces/Animation/pause.html",
|
||||||
"url": "/web-animations/animation/onfinish.html"
|
"url": "/web-animations/interfaces/Animation/pause.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/animation/pause.html",
|
"path": "web-animations/interfaces/Animation/play.html",
|
||||||
"url": "/web-animations/animation/pause.html"
|
"url": "/web-animations/interfaces/Animation/play.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/animation/play.html",
|
"path": "web-animations/interfaces/Animation/playState.html",
|
||||||
"url": "/web-animations/animation/play.html"
|
"url": "/web-animations/interfaces/Animation/playState.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/animation/playState.html",
|
"path": "web-animations/interfaces/Animation/playbackRate.html",
|
||||||
"url": "/web-animations/animation/playState.html"
|
"url": "/web-animations/interfaces/Animation/playbackRate.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/animation/playbackRate.html",
|
"path": "web-animations/interfaces/Animation/ready.html",
|
||||||
"url": "/web-animations/animation/playbackRate.html"
|
"url": "/web-animations/interfaces/Animation/ready.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/animation/ready.html",
|
"path": "web-animations/interfaces/Animation/reverse.html",
|
||||||
"url": "/web-animations/animation/ready.html"
|
"url": "/web-animations/interfaces/Animation/reverse.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/animation/reverse.html",
|
"path": "web-animations/interfaces/Animation/startTime.html",
|
||||||
"url": "/web-animations/animation/reverse.html"
|
"url": "/web-animations/interfaces/Animation/startTime.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/animation/startTime.html",
|
"path": "web-animations/interfaces/AnimationEffectTiming/delay.html",
|
||||||
"url": "/web-animations/animation/startTime.html"
|
"url": "/web-animations/interfaces/AnimationEffectTiming/delay.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/document/getAnimations.html",
|
"path": "web-animations/interfaces/AnimationEffectTiming/direction.html",
|
||||||
"url": "/web-animations/document/getAnimations.html"
|
"url": "/web-animations/interfaces/AnimationEffectTiming/direction.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/keyframe-effect/constructor.html",
|
"path": "web-animations/interfaces/AnimationEffectTiming/duration.html",
|
||||||
"url": "/web-animations/keyframe-effect/constructor.html"
|
"url": "/web-animations/interfaces/AnimationEffectTiming/duration.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/keyframe-effect/effect-easing.html",
|
"path": "web-animations/interfaces/AnimationEffectTiming/easing.html",
|
||||||
"url": "/web-animations/keyframe-effect/effect-easing.html"
|
"url": "/web-animations/interfaces/AnimationEffectTiming/easing.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/keyframe-effect/getComputedTiming.html",
|
"path": "web-animations/interfaces/AnimationEffectTiming/endDelay.html",
|
||||||
"url": "/web-animations/keyframe-effect/getComputedTiming.html"
|
"url": "/web-animations/interfaces/AnimationEffectTiming/endDelay.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/keyframe-effect/keyframe-handling.html",
|
"path": "web-animations/interfaces/AnimationEffectTiming/fill.html",
|
||||||
"url": "/web-animations/keyframe-effect/keyframe-handling.html"
|
"url": "/web-animations/interfaces/AnimationEffectTiming/fill.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/keyframe-effect/setFrames.html",
|
"path": "web-animations/interfaces/AnimationEffectTiming/getAnimations.html",
|
||||||
"url": "/web-animations/keyframe-effect/setFrames.html"
|
"url": "/web-animations/interfaces/AnimationEffectTiming/getAnimations.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/keyframe-effect/setTarget.html",
|
"path": "web-animations/interfaces/AnimationEffectTiming/getComputedStyle.html",
|
||||||
"url": "/web-animations/keyframe-effect/setTarget.html"
|
"url": "/web-animations/interfaces/AnimationEffectTiming/getComputedStyle.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "web-animations/interfaces/AnimationEffectTiming/iterationStart.html",
|
||||||
|
"url": "/web-animations/interfaces/AnimationEffectTiming/iterationStart.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "web-animations/interfaces/AnimationEffectTiming/iterations.html",
|
||||||
|
"url": "/web-animations/interfaces/AnimationEffectTiming/iterations.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "web-animations/interfaces/AnimationTimeline/document-timeline.html",
|
||||||
|
"url": "/web-animations/interfaces/AnimationTimeline/document-timeline.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "web-animations/interfaces/AnimationTimeline/idlharness.html",
|
||||||
|
"url": "/web-animations/interfaces/AnimationTimeline/idlharness.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "web-animations/interfaces/Document/getAnimations.html",
|
||||||
|
"url": "/web-animations/interfaces/Document/getAnimations.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "web-animations/interfaces/KeyframeEffect/constructor.html",
|
||||||
|
"url": "/web-animations/interfaces/KeyframeEffect/constructor.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "web-animations/interfaces/KeyframeEffect/effect-easing.html",
|
||||||
|
"url": "/web-animations/interfaces/KeyframeEffect/effect-easing.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "web-animations/interfaces/KeyframeEffect/getComputedTiming.html",
|
||||||
|
"url": "/web-animations/interfaces/KeyframeEffect/getComputedTiming.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument.html",
|
||||||
|
"url": "/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "web-animations/interfaces/KeyframeEffect/setKeyframes.html",
|
||||||
|
"url": "/web-animations/interfaces/KeyframeEffect/setKeyframes.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "web-animations/interfaces/KeyframeEffect/setTarget.html",
|
||||||
|
"url": "/web-animations/interfaces/KeyframeEffect/setTarget.html"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "web-animations/timing-model/animation-effects/active-time.html",
|
"path": "web-animations/timing-model/animation-effects/active-time.html",
|
||||||
|
@ -34380,6 +34462,16 @@
|
||||||
"timeout": "long",
|
"timeout": "long",
|
||||||
"url": "/IndexedDB/writer-starvation.htm"
|
"url": "/IndexedDB/writer-starvation.htm"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "WebCryptoAPI/generateKey/test_failures.html",
|
||||||
|
"timeout": "long",
|
||||||
|
"url": "/WebCryptoAPI/generateKey/test_failures.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "WebCryptoAPI/generateKey/test_successes.html",
|
||||||
|
"timeout": "long",
|
||||||
|
"url": "/WebCryptoAPI/generateKey/test_successes.html"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "XMLHttpRequest/progress-events-response-data-gzip.htm",
|
"path": "XMLHttpRequest/progress-events-response-data-gzip.htm",
|
||||||
"timeout": "long",
|
"timeout": "long",
|
||||||
|
@ -35936,28 +36028,7 @@
|
||||||
"local_changes": {
|
"local_changes": {
|
||||||
"deleted": [],
|
"deleted": [],
|
||||||
"deleted_reftests": {},
|
"deleted_reftests": {},
|
||||||
"items": {
|
"items": {},
|
||||||
"testharness": {
|
|
||||||
"html/browsers/the-window-object/browser-interface-elements/status.html": [
|
|
||||||
{
|
|
||||||
"path": "html/browsers/the-window-object/browser-interface-elements/status.html",
|
|
||||||
"url": "/html/browsers/the-window-object/browser-interface-elements/status.html"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_attribute-getter-setter.html": [
|
|
||||||
{
|
|
||||||
"path": "html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_attribute-getter-setter.html",
|
|
||||||
"url": "/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_attribute-getter-setter.html"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_getter.html": [
|
|
||||||
{
|
|
||||||
"path": "html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_getter.html",
|
|
||||||
"url": "/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_getter.html"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"reftest_nodes": {}
|
"reftest_nodes": {}
|
||||||
},
|
},
|
||||||
"reftest_nodes": {
|
"reftest_nodes": {
|
||||||
|
@ -38145,16 +38216,16 @@
|
||||||
"url": "/html/rendering/bindings/the-textarea-element-0/rows-zero.html"
|
"url": "/html/rendering/bindings/the-textarea-element-0/rows-zero.html"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"html/rendering/non-replaced-elements/flow-content-0/div-align-ref.html": [
|
"html/rendering/non-replaced-elements/flow-content-0/div-align.html": [
|
||||||
{
|
{
|
||||||
"path": "html/rendering/non-replaced-elements/flow-content-0/div-align-ref.html",
|
"path": "html/rendering/non-replaced-elements/flow-content-0/div-align.html",
|
||||||
"references": [
|
"references": [
|
||||||
[
|
[
|
||||||
"/html/rendering/non-replaced-elements/flow-content-0/div-align-ref.html",
|
"/html/rendering/non-replaced-elements/flow-content-0/div-align-ref.html",
|
||||||
"=="
|
"=="
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"url": "/html/rendering/non-replaced-elements/flow-content-0/div-align-ref.html"
|
"url": "/html/rendering/non-replaced-elements/flow-content-0/div-align.html"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"html/rendering/non-replaced-elements/flow-content-0/figure.html": [
|
"html/rendering/non-replaced-elements/flow-content-0/figure.html": [
|
||||||
|
@ -42286,7 +42357,7 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"rev": "697b971060b2d475a73c1c3755232a4674d61cf5",
|
"rev": "bda2059150dca8ab47f088b4cc619fcdc1f262fa",
|
||||||
"url_base": "/",
|
"url_base": "/",
|
||||||
"version": 3
|
"version": 3
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
[failures.worker]
|
||||||
|
type: testharness
|
||||||
|
expected: TIMEOUT
|
|
@ -0,0 +1,3 @@
|
||||||
|
[successes.worker]
|
||||||
|
type: testharness
|
||||||
|
expected: TIMEOUT
|
|
@ -0,0 +1,3 @@
|
||||||
|
[test_failures.html]
|
||||||
|
type: testharness
|
||||||
|
expected: TIMEOUT
|
|
@ -0,0 +1,3 @@
|
||||||
|
[test_successes.html]
|
||||||
|
type: testharness
|
||||||
|
expected: TIMEOUT
|
164
tests/wpt/metadata/WebCryptoAPI/idlharness.html.ini
Normal file
164
tests/wpt/metadata/WebCryptoAPI/idlharness.html.ini
Normal file
|
@ -0,0 +1,164 @@
|
||||||
|
[idlharness.html]
|
||||||
|
type: testharness
|
||||||
|
[Crypto interface: attribute subtle]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Crypto interface: crypto must inherit property "subtle" with the proper type (0)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[CryptoKey interface: existence and properties of interface object]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[CryptoKey interface object length]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[CryptoKey interface object name]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[CryptoKey interface: existence and properties of interface prototype object]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[CryptoKey interface: existence and properties of interface prototype object's "constructor" property]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[CryptoKey interface: attribute type]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[CryptoKey interface: attribute extractable]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[CryptoKey interface: attribute algorithm]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[CryptoKey interface: attribute usages]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: existence and properties of interface object]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface object length]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface object name]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: existence and properties of interface prototype object]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: existence and properties of interface prototype object's "constructor" property]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: operation encrypt(AlgorithmIdentifier,CryptoKey,BufferSource)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: operation decrypt(AlgorithmIdentifier,CryptoKey,BufferSource)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: operation sign(AlgorithmIdentifier,CryptoKey,BufferSource)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: operation verify(AlgorithmIdentifier,CryptoKey,BufferSource,BufferSource)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: operation digest(AlgorithmIdentifier,BufferSource)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: operation generateKey(AlgorithmIdentifier,boolean,[object Object\])]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: operation deriveKey(AlgorithmIdentifier,CryptoKey,AlgorithmIdentifier,boolean,[object Object\])]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: operation deriveBits(AlgorithmIdentifier,CryptoKey,unsigned long)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: operation importKey(KeyFormat,[object Object\],[object Object\],AlgorithmIdentifier,boolean,[object Object\])]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: operation exportKey(KeyFormat,CryptoKey)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: operation wrapKey(KeyFormat,CryptoKey,CryptoKey,AlgorithmIdentifier)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: operation unwrapKey(KeyFormat,BufferSource,CryptoKey,AlgorithmIdentifier,AlgorithmIdentifier,boolean,[object Object\])]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto must be primary interface of crypto.subtle]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Stringification of crypto.subtle]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: crypto.subtle must inherit property "encrypt" with the proper type (0)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: calling encrypt(AlgorithmIdentifier,CryptoKey,BufferSource) on crypto.subtle with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: crypto.subtle must inherit property "decrypt" with the proper type (1)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: calling decrypt(AlgorithmIdentifier,CryptoKey,BufferSource) on crypto.subtle with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: crypto.subtle must inherit property "sign" with the proper type (2)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: calling sign(AlgorithmIdentifier,CryptoKey,BufferSource) on crypto.subtle with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: crypto.subtle must inherit property "verify" with the proper type (3)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: calling verify(AlgorithmIdentifier,CryptoKey,BufferSource,BufferSource) on crypto.subtle with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: crypto.subtle must inherit property "digest" with the proper type (4)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: calling digest(AlgorithmIdentifier,BufferSource) on crypto.subtle with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: crypto.subtle must inherit property "generateKey" with the proper type (5)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: calling generateKey(AlgorithmIdentifier,boolean,[object Object\]) on crypto.subtle with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: crypto.subtle must inherit property "deriveKey" with the proper type (6)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: calling deriveKey(AlgorithmIdentifier,CryptoKey,AlgorithmIdentifier,boolean,[object Object\]) on crypto.subtle with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: crypto.subtle must inherit property "deriveBits" with the proper type (7)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: calling deriveBits(AlgorithmIdentifier,CryptoKey,unsigned long) on crypto.subtle with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: crypto.subtle must inherit property "importKey" with the proper type (8)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: calling importKey(KeyFormat,[object Object\],[object Object\],AlgorithmIdentifier,boolean,[object Object\]) on crypto.subtle with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: crypto.subtle must inherit property "exportKey" with the proper type (9)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: calling exportKey(KeyFormat,CryptoKey) on crypto.subtle with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: crypto.subtle must inherit property "wrapKey" with the proper type (10)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: calling wrapKey(KeyFormat,CryptoKey,CryptoKey,AlgorithmIdentifier) on crypto.subtle with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: crypto.subtle must inherit property "unwrapKey" with the proper type (11)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: calling unwrapKey(KeyFormat,BufferSource,CryptoKey,AlgorithmIdentifier,AlgorithmIdentifier,boolean,[object Object\]) on crypto.subtle with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
164
tests/wpt/metadata/WebCryptoAPI/idlharness.worker.js.ini
Normal file
164
tests/wpt/metadata/WebCryptoAPI/idlharness.worker.js.ini
Normal file
|
@ -0,0 +1,164 @@
|
||||||
|
[idlharness.worker]
|
||||||
|
type: testharness
|
||||||
|
[Crypto interface: attribute subtle]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Crypto interface: crypto must inherit property "subtle" with the proper type (0)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[CryptoKey interface: existence and properties of interface object]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[CryptoKey interface object length]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[CryptoKey interface object name]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[CryptoKey interface: existence and properties of interface prototype object]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[CryptoKey interface: existence and properties of interface prototype object's "constructor" property]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[CryptoKey interface: attribute type]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[CryptoKey interface: attribute extractable]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[CryptoKey interface: attribute algorithm]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[CryptoKey interface: attribute usages]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: existence and properties of interface object]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface object length]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface object name]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: existence and properties of interface prototype object]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: existence and properties of interface prototype object's "constructor" property]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: operation encrypt(AlgorithmIdentifier,CryptoKey,BufferSource)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: operation decrypt(AlgorithmIdentifier,CryptoKey,BufferSource)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: operation sign(AlgorithmIdentifier,CryptoKey,BufferSource)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: operation verify(AlgorithmIdentifier,CryptoKey,BufferSource,BufferSource)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: operation digest(AlgorithmIdentifier,BufferSource)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: operation generateKey(AlgorithmIdentifier,boolean,[object Object\])]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: operation deriveKey(AlgorithmIdentifier,CryptoKey,AlgorithmIdentifier,boolean,[object Object\])]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: operation deriveBits(AlgorithmIdentifier,CryptoKey,unsigned long)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: operation importKey(KeyFormat,[object Object\],[object Object\],AlgorithmIdentifier,boolean,[object Object\])]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: operation exportKey(KeyFormat,CryptoKey)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: operation wrapKey(KeyFormat,CryptoKey,CryptoKey,AlgorithmIdentifier)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: operation unwrapKey(KeyFormat,BufferSource,CryptoKey,AlgorithmIdentifier,AlgorithmIdentifier,boolean,[object Object\])]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto must be primary interface of crypto.subtle]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Stringification of crypto.subtle]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: crypto.subtle must inherit property "encrypt" with the proper type (0)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: calling encrypt(AlgorithmIdentifier,CryptoKey,BufferSource) on crypto.subtle with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: crypto.subtle must inherit property "decrypt" with the proper type (1)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: calling decrypt(AlgorithmIdentifier,CryptoKey,BufferSource) on crypto.subtle with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: crypto.subtle must inherit property "sign" with the proper type (2)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: calling sign(AlgorithmIdentifier,CryptoKey,BufferSource) on crypto.subtle with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: crypto.subtle must inherit property "verify" with the proper type (3)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: calling verify(AlgorithmIdentifier,CryptoKey,BufferSource,BufferSource) on crypto.subtle with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: crypto.subtle must inherit property "digest" with the proper type (4)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: calling digest(AlgorithmIdentifier,BufferSource) on crypto.subtle with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: crypto.subtle must inherit property "generateKey" with the proper type (5)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: calling generateKey(AlgorithmIdentifier,boolean,[object Object\]) on crypto.subtle with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: crypto.subtle must inherit property "deriveKey" with the proper type (6)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: calling deriveKey(AlgorithmIdentifier,CryptoKey,AlgorithmIdentifier,boolean,[object Object\]) on crypto.subtle with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: crypto.subtle must inherit property "deriveBits" with the proper type (7)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: calling deriveBits(AlgorithmIdentifier,CryptoKey,unsigned long) on crypto.subtle with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: crypto.subtle must inherit property "importKey" with the proper type (8)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: calling importKey(KeyFormat,[object Object\],[object Object\],AlgorithmIdentifier,boolean,[object Object\]) on crypto.subtle with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: crypto.subtle must inherit property "exportKey" with the proper type (9)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: calling exportKey(KeyFormat,CryptoKey) on crypto.subtle with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: crypto.subtle must inherit property "wrapKey" with the proper type (10)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: calling wrapKey(KeyFormat,CryptoKey,CryptoKey,AlgorithmIdentifier) on crypto.subtle with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: crypto.subtle must inherit property "unwrapKey" with the proper type (11)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[SubtleCrypto interface: calling unwrapKey(KeyFormat,BufferSource,CryptoKey,AlgorithmIdentifier,AlgorithmIdentifier,boolean,[object Object\]) on crypto.subtle with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
[Event-dispatch-multiple-stopPropagation.html]
|
||||||
|
type: testharness
|
||||||
|
[ Multiple dispatchEvent() and stopPropagation() ]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
[Event-dispatch-throwing.html]
|
||||||
|
type: testharness
|
||||||
|
[Throwing in event listener with a single listeners]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Throwing in event listener with multiple listeners]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[constructors.html]
|
[Event-subclasses-constructors.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
[MouseEvent constructor (no argument)]
|
[MouseEvent constructor (no argument)]
|
||||||
expected: FAIL
|
expected: FAIL
|
|
@ -0,0 +1,5 @@
|
||||||
|
[EventListener-incumbent-global.sub.html]
|
||||||
|
type: testharness
|
||||||
|
[Check the incumbent global EventListeners are called with]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
[EventListenerOptions-capture.html]
|
||||||
|
type: testharness
|
||||||
|
[Capture option should be honored correctly]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Supports capture option]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Equivalence of option values]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
[javascript-url-return-value-handling.html]
|
||||||
|
type: testharness
|
||||||
|
expected: CRASH
|
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
||||||
[load-events-networkState.html]
|
[load-events-networkState.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
expected: TIMEOUT
|
expected: TIMEOUT
|
||||||
|
|
||||||
[NETWORK_NO_SOURCE]
|
[NETWORK_NO_SOURCE]
|
||||||
expected: TIMEOUT
|
expected: TIMEOUT
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
[iframe-allowfullscreen.html]
|
||||||
|
type: testharness
|
||||||
|
[iframe-allowfullscreen]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[iframe-sandbox-allowfullscreen]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[iframe-allowfullscreen-dialog]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[iframe-sandbox-allowfullscreen-dialog]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
[iframe_sandbox_popups_escaping.html]
|
||||||
|
type: testharness
|
||||||
|
expected: TIMEOUT
|
||||||
|
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||||
|
expected: NOTRUN
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
[iframe_sandbox_popups_nonescaping.html]
|
||||||
|
type: testharness
|
||||||
|
expected: TIMEOUT
|
||||||
|
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||||
|
expected: NOTRUN
|
||||||
|
|
|
@ -3,3 +3,30 @@
|
||||||
[keygen.form]
|
[keygen.form]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[label.form]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[label-form.form]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[label-form-form2.form]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[label-with-progress.form]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[label-with-meter.form]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[label-for-control-form-in-form.form]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[label-for-control-form.form]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[label-in-table-with-control.form]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[label-in-table-for.form]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -6,3 +6,6 @@
|
||||||
[canceled activation steps on unchecked checkbox (indeterminate=true in onclick)]
|
[canceled activation steps on unchecked checkbox (indeterminate=true in onclick)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[click on mutable checkbox fires a click event, then an input event, then a change event]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[radio.html]
|
|
||||||
type: testharness
|
|
||||||
[click on mutable radio fires click event, then input event, then change event]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -3,3 +3,9 @@
|
||||||
[A non-control follows by a control with same ID.]
|
[A non-control follows by a control with same ID.]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[A label in a form without a control]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[A label outside a form with a control inside the form]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -2,3 +2,4 @@
|
||||||
type: testharness
|
type: testharness
|
||||||
[error]
|
[error]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
f60598909a8ffd69fe1d87ee92aa94f1a26ef12e
|
3535f3f6c25b6e380d190559a5ca03ea70282fe0
|
|
@ -1,5 +0,0 @@
|
||||||
[EventObject.multiple.dispatchEvent.html]
|
|
||||||
type: testharness
|
|
||||||
[Test Description: An event object may be properly dispatched multiple times while also allowing to prevent the event objects propagation prior to the event dispatch.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[event-phases-order.html]
|
|
||||||
type: testharness
|
|
||||||
[Event phases order]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[throwing-in-listener-and-window-error-event.html]
|
|
||||||
type: testharness
|
|
||||||
[Throwing in event listener generates an error event on the window object]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -810,3 +810,12 @@
|
||||||
[Parsing: <?i> against <sc:sd/sd>]
|
[Parsing: <?i> against <sc:sd/sd>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[Parsing: <http:> against <http://example.org/foo/bar>]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Parsing: <http:> against <https://example.org/foo/bar>]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Parsing: <sc:> against <https://example.org/foo/bar>]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -810,3 +810,12 @@
|
||||||
[Parsing: <?i> against <sc:sd/sd>]
|
[Parsing: <?i> against <sc:sd/sd>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[Parsing: <http:> against <http://example.org/foo/bar>]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Parsing: <http:> against <https://example.org/foo/bar>]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Parsing: <sc:> against <https://example.org/foo/bar>]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
23
tests/wpt/metadata/url/url-setters.html.ini
Normal file
23
tests/wpt/metadata/url/url-setters.html.ini
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
[url-setters.html]
|
||||||
|
type: testharness
|
||||||
|
[Setting <http://example.net>.protocol = 'b' Can’t switch from special scheme to non-special. Note: this may change, see https://github.com/whatwg/url/issues/104]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Setting <ssh://me@example.net>.protocol = 'http' Can’t switch from non-special scheme to special. Note: this may change, see https://github.com/whatwg/url/issues/104]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Setting <http://example.net:8080>.host = 'example.com:' Port number is unchanges if empty in the new value. Note: this may change, see https://github.com/whatwg/url/pull/113]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Setting <http://example.net:8080>.port = '' Port number is unchanged if empty in the new value. Note: this may change, see https://github.com/whatwg/url/pull/113]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Setting <a:/>.pathname = '\x00\x01\t\n\r\x1f !"#$%&'()*+,-./09:;<=>?@AZ[\\\]^_`az{|}~Éé' UTF-8 percent encoding with the default encode set. Tabs and newlines are removed.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Setting <a:/>.search = '\x00\x01\t\n\r\x1f !"#$%&'()*+,-./09:;<=>?@AZ[\\\]^_`az{|}~Éé' UTF-8 percent encoding with the query encode set. Tabs and newlines are removed.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Setting <a:/>.hash = '\x00\x01\t\n\r\x1f !"#$%&'()*+,-./09:;<=>?@AZ[\\\]^_`az{|}~Éé' No percent-encoding at all (!); nuls, tabs, and newlines are removed]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
[quickCheckAPI-G_I.html]
|
[quickCheckAPI-G_I.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
disabled: https://github.com/servo/servo/issues/10656
|
disabled: https://github.com/servo/servo/issues/10656
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,20 @@
|
||||||
[copy-tex-image-2d-formats.html]
|
[copy-tex-image-2d-formats.html]
|
||||||
|
type: testharness
|
||||||
[WebGL test #3: getError expected: NO_ERROR. Was INVALID_ENUM : should be no errors]
|
[WebGL test #3: getError expected: NO_ERROR. Was INVALID_ENUM : should be no errors]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[WebGL test #6: getError expected: NO_ERROR. Was INVALID_ENUM : should be no errors]
|
[WebGL test #6: getError expected: NO_ERROR. Was INVALID_ENUM : should be no errors]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[WebGL test #9: getError expected: NO_ERROR. Was INVALID_ENUM : should be no errors]
|
[WebGL test #9: getError expected: NO_ERROR. Was INVALID_ENUM : should be no errors]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[WebGL test #12: getError expected: NO_ERROR. Was INVALID_ENUM : should be no errors]
|
[WebGL test #12: getError expected: NO_ERROR. Was INVALID_ENUM : should be no errors]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[WebGL test #15: getError expected: NO_ERROR. Was INVALID_ENUM : should be no errors]
|
[WebGL test #15: getError expected: NO_ERROR. Was INVALID_ENUM : should be no errors]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[WebGL test #16: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
|
[WebGL test #16: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -3,4 +3,3 @@
|
||||||
expected:
|
expected:
|
||||||
if os == "linux": CRASH
|
if os == "linux": CRASH
|
||||||
if os == "mac": TIMEOUT
|
if os == "mac": TIMEOUT
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
[texture-npot.html]
|
[texture-npot.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
|
|
||||||
[WebGL test #4: at (0, 0) expected: 0,0,0,255 was 192,0,128,64]
|
[WebGL test #4: at (0, 0) expected: 0,0,0,255 was 192,0,128,64]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -117,3 +116,4 @@
|
||||||
|
|
||||||
[WebGL test #83: getError expected: NO_ERROR. Was INVALID_ENUM : gl.generateMipmap with POT texture should return succeed]
|
[WebGL test #83: getError expected: NO_ERROR. Was INVALID_ENUM : gl.generateMipmap with POT texture should return succeed]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -3,4 +3,3 @@
|
||||||
expected:
|
expected:
|
||||||
if os == "linux": CRASH
|
if os == "linux": CRASH
|
||||||
if os == "mac": TIMEOUT
|
if os == "mac": TIMEOUT
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,105 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<title>IndexedDB: Exception Order of IDBObjectStore.createIndex()</title>
|
||||||
|
<link rel="author" title="Mozilla" href="https://www.mozilla.org">
|
||||||
|
<link rel="help" href="http://w3c.github.io/IndexedDB/#dom-idbobjectstore-createindex">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
function indexeddb_test(description, upgrade_func, open_func = null) {
|
||||||
|
async_test(function(t) {
|
||||||
|
var dbname = document.location + "-" + t.name;
|
||||||
|
var del = indexedDB.deleteDatabase(dbname);
|
||||||
|
del.onerror = t.unreached_func("deleteDatabase should succeed");
|
||||||
|
var open = indexedDB.open(dbname, 1);
|
||||||
|
open.onerror = t.unreached_func("open should succeed");
|
||||||
|
open.onupgradeneeded = t.step_func(function() {
|
||||||
|
var db = open.result;
|
||||||
|
var tx = open.transaction;
|
||||||
|
upgrade_func(t, db, tx);
|
||||||
|
});
|
||||||
|
if (open_func) {
|
||||||
|
open.onsuccess = t.step_func(function() {
|
||||||
|
var db = open.result;
|
||||||
|
open_func(t, db);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, description);
|
||||||
|
}
|
||||||
|
|
||||||
|
indexeddb_test(
|
||||||
|
"InvalidStateError(Incorrect mode) vs. TransactionInactiveError",
|
||||||
|
function(t, db, txn) {
|
||||||
|
var store = db.createObjectStore("s");
|
||||||
|
},
|
||||||
|
function(t, db) {
|
||||||
|
var txn = db.transaction("s");
|
||||||
|
var store = txn.objectStore("s");
|
||||||
|
txn.oncomplete = function() {
|
||||||
|
assert_throws("InvalidStateError", function() {
|
||||||
|
store.createIndex("index", "foo");
|
||||||
|
}, "Mode check should precede state check of the transaction");
|
||||||
|
t.done();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
var gDeletedObjectStore;
|
||||||
|
indexeddb_test(
|
||||||
|
"InvalidStateError(Deleted ObjectStore) vs. TransactionInactiveError",
|
||||||
|
function(t, db, txn) {
|
||||||
|
gDeletedObjectStore = db.createObjectStore("s");
|
||||||
|
db.deleteObjectStore("s");
|
||||||
|
txn.oncomplete = function() {
|
||||||
|
assert_throws("InvalidStateError", function() {
|
||||||
|
gDeletedObjectStore.createIndex("index", "foo");
|
||||||
|
}, "Deletion check should precede transaction-state check");
|
||||||
|
t.done();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
indexeddb_test(
|
||||||
|
"TransactionInactiveError vs. ConstraintError",
|
||||||
|
function(t, db, txn) {
|
||||||
|
var store = db.createObjectStore("s");
|
||||||
|
store.createIndex("index", "foo");
|
||||||
|
txn.oncomplete = function() {
|
||||||
|
assert_throws("TransactionInactiveError", function() {
|
||||||
|
store.createIndex("index", "foo");
|
||||||
|
}, "Transaction-state check should precede index name check");
|
||||||
|
t.done();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
indexeddb_test(
|
||||||
|
"ConstraintError vs. SyntaxError",
|
||||||
|
function(t, db) {
|
||||||
|
var store = db.createObjectStore("s");
|
||||||
|
store.createIndex("index", "foo");
|
||||||
|
assert_throws("ConstraintError", function() {
|
||||||
|
store.createIndex("index", "invalid key path");
|
||||||
|
}, "Index name check should precede syntax check of the key path");
|
||||||
|
assert_throws("ConstraintError", function() {
|
||||||
|
store.createIndex("index",
|
||||||
|
["invalid key path 1", "invalid key path 2"]);
|
||||||
|
}, "Index name check should precede syntax check of the key path");
|
||||||
|
t.done();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
indexeddb_test(
|
||||||
|
"SyntaxError vs. InvalidAccessError",
|
||||||
|
function(t, db) {
|
||||||
|
var store = db.createObjectStore("s");
|
||||||
|
assert_throws("SyntaxError", function() {
|
||||||
|
store.createIndex("index",
|
||||||
|
["invalid key path 1", "invalid key path 2"],
|
||||||
|
{ multiEntry: true });
|
||||||
|
}, "Syntax check should precede multiEntry check of the key path");
|
||||||
|
t.done();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
</script>
|
|
@ -11,13 +11,11 @@ request.onload = function() {
|
||||||
var idls = request.responseText;
|
var idls = request.responseText;
|
||||||
|
|
||||||
idlArray.add_untested_idls("interface WorkerGlobalScope {};");
|
idlArray.add_untested_idls("interface WorkerGlobalScope {};");
|
||||||
idlArray.add_untested_idls("interface WorkerUtils {};");
|
|
||||||
idlArray.add_untested_idls("WorkerGlobalScope implements WorkerUtils;");
|
|
||||||
idlArray.add_untested_idls("interface Event { };");
|
idlArray.add_untested_idls("interface Event { };");
|
||||||
idlArray.add_untested_idls("interface EventTarget { };");
|
idlArray.add_untested_idls("interface EventTarget { };");
|
||||||
|
|
||||||
// From Indexed DB:
|
// From Indexed DB:
|
||||||
idlArray.add_idls("WorkerUtils implements IDBEnvironment;");
|
idlArray.add_idls("WorkerGlobalScope implements IDBEnvironment;");
|
||||||
idlArray.add_idls(idls);
|
idlArray.add_idls(idls);
|
||||||
|
|
||||||
idlArray.add_objects({
|
idlArray.add_objects({
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
@Wafflespeanut
|
@Wafflespeanut
|
||||||
@Ms2ger
|
@Ms2ger
|
||||||
|
@jimsch
|
||||||
|
@engelke
|
||||||
|
|
277
tests/wpt/web-platform-tests/WebCryptoAPI/WebCryptoAPI.idl
Normal file
277
tests/wpt/web-platform-tests/WebCryptoAPI/WebCryptoAPI.idl
Normal file
|
@ -0,0 +1,277 @@
|
||||||
|
[NoInterfaceObject]
|
||||||
|
interface GlobalCrypto {
|
||||||
|
readonly attribute Crypto crypto;
|
||||||
|
};
|
||||||
|
|
||||||
|
//Window implements GlobalCrypto;
|
||||||
|
//WorkerGlobalScope implements GlobalCrypto;
|
||||||
|
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
|
interface Crypto {
|
||||||
|
readonly attribute SubtleCrypto subtle;
|
||||||
|
ArrayBufferView getRandomValues(ArrayBufferView array);
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef (object or DOMString) AlgorithmIdentifier;
|
||||||
|
|
||||||
|
typedef AlgorithmIdentifier HashAlgorithmIdentifier;
|
||||||
|
|
||||||
|
dictionary Algorithm {
|
||||||
|
required DOMString name;
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary KeyAlgorithm {
|
||||||
|
required DOMString name;
|
||||||
|
};
|
||||||
|
|
||||||
|
enum KeyType { "public", "private", "secret" };
|
||||||
|
|
||||||
|
enum KeyUsage { "encrypt", "decrypt", "sign", "verify", "deriveKey", "deriveBits", "wrapKey", "unwrapKey" };
|
||||||
|
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
|
interface CryptoKey {
|
||||||
|
readonly attribute KeyType type;
|
||||||
|
readonly attribute boolean extractable;
|
||||||
|
readonly attribute object algorithm;
|
||||||
|
readonly attribute object usages;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
enum KeyFormat { "raw", "spki", "pkcs8", "jwk" };
|
||||||
|
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
|
interface SubtleCrypto {
|
||||||
|
Promise<any> encrypt(AlgorithmIdentifier algorithm,
|
||||||
|
CryptoKey key,
|
||||||
|
BufferSource data);
|
||||||
|
Promise<any> decrypt(AlgorithmIdentifier algorithm,
|
||||||
|
CryptoKey key,
|
||||||
|
BufferSource data);
|
||||||
|
Promise<any> sign(AlgorithmIdentifier algorithm,
|
||||||
|
CryptoKey key,
|
||||||
|
BufferSource data);
|
||||||
|
Promise<any> verify(AlgorithmIdentifier algorithm,
|
||||||
|
CryptoKey key,
|
||||||
|
BufferSource signature,
|
||||||
|
BufferSource data);
|
||||||
|
Promise<any> digest(AlgorithmIdentifier algorithm,
|
||||||
|
BufferSource data);
|
||||||
|
|
||||||
|
Promise<any> generateKey(AlgorithmIdentifier algorithm,
|
||||||
|
boolean extractable,
|
||||||
|
sequence<KeyUsage> keyUsages );
|
||||||
|
Promise<any> deriveKey(AlgorithmIdentifier algorithm,
|
||||||
|
CryptoKey baseKey,
|
||||||
|
AlgorithmIdentifier derivedKeyType,
|
||||||
|
boolean extractable,
|
||||||
|
sequence<KeyUsage> keyUsages );
|
||||||
|
Promise<any> deriveBits(AlgorithmIdentifier algorithm,
|
||||||
|
CryptoKey baseKey,
|
||||||
|
unsigned long length);
|
||||||
|
|
||||||
|
Promise<any> importKey(KeyFormat format,
|
||||||
|
(BufferSource or JsonWebKey) keyData,
|
||||||
|
AlgorithmIdentifier algorithm,
|
||||||
|
boolean extractable,
|
||||||
|
sequence<KeyUsage> keyUsages );
|
||||||
|
Promise<any> exportKey(KeyFormat format, CryptoKey key);
|
||||||
|
|
||||||
|
Promise<any> wrapKey(KeyFormat format,
|
||||||
|
CryptoKey key,
|
||||||
|
CryptoKey wrappingKey,
|
||||||
|
AlgorithmIdentifier wrapAlgorithm);
|
||||||
|
Promise<any> unwrapKey(KeyFormat format,
|
||||||
|
BufferSource wrappedKey,
|
||||||
|
CryptoKey unwrappingKey,
|
||||||
|
AlgorithmIdentifier unwrapAlgorithm,
|
||||||
|
AlgorithmIdentifier unwrappedKeyAlgorithm,
|
||||||
|
boolean extractable,
|
||||||
|
sequence<KeyUsage> keyUsages );
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary RsaOtherPrimesInfo {
|
||||||
|
// The following fields are defined in Section 6.3.2.7 of JSON Web Algorithms
|
||||||
|
DOMString r;
|
||||||
|
DOMString d;
|
||||||
|
DOMString t;
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary JsonWebKey {
|
||||||
|
// The following fields are defined in Section 3.1 of JSON Web Key
|
||||||
|
DOMString kty;
|
||||||
|
DOMString use;
|
||||||
|
sequence<DOMString> key_ops;
|
||||||
|
DOMString alg;
|
||||||
|
|
||||||
|
// The following fields are defined in JSON Web Key Parameters Registration
|
||||||
|
boolean ext;
|
||||||
|
|
||||||
|
// The following fields are defined in Section 6 of JSON Web Algorithms
|
||||||
|
DOMString crv;
|
||||||
|
DOMString x;
|
||||||
|
DOMString y;
|
||||||
|
DOMString d;
|
||||||
|
DOMString n;
|
||||||
|
DOMString e;
|
||||||
|
DOMString p;
|
||||||
|
DOMString q;
|
||||||
|
DOMString dp;
|
||||||
|
DOMString dq;
|
||||||
|
DOMString qi;
|
||||||
|
sequence<RsaOtherPrimesInfo> oth;
|
||||||
|
DOMString k;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef Uint8Array BigInteger;
|
||||||
|
|
||||||
|
dictionary CryptoKeyPair {
|
||||||
|
CryptoKey publicKey;
|
||||||
|
CryptoKey privateKey;
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary RsaKeyGenParams : Algorithm {
|
||||||
|
// The length, in bits, of the RSA modulus
|
||||||
|
[EnforceRange] required unsigned long modulusLength;
|
||||||
|
// The RSA public exponent
|
||||||
|
required BigInteger publicExponent;
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary RsaHashedKeyGenParams : RsaKeyGenParams {
|
||||||
|
// The hash algorithm to use
|
||||||
|
required HashAlgorithmIdentifier hash;
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary RsaKeyAlgorithm : KeyAlgorithm {
|
||||||
|
// The length, in bits, of the RSA modulus
|
||||||
|
required unsigned long modulusLength;
|
||||||
|
// The RSA public exponent
|
||||||
|
required BigInteger publicExponent;
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary RsaHashedKeyAlgorithm : RsaKeyAlgorithm {
|
||||||
|
// The hash algorithm that is used with this key
|
||||||
|
required KeyAlgorithm hash;
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary RsaHashedImportParams {
|
||||||
|
// The hash algorithm to use
|
||||||
|
required HashAlgorithmIdentifier hash;
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary RsaPssParams : Algorithm {
|
||||||
|
// The desired length of the random salt
|
||||||
|
[EnforceRange] required unsigned long saltLength;
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary RsaOaepParams : Algorithm {
|
||||||
|
// The optional label/application data to associate with the message
|
||||||
|
BufferSource label;
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary EcdsaParams : Algorithm {
|
||||||
|
// The hash algorithm to use
|
||||||
|
required HashAlgorithmIdentifier hash;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef DOMString NamedCurve;
|
||||||
|
|
||||||
|
dictionary EcKeyGenParams : Algorithm {
|
||||||
|
// A named curve
|
||||||
|
required NamedCurve namedCurve;
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary EcKeyAlgorithm : KeyAlgorithm {
|
||||||
|
// The named curve that the key uses
|
||||||
|
required NamedCurve namedCurve;
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary EcKeyImportParams : Algorithm {
|
||||||
|
// A named curve
|
||||||
|
required NamedCurve namedCurve;
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary EcdhKeyDeriveParams : Algorithm {
|
||||||
|
// The peer's EC public key.
|
||||||
|
required CryptoKey public;
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary AesCtrParams : Algorithm {
|
||||||
|
// The initial value of the counter block. counter MUST be 16 bytes
|
||||||
|
// (the AES block size). The counter bits are the rightmost length
|
||||||
|
// bits of the counter block. The rest of the counter block is for
|
||||||
|
// the nonce. The counter bits are incremented using the standard
|
||||||
|
// incrementing function specified in NIST SP 800-38A Appendix B.1:
|
||||||
|
// the counter bits are interpreted as a big-endian integer and
|
||||||
|
// incremented by one.
|
||||||
|
required BufferSource counter;
|
||||||
|
// The length, in bits, of the rightmost part of the counter block
|
||||||
|
// that is incremented.
|
||||||
|
[EnforceRange] required octet length;
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary AesKeyAlgorithm : KeyAlgorithm {
|
||||||
|
// The length, in bits, of the key.
|
||||||
|
required unsigned short length;
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary AesKeyGenParams : Algorithm {
|
||||||
|
// The length, in bits, of the key.
|
||||||
|
[EnforceRange] required unsigned short length;
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary AesDerivedKeyParams : Algorithm {
|
||||||
|
// The length, in bits, of the key.
|
||||||
|
[EnforceRange] required unsigned short length;
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary AesCbcParams : Algorithm {
|
||||||
|
// The initialization vector. MUST be 16 bytes.
|
||||||
|
required BufferSource iv;
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary AesGcmParams : Algorithm {
|
||||||
|
// The initialization vector to use. May be up to 2^64-1 bytes long.
|
||||||
|
required BufferSource iv;
|
||||||
|
// The additional authentication data to include.
|
||||||
|
BufferSource additionalData;
|
||||||
|
// The desired length of the authentication tag. May be 0 - 128.
|
||||||
|
[EnforceRange] octet tagLength;
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary HmacImportParams : Algorithm {
|
||||||
|
// The inner hash function to use.
|
||||||
|
HashAlgorithmIdentifier hash;
|
||||||
|
// The length (in bits) of the key.
|
||||||
|
[EnforceRange] unsigned long length;
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary HmacKeyAlgorithm : KeyAlgorithm {
|
||||||
|
// The inner hash function to use.
|
||||||
|
required KeyAlgorithm hash;
|
||||||
|
// The length (in bits) of the key.
|
||||||
|
required unsigned long length;
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary HmacKeyGenParams : Algorithm {
|
||||||
|
// The inner hash function to use.
|
||||||
|
required HashAlgorithmIdentifier hash;
|
||||||
|
// The length (in bits) of the key to generate. If unspecified, the
|
||||||
|
// recommended length will be used, which is the size of the associated hash function's block
|
||||||
|
// size.
|
||||||
|
[EnforceRange] unsigned long length;
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary HkdfCtrParams : Algorithm {
|
||||||
|
// The algorithm to use with HMAC (e.g.: SHA-256)
|
||||||
|
required HashAlgorithmIdentifier hash;
|
||||||
|
// A bit string that corresponds to the label that identifies the purpose for the derived keying material.
|
||||||
|
required BufferSource label;
|
||||||
|
// A bit string that corresponds to the context of the key derivation, as described in Section 5 of [NIST SP800-108]
|
||||||
|
required BufferSource context;
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary Pbkdf2Params : Algorithm {
|
||||||
|
required BufferSource salt;
|
||||||
|
[EnforceRange] required unsigned long iterations;
|
||||||
|
required HashAlgorithmIdentifier hash;
|
||||||
|
};
|
|
@ -0,0 +1,213 @@
|
||||||
|
function run_test(algorithmNames) {
|
||||||
|
var subtle = crypto.subtle; // Change to test prefixed implementations
|
||||||
|
|
||||||
|
setup({explicit_timeout: true});
|
||||||
|
|
||||||
|
// These tests check that generateKey throws an error, and that
|
||||||
|
// the error is of the right type, for a wide set of incorrect parameters.
|
||||||
|
//
|
||||||
|
// Error testing occurs by setting the parameter that should trigger the
|
||||||
|
// error to an invalid value, then combining that with all valid
|
||||||
|
// parameters that should be checked earlier by generateKey, and all
|
||||||
|
// valid and invalid parameters that should be checked later by
|
||||||
|
// generateKey.
|
||||||
|
//
|
||||||
|
// There are a lot of combinations of possible parameters for both
|
||||||
|
// success and failure modes, resulting in a very large number of tests
|
||||||
|
// performed.
|
||||||
|
|
||||||
|
|
||||||
|
// Setup: define the correct behaviors that should be sought, and create
|
||||||
|
// helper functions that generate all possible test parameters for
|
||||||
|
// different situations.
|
||||||
|
|
||||||
|
var allTestVectors = [ // Parameters that should work for generateKey
|
||||||
|
{name: "AES-CTR", resultType: CryptoKey, usages: ["encrypt", "decrypt", "wrapKey", "unwrapKey"], mandatoryUsages: []},
|
||||||
|
{name: "AES-CBC", resultType: CryptoKey, usages: ["encrypt", "decrypt", "wrapKey", "unwrapKey"], mandatoryUsages: []},
|
||||||
|
{name: "AES-GCM", resultType: CryptoKey, usages: ["encrypt", "decrypt", "wrapKey", "unwrapKey"], mandatoryUsages: []},
|
||||||
|
{name: "AES-KW", resultType: CryptoKey, usages: ["wrapKey", "unwrapKey"], mandatoryUsages: []},
|
||||||
|
{name: "HMAC", resultType: CryptoKey, usages: ["sign", "verify"], mandatoryUsages: []},
|
||||||
|
{name: "RSASSA-PKCS1-v1_5", resultType: "CryptoKeyPair", usages: ["sign", "verify"], mandatoryUsages: ["sign"]},
|
||||||
|
{name: "RSA-PSS", resultType: "CryptoKeyPair", usages: ["sign", "verify"], mandatoryUsages: ["sign"]},
|
||||||
|
{name: "RSA-OAEP", resultType: "CryptoKeyPair", usages: ["encrypt", "decrypt", "wrapKey", "unwrapKey"], mandatoryUsages: ["decrypt", "unwrapKey"]},
|
||||||
|
{name: "ECDSA", resultType: "CryptoKeyPair", usages: ["sign", "verify"], mandatoryUsages: ["sign"]},
|
||||||
|
{name: "ECDH", resultType: "CryptoKeyPair", usages: ["deriveKey", "deriveBits"], mandatoryUsages: ["deriveKey", "deriveBits"]}
|
||||||
|
];
|
||||||
|
|
||||||
|
var testVectors = [];
|
||||||
|
allTestVectors.forEach(function(vector) {
|
||||||
|
if (!algorithmNames || algorithmNames.includes(vector.name)) {
|
||||||
|
testVectors.push(vector);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function parameterString(algorithm, extractable, usages) {
|
||||||
|
if (typeof algorithm !== "object" && typeof algorithm !== "string") {
|
||||||
|
alert(algorithm);
|
||||||
|
}
|
||||||
|
|
||||||
|
var result = "(" +
|
||||||
|
objectToString(algorithm) + ", " +
|
||||||
|
objectToString(extractable) + ", " +
|
||||||
|
objectToString(usages) +
|
||||||
|
")";
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Test that a given combination of parameters results in an error,
|
||||||
|
// AND that it is the correct kind of error.
|
||||||
|
//
|
||||||
|
// Expected error is either a number, tested against the error code,
|
||||||
|
// or a string, tested against the error name.
|
||||||
|
function testError(algorithm, extractable, usages, expectedError, testTag) {
|
||||||
|
promise_test(function(test) {
|
||||||
|
return crypto.subtle.generateKey(algorithm, extractable, usages)
|
||||||
|
.then(function(result) {
|
||||||
|
assert_unreached("Operation succeeded, but should not have");
|
||||||
|
}, function(err) {
|
||||||
|
if (typeof expectedError === "number") {
|
||||||
|
assert_equals(err.code, expectedError, testTag + " not supported");
|
||||||
|
} else {
|
||||||
|
assert_equals(err.name, expectedError, testTag + " not supported");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}, testTag + ": generateKey" + parameterString(algorithm, extractable, usages));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Given an algorithm name, create several invalid parameters.
|
||||||
|
function badAlgorithmPropertySpecifiersFor(algorithmName) {
|
||||||
|
var results = [];
|
||||||
|
|
||||||
|
if (algorithmName.toUpperCase().substring(0, 3) === "AES") {
|
||||||
|
// Specifier properties are name and length
|
||||||
|
[64, 127, 129, 255, 257, 512].forEach(function(length) {
|
||||||
|
results.push({name: algorithmName, length: length});
|
||||||
|
});
|
||||||
|
} else if (algorithmName.toUpperCase().substring(0, 3) === "RSA") {
|
||||||
|
[new Uint8Array([1]), new Uint8Array([1,0,0])].forEach(function(publicExponent) {
|
||||||
|
results.push({name: algorithmName, hash: "SHA-256", modulusLength: 1024, publicExponent: publicExponent});
|
||||||
|
});
|
||||||
|
} else if (algorithmName.toUpperCase().substring(0, 2) === "EC") {
|
||||||
|
["P-512", "Curve25519"].forEach(function(curveName) {
|
||||||
|
results.push({name: algorithmName, namedCurve: curveName});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Don't create an exhaustive list of all invalid usages,
|
||||||
|
// because there would usually be nearly 2**8 of them,
|
||||||
|
// way too many to test. Instead, create every singleton
|
||||||
|
// of an illegal usage, and "poison" every valid usage
|
||||||
|
// with an illegal one.
|
||||||
|
function invalidUsages(validUsages, mandatoryUsages) {
|
||||||
|
var results = [];
|
||||||
|
|
||||||
|
var illegalUsages = [];
|
||||||
|
["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey", "deriveKey", "deriveBits"].forEach(function(usage) {
|
||||||
|
if (!validUsages.includes(usage)) {
|
||||||
|
illegalUsages.push(usage);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var goodUsageCombinations = allValidUsages(validUsages, false, mandatoryUsages);
|
||||||
|
|
||||||
|
illegalUsages.forEach(function(illegalUsage) {
|
||||||
|
results.push([illegalUsage]);
|
||||||
|
goodUsageCombinations.forEach(function(usageCombination) {
|
||||||
|
results.push(usageCombination.concat([illegalUsage]));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Now test for properly handling errors
|
||||||
|
// - Unsupported algorithm
|
||||||
|
// - Bad usages for algorithm
|
||||||
|
// - Bad key lengths
|
||||||
|
|
||||||
|
// Algorithm normalization should fail with "Not supported"
|
||||||
|
var badAlgorithmNames = [
|
||||||
|
"AES",
|
||||||
|
{name: "AES"},
|
||||||
|
{name: "AES", length: 128},
|
||||||
|
{name: "AES-CMAC", length: 128}, // Removed after CR
|
||||||
|
{name: "AES-CFB", length: 128}, // Removed after CR
|
||||||
|
{name: "HMAC", hash: "MD5"},
|
||||||
|
{name: "RSA", hash: "SHA-256", modulusLength: 2048, publicExponent: new Uint8Array([1,0,1])},
|
||||||
|
{name: "RSA-PSS", hash: "SHA", modulusLength: 2048, publicExponent: new Uint8Array([1,0,1])},
|
||||||
|
{name: "EC", namedCurve: "P521"}
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
// Algorithm normalization failures should be found first
|
||||||
|
// - all other parameters can be good or bad, should fail
|
||||||
|
// due to NotSupportedError.
|
||||||
|
badAlgorithmNames.forEach(function(algorithm) {
|
||||||
|
allValidUsages(["decrypt", "sign", "deriveBits"], true, []) // Small search space, shouldn't matter because should fail before used
|
||||||
|
.forEach(function(usages) {
|
||||||
|
[false, true, "RED", 7].forEach(function(extractable){
|
||||||
|
testError(algorithm, extractable, usages, "NotSupportedError", "Bad algorithm");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// Algorithms normalize okay, but usages bad (though not empty).
|
||||||
|
// It shouldn't matter what other extractable is. Should fail
|
||||||
|
// due to SyntaxError
|
||||||
|
testVectors.forEach(function(vector) {
|
||||||
|
var name = vector.name;
|
||||||
|
|
||||||
|
allAlgorithmSpecifiersFor(name).forEach(function(algorithm) {
|
||||||
|
invalidUsages(vector.usages, vector.mandatoryUsages).forEach(function(usages) {
|
||||||
|
[true].forEach(function(extractable) {
|
||||||
|
testError(algorithm, extractable, usages, "SyntaxError", "Bad usages");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// Other algorithm properties should be checked next, so try good
|
||||||
|
// algorithm names and usages, but bad algorithm properties next.
|
||||||
|
// - Special case: normally bad usage [] isn't checked until after properties,
|
||||||
|
// so it's included in this test case. It should NOT cause an error.
|
||||||
|
testVectors.forEach(function(vector) {
|
||||||
|
var name = vector.name;
|
||||||
|
badAlgorithmPropertySpecifiersFor(name).forEach(function(algorithm) {
|
||||||
|
allValidUsages(vector.usages, true, vector.mandatoryUsages)
|
||||||
|
.forEach(function(usages) {
|
||||||
|
[false, true].forEach(function(extractable) {
|
||||||
|
if (name.substring(0,2) === "EC") {
|
||||||
|
testError(algorithm, extractable, usages, "NotSupportedError", "Bad algorithm property");
|
||||||
|
} else {
|
||||||
|
testError(algorithm, extractable, usages, "OperationError", "Bad algorithm property");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// The last thing that should be checked is an empty usages (for secret keys).
|
||||||
|
testVectors.forEach(function(vector) {
|
||||||
|
var name = vector.name;
|
||||||
|
|
||||||
|
allAlgorithmSpecifiersFor(name).forEach(function(algorithm) {
|
||||||
|
var usages = [];
|
||||||
|
[false, true].forEach(function(extractable) {
|
||||||
|
testError(algorithm, extractable, usages, "SyntaxError", "Empty usages");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
importScripts("/resources/testharness.js");
|
||||||
|
importScripts("../util/helpers.js");
|
||||||
|
importScripts("failures.js");
|
||||||
|
run_test();
|
||||||
|
done();
|
|
@ -0,0 +1,79 @@
|
||||||
|
|
||||||
|
function run_test(algorithmNames) {
|
||||||
|
var subtle = crypto.subtle; // Change to test prefixed implementations
|
||||||
|
|
||||||
|
setup({explicit_timeout: true});
|
||||||
|
|
||||||
|
// These tests check that generateKey successfully creates keys
|
||||||
|
// when provided any of a wide set of correct parameters.
|
||||||
|
//
|
||||||
|
// There are a lot of combinations of possible parameters,
|
||||||
|
// resulting in a very large number of tests
|
||||||
|
// performed.
|
||||||
|
|
||||||
|
|
||||||
|
// Setup: define the correct behaviors that should be sought, and create
|
||||||
|
// helper functions that generate all possible test parameters for
|
||||||
|
// different situations.
|
||||||
|
|
||||||
|
var testVectors = [ // Parameters that should work for generateKey
|
||||||
|
{name: "AES-CTR", resultType: CryptoKey, usages: ["encrypt", "decrypt", "wrapKey", "unwrapKey"], mandatoryUsages: []},
|
||||||
|
{name: "AES-CBC", resultType: CryptoKey, usages: ["encrypt", "decrypt", "wrapKey", "unwrapKey"], mandatoryUsages: []},
|
||||||
|
{name: "AES-GCM", resultType: CryptoKey, usages: ["encrypt", "decrypt", "wrapKey", "unwrapKey"], mandatoryUsages: []},
|
||||||
|
{name: "AES-KW", resultType: CryptoKey, usages: ["wrapKey", "unwrapKey"], mandatoryUsages: []},
|
||||||
|
{name: "HMAC", resultType: CryptoKey, usages: ["sign", "verify"], mandatoryUsages: []},
|
||||||
|
{name: "RSASSA-PKCS1-v1_5", resultType: "CryptoKeyPair", usages: ["sign", "verify"], mandatoryUsages: ["sign"]},
|
||||||
|
{name: "RSA-PSS", resultType: "CryptoKeyPair", usages: ["sign", "verify"], mandatoryUsages: ["sign"]},
|
||||||
|
{name: "RSA-OAEP", resultType: "CryptoKeyPair", usages: ["encrypt", "decrypt", "wrapKey", "unwrapKey"], mandatoryUsages: ["decrypt", "unwrapKey"]},
|
||||||
|
{name: "ECDSA", resultType: "CryptoKeyPair", usages: ["sign", "verify"], mandatoryUsages: ["sign"]},
|
||||||
|
{name: "ECDH", resultType: "CryptoKeyPair", usages: ["deriveKey", "deriveBits"], mandatoryUsages: ["deriveKey", "deriveBits"]}
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
function parameterString(algorithm, extractable, usages) {
|
||||||
|
var result = "(" +
|
||||||
|
objectToString(algorithm) + ", " +
|
||||||
|
objectToString(extractable) + ", " +
|
||||||
|
objectToString(usages) +
|
||||||
|
")";
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Test that a given combination of parameters is successful
|
||||||
|
function testSuccess(algorithm, extractable, usages, resultType, testTag) {
|
||||||
|
// algorithm, extractable, and usages are the generateKey parameters
|
||||||
|
// resultType is the expected result, either the CryptoKey object or "CryptoKeyPair"
|
||||||
|
// testTag is a string to prepend to the test name.
|
||||||
|
|
||||||
|
promise_test(function(test) {
|
||||||
|
return subtle.generateKey(algorithm, extractable, usages)
|
||||||
|
.then(function(result) {
|
||||||
|
if (resultType === "CryptoKeyPair") {
|
||||||
|
assert_goodCryptoKey(result.privateKey, algorithm, extractable, usages, "private");
|
||||||
|
assert_goodCryptoKey(result.publicKey, algorithm, extractable, usages, "public");
|
||||||
|
} else {
|
||||||
|
assert_goodCryptoKey(result, algorithm, extractable, usages, "secret");
|
||||||
|
}
|
||||||
|
}, function(err) {
|
||||||
|
assert_unreached("Threw an unexpected error: " + err.toString());
|
||||||
|
});
|
||||||
|
}, testTag + ": generateKey" + parameterString(algorithm, extractable, usages));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Test all valid sets of parameters for successful
|
||||||
|
// key generation.
|
||||||
|
testVectors.forEach(function(vector) {
|
||||||
|
allNameVariants(vector.name).forEach(function(name) {
|
||||||
|
allAlgorithmSpecifiersFor(name).forEach(function(algorithm) {
|
||||||
|
allValidUsages(vector.usages, false, vector.mandatoryUsages).forEach(function(usages) {
|
||||||
|
[false, true].forEach(function(extractable) {
|
||||||
|
testSuccess(algorithm, extractable, usages, vector.resultType, "Success");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
importScripts("/resources/testharness.js");
|
||||||
|
importScripts("../util/helpers.js");
|
||||||
|
importScripts("successes.js");
|
||||||
|
|
||||||
|
run_test();
|
||||||
|
done();
|
|
@ -0,0 +1,18 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<meta charset=utf-8>
|
||||||
|
<meta name="timeout" content="long">
|
||||||
|
<title>WebCryptoAPI: generateKey() for Failures</title>
|
||||||
|
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||||
|
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
|
||||||
|
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||||
|
<script src="failures.js"></script>
|
||||||
|
|
||||||
|
<h1>generateKey Tests for Bad Parameters</h1>
|
||||||
|
|
||||||
|
<div id="log"></div>
|
||||||
|
<script>
|
||||||
|
run_test();
|
||||||
|
</script>
|
|
@ -0,0 +1,23 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<meta charset=utf-8>
|
||||||
|
<meta name="timeout" content="long">
|
||||||
|
<title>WebCryptoAPI: generateKey() Successful Calls</title>
|
||||||
|
<link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com">
|
||||||
|
<link rel="help" href="https://www.w3.org/TR/WebCryptoAPI/#dfn-SubtleCrypto-method-generateKey">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
|
||||||
|
<script src="/WebCryptoAPI/util/helpers.js"></script>
|
||||||
|
<script src="successes.js"></script>
|
||||||
|
|
||||||
|
<h1>generateKey Tests for Good Parameters</h1>
|
||||||
|
<p>
|
||||||
|
<strong>Warning!</strong> RSA key generation is intrinsically
|
||||||
|
very slow, so the related tests can take up to
|
||||||
|
several minutes to complete, depending on browser!
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div id="log"></div>
|
||||||
|
<script>
|
||||||
|
run_test();
|
||||||
|
</script>
|
45
tests/wpt/web-platform-tests/WebCryptoAPI/idlharness.html
Normal file
45
tests/wpt/web-platform-tests/WebCryptoAPI/idlharness.html
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset=utf-8>
|
||||||
|
<title>IDL check of WebCrypto</title>
|
||||||
|
<link rel="help" href="https://w3c.github.io/webcrypto/Overview.html#crypto-interface">
|
||||||
|
|
||||||
|
<script src=/resources/testharness.js></script>
|
||||||
|
<script src=/resources/testharnessreport.js></script>
|
||||||
|
<script src=/resources/WebIDLParser.js></script>
|
||||||
|
<script src=/resources/idlharness.js></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1 class="instructions">Description</h1>
|
||||||
|
|
||||||
|
<p class="instructions">This test verifies that the implementations of the WebCrypto API match with its WebIDL definition.</p>
|
||||||
|
|
||||||
|
<div id='log'></div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var file_input;
|
||||||
|
setup(function() {
|
||||||
|
var idl_array = new IdlArray();
|
||||||
|
|
||||||
|
var request = new XMLHttpRequest();
|
||||||
|
request.open("GET", "WebCryptoAPI.idl");
|
||||||
|
request.send();
|
||||||
|
request.onload = function() {
|
||||||
|
var idls = request.responseText;
|
||||||
|
|
||||||
|
idl_array.add_untested_idls("[PrimaryGlobal] interface Window { };");
|
||||||
|
|
||||||
|
idl_array.add_untested_idls("interface ArrayBuffer {};");
|
||||||
|
idl_array.add_untested_idls("interface ArrayBufferView {};");
|
||||||
|
|
||||||
|
idl_array.add_idls(idls);
|
||||||
|
|
||||||
|
idl_array.add_objects({"Crypto":["crypto"], "SubtleCrypto":["crypto.subtle"]});
|
||||||
|
|
||||||
|
idl_array.test();
|
||||||
|
done();
|
||||||
|
};
|
||||||
|
}, {explicit_done: true});
|
||||||
|
</script>
|
|
@ -0,0 +1,22 @@
|
||||||
|
importScripts("/resources/testharness.js");
|
||||||
|
importScripts("/resources/WebIDLParser.js", "/resources/idlharness.js");
|
||||||
|
|
||||||
|
var request = new XMLHttpRequest();
|
||||||
|
request.open("GET", "WebCryptoAPI.idl");
|
||||||
|
request.send();
|
||||||
|
request.onload = function() {
|
||||||
|
var idl_array = new IdlArray();
|
||||||
|
var idls = request.responseText;
|
||||||
|
|
||||||
|
idl_array.add_untested_idls("[Global] interface Window { };");
|
||||||
|
|
||||||
|
idl_array.add_untested_idls("interface ArrayBuffer {};");
|
||||||
|
idl_array.add_untested_idls("interface ArrayBufferView {};");
|
||||||
|
|
||||||
|
idl_array.add_idls(idls);
|
||||||
|
|
||||||
|
idl_array.add_objects({"Crypto":["crypto"], "SubtleCrypto":["crypto.subtle"]});
|
||||||
|
|
||||||
|
idl_array.test();
|
||||||
|
done();
|
||||||
|
};
|
230
tests/wpt/web-platform-tests/WebCryptoAPI/util/helpers.js
Normal file
230
tests/wpt/web-platform-tests/WebCryptoAPI/util/helpers.js
Normal file
|
@ -0,0 +1,230 @@
|
||||||
|
//
|
||||||
|
// helpers.js
|
||||||
|
//
|
||||||
|
// Helper functions used by several WebCryptoAPI tests
|
||||||
|
//
|
||||||
|
|
||||||
|
var registeredAlgorithmNames = [
|
||||||
|
"RSASSA-PKCS1-v1_5",
|
||||||
|
"RSA-PSS",
|
||||||
|
"RSA-OAEP",
|
||||||
|
"ECDSA",
|
||||||
|
"ECDH",
|
||||||
|
"AES-CTR",
|
||||||
|
"AES-CBC",
|
||||||
|
"AES-GCM",
|
||||||
|
"AES-KW",
|
||||||
|
"HMAC",
|
||||||
|
"SHA-1",
|
||||||
|
"SHA-256",
|
||||||
|
"SHA-384",
|
||||||
|
"SHA-512",
|
||||||
|
"HKDF-CTR",
|
||||||
|
"PBKDF2"
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
// Treats an array as a set, and generates an array of all non-empty
|
||||||
|
// subsets (which are themselves arrays).
|
||||||
|
//
|
||||||
|
// The order of members of the "subsets" is not guaranteed.
|
||||||
|
function allNonemptySubsetsOf(arr) {
|
||||||
|
var results = [];
|
||||||
|
var firstElement;
|
||||||
|
var remainingElements;
|
||||||
|
|
||||||
|
for(var i=0; i<arr.length; i++) {
|
||||||
|
firstElement = arr[i];
|
||||||
|
remainingElements = arr.slice(i+1);
|
||||||
|
results.push([firstElement]);
|
||||||
|
|
||||||
|
if (remainingElements.length > 0) {
|
||||||
|
allNonemptySubsetsOf(remainingElements).forEach(function(combination) {
|
||||||
|
combination.push(firstElement);
|
||||||
|
results.push(combination);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Create a string representation of keyGeneration parameters for
|
||||||
|
// test names and labels.
|
||||||
|
function objectToString(obj) {
|
||||||
|
var keyValuePairs = [];
|
||||||
|
|
||||||
|
if (Array.isArray(obj)) {
|
||||||
|
return "[" + obj.map(function(elem){return objectToString(elem);}).join(", ") + "]";
|
||||||
|
} else if (typeof obj === "object") {
|
||||||
|
Object.keys(obj).sort().forEach(function(keyName) {
|
||||||
|
keyValuePairs.push(keyName + ": " + objectToString(obj[keyName]));
|
||||||
|
});
|
||||||
|
return "{" + keyValuePairs.join(", ") + "}";
|
||||||
|
} else if (typeof obj === "undefined") {
|
||||||
|
return "undefined";
|
||||||
|
} else {
|
||||||
|
return obj.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
var keyValuePairs = [];
|
||||||
|
|
||||||
|
Object.keys(obj).sort().forEach(function(keyName) {
|
||||||
|
var value = obj[keyName];
|
||||||
|
if (typeof value === "object") {
|
||||||
|
value = objectToString(value);
|
||||||
|
} else if (typeof value === "array") {
|
||||||
|
value = "[" + value.map(function(elem){return objectToString(elem);}).join(", ") + "]";
|
||||||
|
} else {
|
||||||
|
value = value.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
keyValuePairs.push(keyName + ": " + value);
|
||||||
|
});
|
||||||
|
|
||||||
|
return "{" + keyValuePairs.join(", ") + "}";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Is key a CryptoKey object with correct algorithm, extractable, and usages?
|
||||||
|
// Is it a secret, private, or public kind of key?
|
||||||
|
function assert_goodCryptoKey(key, algorithm, extractable, usages, kind) {
|
||||||
|
var correctUsages = [];
|
||||||
|
|
||||||
|
var registeredAlgorithmName;
|
||||||
|
registeredAlgorithmNames.forEach(function(name) {
|
||||||
|
if (name.toUpperCase() === algorithm.name.toUpperCase()) {
|
||||||
|
registeredAlgorithmName = name;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
assert_equals(key.constructor, CryptoKey, "Is a CryptoKey");
|
||||||
|
assert_equals(key.type, kind, "Is a " + kind + " key");
|
||||||
|
if (key.type === "public") {
|
||||||
|
extractable = true; // public keys are always extractable
|
||||||
|
}
|
||||||
|
assert_equals(key.extractable, extractable, "Extractability is correct");
|
||||||
|
|
||||||
|
assert_equals(key.algorithm.name, registeredAlgorithmName, "Correct algorithm name");
|
||||||
|
assert_equals(key.algorithm.length, algorithm.length, "Correct length");
|
||||||
|
if (["HMAC", "RSASSA-PKCS1-v1_5", "RSA-PSS"].includes(registeredAlgorithmName)) {
|
||||||
|
assert_equals(key.algorithm.hash.name.toUpperCase(), algorithm.hash.toUpperCase(), "Correct hash function");
|
||||||
|
}
|
||||||
|
|
||||||
|
// usages is expected to be provided for a key pair, but we are checking
|
||||||
|
// only a single key. The publicKey and privateKey portions of a key pair
|
||||||
|
// recognize only some of the usages appropriate for a key pair.
|
||||||
|
if (key.type === "public") {
|
||||||
|
["encrypt", "verify", "wrapKey"].forEach(function(usage) {
|
||||||
|
if (usages.includes(usage)) {
|
||||||
|
correctUsages.push(usage);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (key.type === "private") {
|
||||||
|
["decrypt", "sign", "unwrapKey", "deriveKey", "deriveBits"].forEach(function(usage) {
|
||||||
|
if (usages.includes(usage)) {
|
||||||
|
correctUsages.push(usage);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
correctUsages = usages;
|
||||||
|
}
|
||||||
|
|
||||||
|
assert_equals((typeof key.usages), "object", key.type + " key.usages is an object");
|
||||||
|
assert_not_equals(key.usages, null, key.type + " key.usages isn't null");
|
||||||
|
|
||||||
|
// The usages parameter could have repeats, but the usages
|
||||||
|
// property of the result should not.
|
||||||
|
var usageCount = 0;
|
||||||
|
key.usages.forEach(function(usage) {
|
||||||
|
usageCount += 1;
|
||||||
|
assert_in_array(usage, correctUsages, "Has " + usage + " usage");
|
||||||
|
});
|
||||||
|
assert_equals(key.usages.length, usageCount, "usages property is correct");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// The algorithm parameter is an object with a name and other
|
||||||
|
// properties. Given the name, generate all valid parameters.
|
||||||
|
function allAlgorithmSpecifiersFor(algorithmName) {
|
||||||
|
var results = [];
|
||||||
|
|
||||||
|
// RSA key generation is slow. Test a minimal set of parameters
|
||||||
|
var hashes = ["SHA-1", "SHA-256"];
|
||||||
|
|
||||||
|
// EC key generation is a lot faster. Check all curves in the spec
|
||||||
|
var curves = ["P-256", "P-384", "P-521"];
|
||||||
|
|
||||||
|
if (algorithmName.toUpperCase().substring(0, 3) === "AES") {
|
||||||
|
// Specifier properties are name and length
|
||||||
|
[128, 192, 256].forEach(function(length) {
|
||||||
|
results.push({name: algorithmName, length: length});
|
||||||
|
});
|
||||||
|
} else if (algorithmName.toUpperCase() === "HMAC") {
|
||||||
|
[
|
||||||
|
{name: "SHA-1", length: 160},
|
||||||
|
{name: "SHA-256", length: 256},
|
||||||
|
{name: "SHA-384", length: 384},
|
||||||
|
{name: "SHA-512", length: 512}
|
||||||
|
].forEach(function(hashAlgorithm) {
|
||||||
|
results.push({name: algorithmName, hash: hashAlgorithm.name, length: hashAlgorithm.length});
|
||||||
|
});
|
||||||
|
} else if (algorithmName.toUpperCase().substring(0, 3) === "RSA") {
|
||||||
|
hashes.forEach(function(hashName) {
|
||||||
|
results.push({name: algorithmName, hash: hashName, modulusLength: 2048, publicExponent: new Uint8Array([1,0,1])});
|
||||||
|
});
|
||||||
|
} else if (algorithmName.toUpperCase().substring(0, 2) === "EC") {
|
||||||
|
curves.forEach(function(curveName) {
|
||||||
|
results.push({name: algorithmName, namedCurve: curveName});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Create every possible valid usages parameter, given legal
|
||||||
|
// usages. Note that an empty usages parameter is not always valid.
|
||||||
|
//
|
||||||
|
// There is an optional parameter - mandatoryUsages. If provided,
|
||||||
|
// it should be an array containing those usages of which one must be
|
||||||
|
// included.
|
||||||
|
function allValidUsages(validUsages, emptyIsValid, mandatoryUsages) {
|
||||||
|
if (typeof mandatoryUsages === "undefined") {
|
||||||
|
mandatoryUsages = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
okaySubsets = [];
|
||||||
|
allNonemptySubsetsOf(validUsages).forEach(function(subset) {
|
||||||
|
if (mandatoryUsages.length === 0) {
|
||||||
|
okaySubsets.push(subset);
|
||||||
|
} else {
|
||||||
|
for (var i=0; i<mandatoryUsages.length; i++) {
|
||||||
|
if (subset.includes(mandatoryUsages[i])) {
|
||||||
|
okaySubsets.push(subset);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (emptyIsValid) {
|
||||||
|
okaySubsets.push([]);
|
||||||
|
}
|
||||||
|
|
||||||
|
okaySubsets.push(validUsages.concat(mandatoryUsages).concat(validUsages)); // Repeated values are allowed
|
||||||
|
return okaySubsets;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Algorithm name specifiers are case-insensitive. Generate several
|
||||||
|
// case variations of a given name.
|
||||||
|
function allNameVariants(name) {
|
||||||
|
var upCaseName = name.toUpperCase();
|
||||||
|
var lowCaseName = name.toLowerCase();
|
||||||
|
var mixedCaseName = upCaseName.substring(0, 1) + lowCaseName.substring(1);
|
||||||
|
|
||||||
|
return [upCaseName, lowCaseName, mixedCaseName];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,11 @@
|
||||||
assert_throws("SyntaxError", function() { client.open("GET", url) })
|
assert_throws("SyntaxError", function() { client.open("GET", url) })
|
||||||
}, document.title + " (" + url + ")")
|
}, document.title + " (" + url + ")")
|
||||||
}
|
}
|
||||||
url("http:")
|
url("//[")
|
||||||
|
url("ftp:")
|
||||||
url("http://a a/")
|
url("http://a a/")
|
||||||
|
url("http:////////////")
|
||||||
|
url("http://u:p@/")
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,26 +1,88 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Battery Test: navigator.getBattery() returns BatteryManager as a promise</title>
|
<title>Battery Test: each Navigator object has a battery promise for BatteryManager</title>
|
||||||
<link rel="author" title="YuichiNukiyama" href="https://github.com/YuichiNukiyama">
|
<link rel="author" title="YuichiNukiyama" href="https://github.com/YuichiNukiyama">
|
||||||
<script src="/resources/testharness.js"></script>
|
<script src="/resources/testharness.js"></script>
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<style>
|
||||||
<script>
|
#note {
|
||||||
function returnBattery() {
|
background-color: #fef1b5;
|
||||||
return navigator.getBattery();
|
border: solid 1px #cdab2d;
|
||||||
|
padding: 5px;
|
||||||
|
margin: 15px;
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
iframe {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div id="note">
|
||||||
|
Allow pop-up windows before running the tests.
|
||||||
|
</div>
|
||||||
|
<div id="log"></div>
|
||||||
|
<iframe src="about:blank"></iframe>
|
||||||
|
<script>
|
||||||
promise_test(function () {
|
promise_test(function () {
|
||||||
return returnBattery()
|
return navigator.getBattery().then(function (result) {
|
||||||
.then(function (result) {
|
assert_class_string(result, 'BatteryManager',
|
||||||
assert_class_string(result, "BatteryManager", "getBattery should return BatteryManager Object.");
|
'getBattery should return BatteryManager Object.');
|
||||||
});
|
});
|
||||||
}, "navigator.getBattery() return BatteryManager");
|
}, 'navigator.getBattery() shall return BatteryManager as a promise');
|
||||||
|
|
||||||
test(function () {
|
test(function () {
|
||||||
assert_equals(navigator.getBattery(), navigator.getBattery());
|
assert_equals(navigator.getBattery(), navigator.getBattery());
|
||||||
}, "navigator.getBattery() shall always return the same promise");
|
}, 'navigator.getBattery() shall always return the same promise');
|
||||||
|
|
||||||
|
promise_test(function(t) {
|
||||||
|
var iframe = document.querySelector('iframe');
|
||||||
|
var originalPromise = navigator.getBattery();
|
||||||
|
|
||||||
|
return originalPromise.then(function(originalManager) {
|
||||||
|
var promise = iframe.contentWindow.navigator.getBattery();
|
||||||
|
|
||||||
|
assert_true(originalManager instanceof BatteryManager);
|
||||||
|
assert_not_equals(iframe.contentWindow.navigator,
|
||||||
|
navigator,
|
||||||
|
'navigator objects shall be different');
|
||||||
|
assert_not_equals(promise,
|
||||||
|
originalPromise,
|
||||||
|
'battery promises in different navigators shall be different');
|
||||||
|
assert_equals(iframe.contentWindow.navigator.getBattery(),
|
||||||
|
promise,
|
||||||
|
'battery promises in same navigator shall be same');
|
||||||
|
|
||||||
|
return promise;
|
||||||
|
}).then(function(manager) {
|
||||||
|
assert_equals(manager.__proto__,
|
||||||
|
iframe.contentWindow.BatteryManager.prototype);
|
||||||
|
assert_true(manager instanceof iframe.contentWindow.BatteryManager);
|
||||||
|
});
|
||||||
|
|
||||||
|
}, 'iframe has a different Navigator object thus getting another battery promise');
|
||||||
|
|
||||||
|
async_test(function (t) {
|
||||||
|
var iframe = document.querySelector('iframe');
|
||||||
|
var originalNavigator = iframe.contentWindow.navigator;
|
||||||
|
var originalPromise = iframe.contentWindow.navigator.getBattery();
|
||||||
|
|
||||||
|
iframe.onload = t.step_func(function() {
|
||||||
|
assert_not_equals(iframe.contentWindow.navigator,
|
||||||
|
originalNavigator,
|
||||||
|
'navigator objects shall be changed');
|
||||||
|
assert_not_equals(iframe.contentWindow.navigator.getBattery(),
|
||||||
|
originalPromise,
|
||||||
|
'battery status promises shall be different');
|
||||||
|
t.done();
|
||||||
|
});
|
||||||
|
iframe.src = 'support-iframe.html';
|
||||||
|
}, 'setting iframe\'s src makes its Navigator object vary thus getting another battery promise');
|
||||||
|
|
||||||
|
async_test(function (t) {
|
||||||
|
var win = window.open('support-window-open.html');
|
||||||
|
window.onmessage = t.step_func(function(e) {
|
||||||
|
assert_array_equals(e.data, [false, false, true]);
|
||||||
|
win.close();
|
||||||
|
t.done();
|
||||||
|
});
|
||||||
|
}, 'window.open() makes a different Navigator object thus getting another battery promise');
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="log"></div>
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<div>
|
||||||
|
Hello!
|
||||||
|
</div>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script>
|
||||||
|
var data = [
|
||||||
|
navigator === window.opener.navigator,
|
||||||
|
navigator.getBattery() === window.opener.navigator.getBattery(),
|
||||||
|
navigator.getBattery() === navigator.getBattery()
|
||||||
|
];
|
||||||
|
window.opener.postMessage(data, '*');
|
||||||
|
</script>
|
|
@ -11,12 +11,12 @@ if(expected_alerts.length == 0) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var t_alert = async_test('Expecting alerts: {{GET[alerts]}}');
|
var t_alert = async_test('Expecting alerts: {{GET[alerts]}}');
|
||||||
setTimeout(function() {
|
step_timeout(function() {
|
||||||
if(t_alert.phase != t_alert.phases.COMPLETE) {
|
if(t_alert.phase != t_alert.phases.COMPLETE) {
|
||||||
t_alert.step(function() { assert_unreached('Alert timeout, expected alerts ' + expected_alerts + ' not fired.') });
|
t_alert.step(function() { assert_unreached('Alert timeout, expected alerts ' + expected_alerts + ' not fired.') });
|
||||||
t_alert.done();
|
t_alert.done();
|
||||||
}
|
}
|
||||||
}, timeout * 100);
|
}, timeout * 1000);
|
||||||
var alert_assert = function (msg) {
|
var alert_assert = function (msg) {
|
||||||
t_alert.step(function () {
|
t_alert.step(function () {
|
||||||
if(msg && msg instanceof Error) {
|
if(msg && msg instanceof Error) {
|
||||||
|
|
|
@ -11,7 +11,7 @@ if (expected_logs.length == 0) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var t_log = async_test('Expecting logs: {{GET[logs]}}');
|
var t_log = async_test('Expecting logs: {{GET[logs]}}');
|
||||||
setTimeout(function() {
|
step_timeout(function() {
|
||||||
if(t_log.phase != t_log.phases.COMPLETE){
|
if(t_log.phase != t_log.phases.COMPLETE){
|
||||||
t_log.step(function () { assert_unreached('Logging timeout, expected logs ' + expected_logs + ' not sent.') });
|
t_log.step(function () { assert_unreached('Logging timeout, expected logs ' + expected_logs + ' not sent.') });
|
||||||
t_log.done();
|
t_log.done();
|
||||||
|
|
|
@ -0,0 +1,250 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<title>Custom Elements: Element definition</title>
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<body>
|
||||||
|
<div id="log"></div>
|
||||||
|
<iframe id="iframe"></iframe>
|
||||||
|
<script>
|
||||||
|
'use strict';
|
||||||
|
(() => {
|
||||||
|
// Element definition
|
||||||
|
// https://html.spec.whatwg.org/multipage/scripting.html#element-definition
|
||||||
|
|
||||||
|
// Use window from iframe to isolate the test.
|
||||||
|
const testWindow = iframe.contentDocument.defaultView;
|
||||||
|
const customElements = testWindow.customElements;
|
||||||
|
|
||||||
|
let testable = false;
|
||||||
|
test(() => {
|
||||||
|
assert_true('customElements' in testWindow, '"window.customElements" exists');
|
||||||
|
assert_true('define' in customElements, '"window.customElements.define" exists');
|
||||||
|
testable = true;
|
||||||
|
}, '"window.customElements.define" should exists');
|
||||||
|
if (!testable)
|
||||||
|
return;
|
||||||
|
|
||||||
|
const expectTypeError = TypeError.prototype;
|
||||||
|
// Following errors are DOMException, not JavaScript errors.
|
||||||
|
const expectSyntaxError = 'SYNTAX_ERR';
|
||||||
|
const expectNotSupportedError = 'NOT_SUPPORTED_ERR';
|
||||||
|
|
||||||
|
// 1. If IsConstructor(constructor) is false,
|
||||||
|
// then throw a TypeError and abort these steps.
|
||||||
|
test(() => {
|
||||||
|
assert_throws(expectTypeError, () => {
|
||||||
|
customElements.define();
|
||||||
|
});
|
||||||
|
}, 'If no arguments, should throw a TypeError');
|
||||||
|
test(() => {
|
||||||
|
assert_throws(expectTypeError, () => {
|
||||||
|
customElements.define('test-define-one-arg');
|
||||||
|
});
|
||||||
|
}, 'If one argument, should throw a TypeError');
|
||||||
|
[
|
||||||
|
[ 'undefined', undefined ],
|
||||||
|
[ 'null', null ],
|
||||||
|
[ 'object', {} ],
|
||||||
|
[ 'string', 'string' ],
|
||||||
|
[ 'arrow function', () => {} ], // IsConstructor returns false for arrow functions
|
||||||
|
[ 'method', ({ m() { } }).m ], // IsConstructor returns false for methods
|
||||||
|
].forEach(t => {
|
||||||
|
test(() => {
|
||||||
|
assert_throws(expectTypeError, () => {
|
||||||
|
customElements.define(`test-define-constructor-${t[0]}`, t[1]);
|
||||||
|
});
|
||||||
|
}, `If constructor is ${t[0]}, should throw a TypeError`);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 2. If name is not a valid custom element name,
|
||||||
|
// then throw a SyntaxError and abort these steps.
|
||||||
|
let validCustomElementNames = [
|
||||||
|
// [a-z] (PCENChar)* '-' (PCENChar)*
|
||||||
|
// https://html.spec.whatwg.org/multipage/scripting.html#valid-custom-element-name
|
||||||
|
'a-',
|
||||||
|
'a-a',
|
||||||
|
'aa-',
|
||||||
|
'aa-a',
|
||||||
|
'a-.-_',
|
||||||
|
'a-0123456789',
|
||||||
|
'a-\u6F22\u5B57', // Two CJK Unified Ideographs
|
||||||
|
'a-\uD840\uDC0B', // Surrogate pair U+2000B
|
||||||
|
];
|
||||||
|
let invalidCustomElementNames = [
|
||||||
|
undefined,
|
||||||
|
null,
|
||||||
|
'',
|
||||||
|
'-',
|
||||||
|
'a',
|
||||||
|
'input',
|
||||||
|
'mycustomelement',
|
||||||
|
'A',
|
||||||
|
'A-',
|
||||||
|
'0-',
|
||||||
|
'a-A',
|
||||||
|
'a-Z',
|
||||||
|
'A-a',
|
||||||
|
'a-a\u00D7',
|
||||||
|
'a-a\u3000',
|
||||||
|
'a-a\uDB80\uDC00', // Surrogate pair U+F0000
|
||||||
|
// name must not be any of the hyphen-containing element names.
|
||||||
|
'annotation-xml',
|
||||||
|
'color-profile',
|
||||||
|
'font-face',
|
||||||
|
'font-face-src',
|
||||||
|
'font-face-uri',
|
||||||
|
'font-face-format',
|
||||||
|
'font-face-name',
|
||||||
|
'missing-glyph',
|
||||||
|
];
|
||||||
|
validCustomElementNames.forEach(name => {
|
||||||
|
test(() => {
|
||||||
|
customElements.define(name, class {});
|
||||||
|
}, `Element names: defining an element named ${name} should succeed`);
|
||||||
|
});
|
||||||
|
invalidCustomElementNames.forEach(name => {
|
||||||
|
test(() => {
|
||||||
|
assert_throws(expectSyntaxError, () => {
|
||||||
|
customElements.define(name, class {});
|
||||||
|
});
|
||||||
|
}, `Element names: defining an element named ${name} should throw a SyntaxError`);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 3. If this CustomElementsRegistry contains an entry with name name,
|
||||||
|
// then throw a NotSupportedError and abort these steps.
|
||||||
|
test(() => {
|
||||||
|
customElements.define('test-define-dup-name', class {});
|
||||||
|
assert_throws(expectNotSupportedError, () => {
|
||||||
|
customElements.define('test-define-dup-name', class {});
|
||||||
|
});
|
||||||
|
}, 'If the name is already defined, should throw a NotSupportedError');
|
||||||
|
|
||||||
|
// 4. If this CustomElementsRegistry contains an entry with constructor constructor,
|
||||||
|
// then throw a NotSupportedError and abort these steps.
|
||||||
|
test(() => {
|
||||||
|
class TestDupConstructor {};
|
||||||
|
customElements.define('test-define-dup-constructor', TestDupConstructor);
|
||||||
|
assert_throws(expectNotSupportedError, () => {
|
||||||
|
customElements.define('test-define-dup-ctor2', TestDupConstructor);
|
||||||
|
});
|
||||||
|
}, 'If the constructor is already defined, should throw a NotSupportedError');
|
||||||
|
|
||||||
|
// 7.1. If extends is a valid custom element name,
|
||||||
|
// then throw a NotSupportedError.
|
||||||
|
validCustomElementNames.forEach(name => {
|
||||||
|
test(() => {
|
||||||
|
assert_throws(expectNotSupportedError, () => {
|
||||||
|
customElements.define('test-define-extend-valid-name', class {}, { extends: name });
|
||||||
|
});
|
||||||
|
}, `If extends is ${name}, should throw a NotSupportedError`);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 7.2. If the element interface for extends and the HTML namespace is HTMLUnknownElement
|
||||||
|
// (e.g., if extends does not indicate an element definition in this specification),
|
||||||
|
// then throw a NotSupportedError.
|
||||||
|
[
|
||||||
|
// https://html.spec.whatwg.org/multipage/dom.html#elements-in-the-dom:htmlunknownelement
|
||||||
|
'bgsound',
|
||||||
|
'blink',
|
||||||
|
'isindex',
|
||||||
|
'multicol',
|
||||||
|
'nextid',
|
||||||
|
'spacer',
|
||||||
|
'elementnametobeunknownelement',
|
||||||
|
].forEach(name => {
|
||||||
|
test(() => {
|
||||||
|
assert_throws(expectNotSupportedError, () => {
|
||||||
|
customElements.define('test-define-extend-' + name, class {}, { extends: name });
|
||||||
|
});
|
||||||
|
}, `If extends is ${name}, should throw a NotSupportedError`);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 8. Let observedAttributesIterable be Get(constructor, "observedAttributes").
|
||||||
|
// Rethrow any exceptions.
|
||||||
|
// See step 12 for rethrow tests.
|
||||||
|
|
||||||
|
// 10. Let prototype be Get(constructor, "prototype"). Rethrow any exceptions.
|
||||||
|
function assert_rethrown(func, description) {
|
||||||
|
assert_throws({ name: 'rethrown' }, func, description);
|
||||||
|
}
|
||||||
|
function throw_rethrown_error() {
|
||||||
|
const e = new Error('check this is rethrown');
|
||||||
|
e.name = 'rethrown';
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
test(() => {
|
||||||
|
// Hack for prototype to throw while IsConstructor is true.
|
||||||
|
const BadConstructor = (function () { }).bind({});
|
||||||
|
Object.defineProperty(BadConstructor, 'prototype', {
|
||||||
|
get() { throw_rethrown_error(); }
|
||||||
|
});
|
||||||
|
assert_rethrown(() => {
|
||||||
|
customElements.define('test-define-constructor-prototype-rethrow', BadConstructor);
|
||||||
|
});
|
||||||
|
}, 'If constructor.prototype throws, should rethrow');
|
||||||
|
// 11. If Type(prototype) is not Object,
|
||||||
|
// then throw a TypeError exception.
|
||||||
|
test(() => {
|
||||||
|
const c = (function () { }).bind({}); // prototype is undefined.
|
||||||
|
assert_throws(expectTypeError, () => {
|
||||||
|
customElements.define('test-define-constructor-prototype-undefined', c);
|
||||||
|
});
|
||||||
|
}, 'If Type(constructor.prototype) is undefined, should throw a TypeError');
|
||||||
|
test(() => {
|
||||||
|
function c() {};
|
||||||
|
c.prototype = 'string';
|
||||||
|
assert_throws(expectTypeError, () => {
|
||||||
|
customElements.define('test-define-constructor-prototype-string', c);
|
||||||
|
});
|
||||||
|
}, 'If Type(constructor.prototype) is string, should throw a TypeError');
|
||||||
|
|
||||||
|
// 12. Let connectedCallback be Get(prototype, "connectedCallback"). Rethrow any exceptions.
|
||||||
|
// 13. If connectedCallback is not undefined, and IsCallable(connectedCallback) is false,
|
||||||
|
// then throw a TypeError exception.
|
||||||
|
// 14. Let disconnectedCallback be Get(prototype, "disconnectedCallback"). Rethrow any exceptions.
|
||||||
|
// 15. If disconnectedCallback is not undefined, and IsCallable(disconnectedCallback) is false,
|
||||||
|
// then throw a TypeError exception.
|
||||||
|
// 16. Let attributeChangedCallback be Get(prototype, "attributeChangedCallback"). Rethrow any exceptions.
|
||||||
|
// 17. If attributeChangedCallback is not undefined, and IsCallable(attributeChangedCallback) is false,
|
||||||
|
// then throw a TypeError exception.
|
||||||
|
[
|
||||||
|
'observedAttributes', // See step 8 above.
|
||||||
|
'connectedCallback',
|
||||||
|
'disconnectedCallback',
|
||||||
|
'attributeChangedCallback',
|
||||||
|
].forEach(name => {
|
||||||
|
test(() => {
|
||||||
|
class C {
|
||||||
|
get [name]() { throw_rethrown_error(); }
|
||||||
|
}
|
||||||
|
assert_rethrown(() => {
|
||||||
|
customElements.define('test-define-constructor-rethrow-prototype-' + name, C);
|
||||||
|
});
|
||||||
|
}, `If constructor.prototype.${name} throws, should rethrow`);
|
||||||
|
});
|
||||||
|
[
|
||||||
|
'connectedCallback',
|
||||||
|
'disconnectedCallback',
|
||||||
|
'attributeChangedCallback',
|
||||||
|
].forEach(name => {
|
||||||
|
test(() => {
|
||||||
|
class c {};
|
||||||
|
c.prototype[name] = undefined;
|
||||||
|
customElements.define('test-define-constructor-prototype-' + name, c);
|
||||||
|
}, `If constructor.prototype.${name} is undefined, should success`);
|
||||||
|
[
|
||||||
|
[ 'null', null ],
|
||||||
|
[ 'object', {} ],
|
||||||
|
].forEach(value => {
|
||||||
|
test(() => {
|
||||||
|
class c {};
|
||||||
|
c.prototype[name] = value[1];
|
||||||
|
assert_throws(expectTypeError, () => {
|
||||||
|
customElements.define('test-define-constructor-prototype-' + name, c);
|
||||||
|
});
|
||||||
|
}, `If constructor.prototype.${name} is ${value[0]}, should throw a TypeError`);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
</body>
|
|
@ -0,0 +1,108 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<meta charset=utf-8>
|
||||||
|
<title> Event.bubbles attribute is set to false </title>
|
||||||
|
<link rel="help" href="https://dom.spec.whatwg.org/#dom-event-initevent">
|
||||||
|
<link rel="help" href="https://dom.spec.whatwg.org/#concept-event-dispatch">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<div id=log></div>
|
||||||
|
<table id="table" border="1" style="display: none">
|
||||||
|
<tbody id="table-body">
|
||||||
|
<tr id="table-row">
|
||||||
|
<td id="table-cell">Shady Grove</td>
|
||||||
|
<td>Aeolian</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="parent">
|
||||||
|
<td id="target">Over the river, Charlie</td>
|
||||||
|
<td>Dorian</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<script>
|
||||||
|
function concatReverse(a) {
|
||||||
|
return a.concat(a.map(function(x) { return x }).reverse());
|
||||||
|
}
|
||||||
|
|
||||||
|
function targetsForDocumentChain(document) {
|
||||||
|
return [
|
||||||
|
document,
|
||||||
|
document.documentElement,
|
||||||
|
document.getElementsByTagName("body")[0],
|
||||||
|
document.getElementById("table"),
|
||||||
|
document.getElementById("table-body"),
|
||||||
|
document.getElementById("parent")
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
function testChain(document, targetParents, phases, event_type) {
|
||||||
|
var target = document.getElementById("target");
|
||||||
|
var targets = targetParents.concat(target);
|
||||||
|
var expected_targets = concatReverse(targets);
|
||||||
|
|
||||||
|
var actual_targets = [], actual_phases = [];
|
||||||
|
var test_event = function(evt) {
|
||||||
|
actual_targets.push(evt.currentTarget);
|
||||||
|
actual_phases.push(evt.eventPhase);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var i = 0; i < targets.length; i++) {
|
||||||
|
targets[i].addEventListener(event_type, test_event, true);
|
||||||
|
targets[i].addEventListener(event_type, test_event, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
var evt = document.createEvent("Event");
|
||||||
|
evt.initEvent(event_type, true, true);
|
||||||
|
|
||||||
|
target.dispatchEvent(evt);
|
||||||
|
|
||||||
|
assert_array_equals(actual_targets, expected_targets, "targets");
|
||||||
|
assert_array_equals(actual_phases, phases, "phases");
|
||||||
|
}
|
||||||
|
|
||||||
|
var phasesForDocumentChain = [
|
||||||
|
Event.CAPTURING_PHASE,
|
||||||
|
Event.CAPTURING_PHASE,
|
||||||
|
Event.CAPTURING_PHASE,
|
||||||
|
Event.CAPTURING_PHASE,
|
||||||
|
Event.CAPTURING_PHASE,
|
||||||
|
Event.CAPTURING_PHASE,
|
||||||
|
Event.AT_TARGET,
|
||||||
|
Event.AT_TARGET,
|
||||||
|
Event.BUBBLING_PHASE,
|
||||||
|
Event.BUBBLING_PHASE,
|
||||||
|
Event.BUBBLING_PHASE,
|
||||||
|
Event.BUBBLING_PHASE,
|
||||||
|
Event.BUBBLING_PHASE,
|
||||||
|
Event.BUBBLING_PHASE,
|
||||||
|
];
|
||||||
|
|
||||||
|
test(function () {
|
||||||
|
var chainWithWindow = [window].concat(targetsForDocumentChain(document));
|
||||||
|
var phases = [Event.CAPTURING_PHASE].concat(phasesForDocumentChain, Event.BUBBLING_PHASE);
|
||||||
|
testChain(document, chainWithWindow, phases, "click");
|
||||||
|
}, "In window.document with click event");
|
||||||
|
|
||||||
|
test(function () {
|
||||||
|
testChain(document, targetsForDocumentChain(document), phasesForDocumentChain, "load");
|
||||||
|
}, "In window.document with load event")
|
||||||
|
|
||||||
|
test(function () {
|
||||||
|
var documentClone = document.cloneNode(true);
|
||||||
|
testChain(
|
||||||
|
documentClone, targetsForDocumentChain(documentClone), phasesForDocumentChain, "click");
|
||||||
|
}, "In window.document.cloneNode(true)");
|
||||||
|
|
||||||
|
test(function () {
|
||||||
|
var newDocument = new Document();
|
||||||
|
newDocument.appendChild(document.documentElement.cloneNode(true));
|
||||||
|
testChain(
|
||||||
|
newDocument, targetsForDocumentChain(newDocument), phasesForDocumentChain, "click");
|
||||||
|
}, "In new Document()");
|
||||||
|
|
||||||
|
test(function () {
|
||||||
|
var HTMLDocument = document.implementation.createHTMLDocument();
|
||||||
|
HTMLDocument.body.appendChild(document.getElementById("table").cloneNode(true));
|
||||||
|
testChain(
|
||||||
|
HTMLDocument, targetsForDocumentChain(HTMLDocument), phasesForDocumentChain, "click");
|
||||||
|
}, "In DOMImplementation.createHTMLDocument()");
|
||||||
|
</script>
|
|
@ -0,0 +1,51 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title> Multiple dispatchEvent() and stopPropagation() </title>
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id=log></div>
|
||||||
|
|
||||||
|
<div id="parent" style="display: none">
|
||||||
|
<input id="target" type="hidden" value=""/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
test(function() {
|
||||||
|
var event_type = "foo";
|
||||||
|
var target = document.getElementById("target");
|
||||||
|
var parent = document.getElementById("parent");
|
||||||
|
var actual_result;
|
||||||
|
var test_event = function(evt) {
|
||||||
|
actual_result.push(evt.currentTarget);
|
||||||
|
|
||||||
|
if (parent == evt.currentTarget) {
|
||||||
|
evt.stopPropagation();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var evt = document.createEvent("Event");
|
||||||
|
evt.initEvent(event_type, true, true);
|
||||||
|
|
||||||
|
target.addEventListener(event_type, test_event, false);
|
||||||
|
parent.addEventListener(event_type, test_event, false);
|
||||||
|
document.addEventListener(event_type, test_event, false);
|
||||||
|
window.addEventListener(event_type, test_event, false);
|
||||||
|
|
||||||
|
actual_result = [];
|
||||||
|
target.dispatchEvent(evt);
|
||||||
|
assert_array_equals(actual_result, [target, parent]);
|
||||||
|
|
||||||
|
actual_result = [];
|
||||||
|
parent.dispatchEvent(evt);
|
||||||
|
assert_array_equals(actual_result, [parent]);
|
||||||
|
|
||||||
|
actual_result = [];
|
||||||
|
document.dispatchEvent(evt);
|
||||||
|
assert_array_equals(actual_result, [document, window]);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -1,5 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<!-- Submitted from TestTWF Paris -->
|
|
||||||
<title>Event phases order</title>
|
<title>Event phases order</title>
|
||||||
<script src="/resources/testharness.js"></script>
|
<script src="/resources/testharness.js"></script>
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
@ -16,13 +15,12 @@ async_test(function() {
|
||||||
child.addEventListener('click', this.step_func(function(){ order.push(2) }), false);
|
child.addEventListener('click', this.step_func(function(){ order.push(2) }), false);
|
||||||
parent.addEventListener('click', this.step_func(function(){ order.push(3) }), false);
|
parent.addEventListener('click', this.step_func(function(){ order.push(3) }), false);
|
||||||
|
|
||||||
child.click();
|
child.dispatchEvent(new Event('click', {bubbles: true}));
|
||||||
|
|
||||||
assert_array_equals(order, [1, 2, 3]);
|
assert_array_equals(order, [1, 2, 3]);
|
||||||
}));
|
}));
|
||||||
}, "Event phases order");
|
}, "Event phases order");
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="parent">
|
<div id="parent">
|
||||||
<div id="child"></div>
|
<div id="child"></div>
|
||||||
</div>
|
</div>
|
|
@ -0,0 +1,51 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Throwing in event listeners</title>
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<div id="log"></div>
|
||||||
|
<script>
|
||||||
|
setup({allow_uncaught_exception:true})
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
var errorEvents = 0;
|
||||||
|
window.onerror = this.step_func(function(e) {
|
||||||
|
assert_equals(typeof e, 'string');
|
||||||
|
++errorEvents;
|
||||||
|
});
|
||||||
|
|
||||||
|
var element = document.createElement('div');
|
||||||
|
|
||||||
|
element.addEventListener('click', function() {
|
||||||
|
throw new Error('Error from only listener');
|
||||||
|
});
|
||||||
|
|
||||||
|
element.dispatchEvent(new Event('click'));
|
||||||
|
|
||||||
|
assert_equals(errorEvents, 1);
|
||||||
|
}, "Throwing in event listener with a single listeners");
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
var errorEvents = 0;
|
||||||
|
window.onerror = this.step_func(function(e) {
|
||||||
|
assert_equals(typeof e, 'string');
|
||||||
|
++errorEvents;
|
||||||
|
});
|
||||||
|
|
||||||
|
var element = document.createElement('div');
|
||||||
|
|
||||||
|
var secondCalled = false;
|
||||||
|
|
||||||
|
element.addEventListener('click', function() {
|
||||||
|
throw new Error('Error from first listener');
|
||||||
|
});
|
||||||
|
element.addEventListener('click', this.step_func(function() {
|
||||||
|
secondCalled = true;
|
||||||
|
}), false);
|
||||||
|
|
||||||
|
element.dispatchEvent(new Event('click'));
|
||||||
|
|
||||||
|
assert_equals(errorEvents, 1);
|
||||||
|
assert_true(secondCalled);
|
||||||
|
}, "Throwing in event listener with multiple listeners");
|
||||||
|
</script>
|
|
@ -0,0 +1,41 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<meta charset=utf-8>
|
||||||
|
<title>EventListener::handleEvent()</title>
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<div id=log></div>
|
||||||
|
<table id="table" border="1" style="display: none">
|
||||||
|
<tbody id="table-body">
|
||||||
|
<tr id="table-row">
|
||||||
|
<td id="table-cell">Shady Grove</td>
|
||||||
|
<td>Aeolian</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="parent">
|
||||||
|
<td id="target">Over the river, Charlie</td>
|
||||||
|
<td>Dorian</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<script>
|
||||||
|
test(function(t) {
|
||||||
|
var event = "foo";
|
||||||
|
var target = document.getElementById("target");
|
||||||
|
|
||||||
|
var event_listener = {
|
||||||
|
"handleEvent": function(evt) {
|
||||||
|
var that = this;
|
||||||
|
t.step(function() {
|
||||||
|
assert_equals(evt.type, event);
|
||||||
|
assert_equals(evt.target, target);
|
||||||
|
assert_equals(that, event_listener);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var evt = document.createEvent("Event");
|
||||||
|
evt.initEvent(event, true, true);
|
||||||
|
|
||||||
|
target.addEventListener(event, event_listener, true);
|
||||||
|
target.dispatchEvent(evt);
|
||||||
|
});
|
||||||
|
</script>
|
|
@ -0,0 +1,13 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<iframe src="{{location[scheme]}}://{{domains[www2]}}:{{ports[http][0]}}{{location[path]}}/../EventListener-incumbent-global-subsubframe.sub.html"></iframe>
|
||||||
|
<script>
|
||||||
|
document.domain = "{{host}}";
|
||||||
|
onmessage = function(e) {
|
||||||
|
if (e.data == "start") {
|
||||||
|
frames[0].document.body.addEventListener("click", frames[0].postMessage.bind(frames[0], "respond", "*", undefined));
|
||||||
|
frames[0].postMessage("sendclick", "*");
|
||||||
|
} else {
|
||||||
|
parent.postMessage(e.data, "*");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -0,0 +1,17 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<script>
|
||||||
|
document.domain = "{{host}}";
|
||||||
|
onmessage = function (e) {
|
||||||
|
if (e.data == "sendclick") {
|
||||||
|
document.body.click();
|
||||||
|
} else {
|
||||||
|
parent.postMessage(
|
||||||
|
{
|
||||||
|
actual: e.origin,
|
||||||
|
expected: "{{location[scheme]}}://{{domains[www1]}}:{{ports[http][0]}}",
|
||||||
|
reason: "Incumbent should have been the caller of addEventListener()"
|
||||||
|
},
|
||||||
|
"*")
|
||||||
|
};
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -0,0 +1,20 @@
|
||||||
|
<!doctype html>
|
||||||
|
<meta charset=utf-8>
|
||||||
|
<title></title>
|
||||||
|
<script src=/resources/testharness.js></script>
|
||||||
|
<script src=/resources/testharnessreport.js></script>
|
||||||
|
<iframe src="{{location[scheme]}}://{{domains[www1]}}:{{ports[http][0]}}{{location[path]}}/../EventListener-incumbent-global-subframe.sub.html"></iframe>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
var t = async_test("Check the incumbent global EventListeners are called with");
|
||||||
|
|
||||||
|
onload = t.step_func(function() {
|
||||||
|
onmessage = t.step_func_done(function(e) {
|
||||||
|
var d = e.data;
|
||||||
|
assert_equals(d.actual, d.expected, d.reason);
|
||||||
|
});
|
||||||
|
|
||||||
|
frames[0].postMessage("start", "*");
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
|
@ -0,0 +1,98 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>EventListenerOptions.capture</title>
|
||||||
|
<link rel="author" title="Rick Byers" href="mailto:rbyers@chromium.org">
|
||||||
|
<link rel="help" href="https://dom.spec.whatwg.org/#dom-eventlisteneroptions-capture">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<div id="log"></div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
function testCaptureValue(captureValue, expectedValue) {
|
||||||
|
var handlerPhase = undefined;
|
||||||
|
var handler = function handler(e) {
|
||||||
|
assert_equals(handlerPhase, undefined, "Handler invoked after remove");
|
||||||
|
handlerPhase = e.eventPhase;
|
||||||
|
}
|
||||||
|
document.addEventListener('test', handler, captureValue);
|
||||||
|
document.body.dispatchEvent(new Event('test', {'bubbles': true}));
|
||||||
|
document.removeEventListener('test', handler, captureValue);
|
||||||
|
document.body.dispatchEvent(new Event('test', {'bubbles': true}));
|
||||||
|
assert_equals(handlerPhase, expectedValue, "Incorrect event phase for value: " + JSON.stringify(captureValue));
|
||||||
|
}
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
testCaptureValue(true, Event.CAPTURING_PHASE);
|
||||||
|
testCaptureValue(false, Event.BUBBLING_PHASE);
|
||||||
|
testCaptureValue(null, Event.BUBBLING_PHASE);
|
||||||
|
testCaptureValue(undefined, Event.BUBBLING_PHASE);
|
||||||
|
testCaptureValue(2.3, Event.CAPTURING_PHASE);
|
||||||
|
testCaptureValue(-1000.3, Event.CAPTURING_PHASE);
|
||||||
|
testCaptureValue(NaN, Event.BUBBLING_PHASE);
|
||||||
|
testCaptureValue(+0.0, Event.BUBBLING_PHASE);
|
||||||
|
testCaptureValue(-0.0, Event.BUBBLING_PHASE);
|
||||||
|
testCaptureValue("", Event.BUBBLING_PHASE);
|
||||||
|
testCaptureValue("AAAA", Event.CAPTURING_PHASE);
|
||||||
|
}, "Capture boolean should be honored correctly");
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
testCaptureValue({}, Event.BUBBLING_PHASE);
|
||||||
|
testCaptureValue({capture:true}, Event.CAPTURING_PHASE);
|
||||||
|
testCaptureValue({capture:false}, Event.BUBBLING_PHASE);
|
||||||
|
testCaptureValue({capture:2}, Event.CAPTURING_PHASE);
|
||||||
|
testCaptureValue({capture:0}, Event.BUBBLING_PHASE);
|
||||||
|
}, "Capture option should be honored correctly");
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
var supportsCapture = false;
|
||||||
|
var query_options = {
|
||||||
|
get capture() {
|
||||||
|
supportsCapture = true;
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
get dummy() {
|
||||||
|
assert_unreached("dummy value getter invoked");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
document.addEventListener('test_event', null, query_options);
|
||||||
|
assert_true(supportsCapture, "addEventListener doesn't support the capture option");
|
||||||
|
supportsCapture = false;
|
||||||
|
document.removeEventListener('test_event', null, query_options);
|
||||||
|
assert_true(supportsCapture, "removeEventListener doesn't support the capture option");
|
||||||
|
}, "Supports capture option");
|
||||||
|
|
||||||
|
function testOptionEquality(addOptionValue, removeOptionValue, expectedEquality) {
|
||||||
|
var handlerInvoked = false;
|
||||||
|
var handler = function handler(e) {
|
||||||
|
assert_equals(handlerInvoked, false, "Handler invoked multiple times");
|
||||||
|
handlerInvoked = true;
|
||||||
|
}
|
||||||
|
document.addEventListener('test', handler, addOptionValue);
|
||||||
|
document.removeEventListener('test', handler, removeOptionValue);
|
||||||
|
document.body.dispatchEvent(new Event('test', {'bubbles': true}));
|
||||||
|
assert_equals(!handlerInvoked, expectedEquality, "equivalence of options " +
|
||||||
|
JSON.stringify(addOptionValue) + " and " + JSON.stringify(removeOptionValue));
|
||||||
|
if (handlerInvoked)
|
||||||
|
document.removeEventListener('test', handler, addOptionValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
// Option values that should be treated as equivalent
|
||||||
|
testOptionEquality({}, false, true);
|
||||||
|
testOptionEquality({capture: false}, false, true);
|
||||||
|
testOptionEquality(true, {capture: true}, true);
|
||||||
|
testOptionEquality({capture: null}, undefined, true);
|
||||||
|
testOptionEquality({capture: true}, {dummy: false, capture: 1}, true);
|
||||||
|
testOptionEquality({dummy: true}, false, true);
|
||||||
|
|
||||||
|
// Option values that should be treated as distinct
|
||||||
|
testOptionEquality(true, false, false);
|
||||||
|
testOptionEquality(true, {capture:false}, false);
|
||||||
|
testOptionEquality({}, true, false);
|
||||||
|
|
||||||
|
}, "Equivalence of option values");
|
||||||
|
|
||||||
|
</script>
|
|
@ -12,9 +12,7 @@ var pairs = [
|
||||||
{attr: "classList", sup: ["anyElement"]},
|
{attr: "classList", sup: ["anyElement"]},
|
||||||
// Defined in HTML
|
// Defined in HTML
|
||||||
{attr: "dropzone", sup: ["anyHTMLElement"]},
|
{attr: "dropzone", sup: ["anyHTMLElement"]},
|
||||||
{attr: "headers", sup: ["td", "th"]},
|
|
||||||
{attr: "htmlFor", sup: ["output"]},
|
{attr: "htmlFor", sup: ["output"]},
|
||||||
{attr: "ping", sup: ["a", "area"]},
|
|
||||||
{attr: "relList", sup: ["a", "area", "link"]},
|
{attr: "relList", sup: ["a", "area", "link"]},
|
||||||
{attr: "sandbox", sup: ["iframe"]},
|
{attr: "sandbox", sup: ["iframe"]},
|
||||||
{attr: "sizes", sup: ["link"]}
|
{attr: "sizes", sup: ["link"]}
|
||||||
|
|
|
@ -41,7 +41,7 @@ for (var statusCode of [301, 302, 303, 307, 308]) {
|
||||||
redirectLocation("Redirect " + statusCode + " in \"manual\" mode without location", redirUrl, undefined, statusCode, "manual", true);
|
redirectLocation("Redirect " + statusCode + " in \"manual\" mode without location", redirUrl, undefined, statusCode, "manual", true);
|
||||||
|
|
||||||
redirectLocation("Redirect " + statusCode + " in \"follow\" mode with invalid location", redirUrl, invalidLocationUrl, statusCode, "follow", false);
|
redirectLocation("Redirect " + statusCode + " in \"follow\" mode with invalid location", redirUrl, invalidLocationUrl, statusCode, "follow", false);
|
||||||
redirectLocation("Redirect " + statusCode + " in \"manual\" mode with invalid location", redirUrl, invalidLocationUrl, statusCode, "manual", false);
|
redirectLocation("Redirect " + statusCode + " in \"manual\" mode with invalid location", redirUrl, invalidLocationUrl, statusCode, "manual", true);
|
||||||
|
|
||||||
redirectLocation("Redirect " + statusCode + " in \"follow\" mode with data location", redirUrl, dataLocationUrl, statusCode, "follow", false);
|
redirectLocation("Redirect " + statusCode + " in \"follow\" mode with data location", redirUrl, dataLocationUrl, statusCode, "follow", false);
|
||||||
redirectLocation("Redirect " + statusCode + " in \"manual\" mode with data location", redirUrl, dataLocationUrl, statusCode, "manual", true);
|
redirectLocation("Redirect " + statusCode + " in \"manual\" mode with data location", redirUrl, dataLocationUrl, statusCode, "manual", true);
|
||||||
|
|
|
@ -17,6 +17,7 @@ function redirectMethod(desc, redirectUrl, redirectLocation, redirectStatus, met
|
||||||
assert_equals(resp.status, 200, "Response's status is 200");
|
assert_equals(resp.status, 200, "Response's status is 200");
|
||||||
assert_equals(resp.type, "basic", "Response's type basic");
|
assert_equals(resp.type, "basic", "Response's type basic");
|
||||||
assert_equals(resp.headers.get("x-request-method"), expectedMethod, "Request method after redirection is " + expectedMethod);
|
assert_equals(resp.headers.get("x-request-method"), expectedMethod, "Request method after redirection is " + expectedMethod);
|
||||||
|
assert_true(resp.redirected);
|
||||||
return resp.text().then(function(text) {
|
return resp.text().then(function(text) {
|
||||||
assert_equals(text, expectedMethod == "POST" ? requestInit.body : "");
|
assert_equals(text, expectedMethod == "POST" ? requestInit.body : "");
|
||||||
});
|
});
|
||||||
|
@ -24,6 +25,14 @@ function redirectMethod(desc, redirectUrl, redirectLocation, redirectStatus, met
|
||||||
}, desc);
|
}, desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
promise_test(function(test) {
|
||||||
|
assert_false(new Response().redirected);
|
||||||
|
return fetch(RESOURCES_DIR + "method.py").then(function(resp) {
|
||||||
|
assert_equals(resp.status, 200, "Response's status is 200");
|
||||||
|
assert_false(resp.redirected);
|
||||||
|
});
|
||||||
|
}, "Response.redirected should be false on not-redirected responses");
|
||||||
|
|
||||||
var redirUrl = RESOURCES_DIR + "redirect.py";
|
var redirUrl = RESOURCES_DIR + "redirect.py";
|
||||||
var locationUrl = "method.py";
|
var locationUrl = "method.py";
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<script>
|
<script>
|
||||||
onload = function() {
|
onload = function() {
|
||||||
parent.postMessage("003-1", "*");
|
parent.postMessage("004-1", "*");
|
||||||
setTimeout(function() {location = location.replace("http://", "http://www.").replace("004-1.html", "004-2.html");}, 100);
|
setTimeout(function() {location = location.href.replace("http://", "http://www.").replace("004-1.html", "004-2.html");}, 100);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<script src="/resources/testharness.js"></script>
|
<script src="/resources/testharness.js"></script>
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
<div id="log"></div>
|
<div id="log"></div>
|
||||||
<iframe name="test"></iframe>
|
<iframe id="test" name="test"></iframe>
|
||||||
<a target="test" onclick="document.getElementById('test').contentWindow.location='click.html'" href="href.html">Test</a>
|
<a target="test" onclick="document.getElementById('test').contentWindow.location='click.html'" href="href.html">Test</a>
|
||||||
<script>
|
<script>
|
||||||
var t = async_test();
|
var t = async_test();
|
||||||
|
|
|
@ -4,6 +4,10 @@
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
<div id="log"></div>
|
<div id="log"></div>
|
||||||
<iframe id="test" name="test"></iframe>
|
<iframe id="test" name="test"></iframe>
|
||||||
|
<!-- XXX: What is this test trying to do? It's navigating the subframe, but
|
||||||
|
doing a write() to _this_ document, and the "javascript:" in there is
|
||||||
|
completely a red herring: it's a label, not a protocol. There is no
|
||||||
|
javascript url involved here, unlike what the title claims! -->
|
||||||
<a target="test" onclick="javascript:(function() {var x = new XMLHttpRequest(); x.open('GET', 'blank.html?pipe=trickle(d2)', false); x.send(); document.write('write<script>parent.postMessage("write", "*")</script>'); return '<script>parent.postMessage("click", "*")</script>'})()" href="href.html">Test</a>
|
<a target="test" onclick="javascript:(function() {var x = new XMLHttpRequest(); x.open('GET', 'blank.html?pipe=trickle(d2)', false); x.send(); document.write('write<script>parent.postMessage("write", "*")</script>'); return '<script>parent.postMessage("click", "*")</script>'})()" href="href.html">Test</a>
|
||||||
<script>
|
<script>
|
||||||
var t = async_test(undefined, {timeout:4000});
|
var t = async_test(undefined, {timeout:4000});
|
||||||
|
|
|
@ -13,8 +13,8 @@ t.step(function() {
|
||||||
events.push('after script');
|
events.push('after script');
|
||||||
});
|
});
|
||||||
onload = t.step_func(function() {
|
onload = t.step_func(function() {
|
||||||
//assuming the order is sync
|
// javascript: executions are async.
|
||||||
assert_array_equals(events, ['javascript', 'after script']);
|
assert_array_equals(events, ['after script', 'javascript']);
|
||||||
t.done();
|
t.done();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -14,8 +14,8 @@ t.step(function() {
|
||||||
events.push('after script');
|
events.push('after script');
|
||||||
});
|
});
|
||||||
onload = t.step_func(function() {
|
onload = t.step_func(function() {
|
||||||
//assuming the order is sync
|
// javascript: executions are async.
|
||||||
assert_array_equals(events, ['javascript', 'after script']);
|
assert_array_equals(events, ['after script', 'submit']);
|
||||||
t.done();
|
t.done();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -13,8 +13,8 @@ t.step(function() {
|
||||||
events.push('after script');
|
events.push('after script');
|
||||||
});
|
});
|
||||||
onload = t.step_func(function() {
|
onload = t.step_func(function() {
|
||||||
//assuming the order is sync
|
// javascript: executions are async.
|
||||||
assert_array_equals(events, ['click', 'href', 'after script']);
|
assert_array_equals(events, ['click', 'after script', 'href']);
|
||||||
t.done();
|
t.done();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
<!doctype html>
|
||||||
|
<meta charset=utf-8>
|
||||||
|
<title>Test that javascript: evaluation only performs a navigation to the
|
||||||
|
result when the result is a string value.</title>
|
||||||
|
<script src=/resources/testharness.js></script>
|
||||||
|
<script src=/resources/testharnessreport.js></script>
|
||||||
|
<iframe src="javascript:'1'"></iframe>
|
||||||
|
<iframe src="javascript:1"></iframe>
|
||||||
|
<iframe src="javascript:({ toString: function() { return '1'; } })"></iframe>
|
||||||
|
<iframe src="javascript:undefined"></iframe>
|
||||||
|
<iframe src="javascript:null"></iframe>
|
||||||
|
<iframe src="javascript:true"></iframe>
|
||||||
|
<iframe src="javascript:new String('1')"></iframe>
|
||||||
|
<script>
|
||||||
|
var t = async_test();
|
||||||
|
onload = t.step_func_done(function() {
|
||||||
|
assert_equals(frames[0].document.documentElement.textContent,
|
||||||
|
"1", "string return should cause navigation");
|
||||||
|
assert_equals(frames[1].document.documentElement.textContent,
|
||||||
|
"", "number return should not cause navigation");
|
||||||
|
assert_equals(frames[2].document.documentElement.textContent,
|
||||||
|
"", "object return should not cause navigation");
|
||||||
|
assert_equals(frames[3].document.documentElement.textContent,
|
||||||
|
"", "undefined return should not cause navigation");
|
||||||
|
assert_equals(frames[4].document.documentElement.textContent,
|
||||||
|
"", "null return should not cause navigation");
|
||||||
|
assert_equals(frames[5].document.documentElement.textContent,
|
||||||
|
"", "null return should not cause navigation");
|
||||||
|
assert_equals(frames[6].document.documentElement.textContent,
|
||||||
|
"", "String object return should not cause navigation");
|
||||||
|
});
|
||||||
|
</script>
|
|
@ -1,18 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<meta charset=utf-8>
|
|
||||||
<title>Window.status tests</title>
|
|
||||||
<script src="/resources/testharness.js"></script>
|
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
|
||||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-window-status">
|
|
||||||
<div id=log></div>
|
|
||||||
<script>
|
|
||||||
test(function() {
|
|
||||||
assert_true("status" in window, "status in window");
|
|
||||||
assert_equals(window.status, "", "window.status is empty string initially");
|
|
||||||
window.status = "newstatus";
|
|
||||||
assert_equals(window.status, "newstatus", "window.string is set to newstatus");
|
|
||||||
window.status = 5;
|
|
||||||
assert_equals(window.status, "5", "window.status is a string");
|
|
||||||
}, "Functional properties of window.status");
|
|
||||||
|
|
||||||
</script>
|
|
|
@ -1131,7 +1131,7 @@ interface HTMLDivElement : HTMLElement {
|
||||||
interface HTMLAnchorElement : HTMLElement {
|
interface HTMLAnchorElement : HTMLElement {
|
||||||
attribute DOMString target;
|
attribute DOMString target;
|
||||||
attribute DOMString download;
|
attribute DOMString download;
|
||||||
[PutForwards=value] readonly attribute DOMTokenList ping;
|
[CEReactions] attribute USVString ping;
|
||||||
attribute DOMString rel;
|
attribute DOMString rel;
|
||||||
[PutForwards=value] readonly attribute DOMTokenList relList;
|
[PutForwards=value] readonly attribute DOMTokenList relList;
|
||||||
attribute DOMString hreflang;
|
attribute DOMString hreflang;
|
||||||
|
@ -1501,7 +1501,7 @@ interface HTMLAreaElement : HTMLElement {
|
||||||
attribute DOMString shape;
|
attribute DOMString shape;
|
||||||
attribute DOMString target;
|
attribute DOMString target;
|
||||||
attribute DOMString download;
|
attribute DOMString download;
|
||||||
[PutForwards=value] readonly attribute DOMTokenList ping;
|
[CEReactions] attribute USVString ping;
|
||||||
attribute DOMString rel;
|
attribute DOMString rel;
|
||||||
[PutForwards=value] readonly attribute DOMTokenList relList;
|
[PutForwards=value] readonly attribute DOMTokenList relList;
|
||||||
// hreflang and type are not reflected
|
// hreflang and type are not reflected
|
||||||
|
@ -1560,7 +1560,7 @@ interface HTMLTableRowElement : HTMLElement {
|
||||||
interface HTMLTableCellElement : HTMLElement {
|
interface HTMLTableCellElement : HTMLElement {
|
||||||
[CEReactions] attribute unsigned long colSpan;
|
[CEReactions] attribute unsigned long colSpan;
|
||||||
[CEReactions] attribute unsigned long rowSpan;
|
[CEReactions] attribute unsigned long rowSpan;
|
||||||
[CEReactions, SameObject, PutForwards=value] readonly attribute DOMTokenList headers;
|
[CEReactions] attribute DOMString headers;
|
||||||
readonly attribute long cellIndex;
|
readonly attribute long cellIndex;
|
||||||
|
|
||||||
[CEReactions] attribute DOMString scope; // only conforming for th elements
|
[CEReactions] attribute DOMString scope; // only conforming for th elements
|
||||||
|
@ -1655,9 +1655,9 @@ interface HTMLInputElement : HTMLElement {
|
||||||
readonly attribute NodeList labels;
|
readonly attribute NodeList labels;
|
||||||
|
|
||||||
void select();
|
void select();
|
||||||
attribute unsigned long selectionStart;
|
attribute unsigned long? selectionStart;
|
||||||
attribute unsigned long selectionEnd;
|
attribute unsigned long? selectionEnd;
|
||||||
attribute DOMString selectionDirection;
|
attribute DOMString? selectionDirection;
|
||||||
void setRangeText(DOMString replacement);
|
void setRangeText(DOMString replacement);
|
||||||
void setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode = "preserve");
|
void setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode = "preserve");
|
||||||
void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction);
|
void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction);
|
||||||
|
@ -1778,9 +1778,9 @@ interface HTMLTextAreaElement : HTMLElement {
|
||||||
readonly attribute NodeList labels;
|
readonly attribute NodeList labels;
|
||||||
|
|
||||||
void select();
|
void select();
|
||||||
attribute unsigned long selectionStart;
|
attribute unsigned long? selectionStart;
|
||||||
attribute unsigned long selectionEnd;
|
attribute unsigned long? selectionEnd;
|
||||||
attribute DOMString selectionDirection;
|
attribute DOMString? selectionDirection;
|
||||||
void setRangeText(DOMString replacement);
|
void setRangeText(DOMString replacement);
|
||||||
void setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode = "preserve");
|
void setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode = "preserve");
|
||||||
void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction);
|
void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction);
|
||||||
|
@ -3187,6 +3187,13 @@ setup(function() {
|
||||||
iframe.hidden = true;
|
iframe.hidden = true;
|
||||||
document.body.appendChild(iframe);
|
document.body.appendChild(iframe);
|
||||||
}, {explicit_done:true});
|
}, {explicit_done:true});
|
||||||
|
|
||||||
|
function createInput(type) {
|
||||||
|
var input = document.createElement('input');
|
||||||
|
input.type = type;
|
||||||
|
return input;
|
||||||
|
}
|
||||||
|
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
idlArray.add_objects({
|
idlArray.add_objects({
|
||||||
NodeList: ['document.getElementsByName("name")'],
|
NodeList: ['document.getElementsByName("name")'],
|
||||||
|
@ -3292,7 +3299,31 @@ window.onload = function() {
|
||||||
HTMLFieldsetElement: ['document.createElement("fieldset")'],
|
HTMLFieldsetElement: ['document.createElement("fieldset")'],
|
||||||
HTMLLegendElement: ['document.createElement("legend")'],
|
HTMLLegendElement: ['document.createElement("legend")'],
|
||||||
HTMLLabelElement: ['document.createElement("label")'],
|
HTMLLabelElement: ['document.createElement("label")'],
|
||||||
HTMLInputElement: ['document.createElement("input")'],
|
HTMLInputElement: [
|
||||||
|
'document.createElement("input")',
|
||||||
|
'createInput("text")',
|
||||||
|
'createInput("hidden")',
|
||||||
|
'createInput("search")',
|
||||||
|
'createInput("tel")',
|
||||||
|
'createInput("url")',
|
||||||
|
'createInput("email")',
|
||||||
|
'createInput("password")',
|
||||||
|
'createInput("date")',
|
||||||
|
'createInput("month")',
|
||||||
|
'createInput("week")',
|
||||||
|
'createInput("time")',
|
||||||
|
'createInput("datetime-local")',
|
||||||
|
'createInput("number")',
|
||||||
|
'createInput("range")',
|
||||||
|
'createInput("color")',
|
||||||
|
'createInput("checkbox")',
|
||||||
|
'createInput("radio")',
|
||||||
|
'createInput("file")',
|
||||||
|
'createInput("submit")',
|
||||||
|
'createInput("image")',
|
||||||
|
'createInput("reset")',
|
||||||
|
'createInput("button")'
|
||||||
|
],
|
||||||
HTMLButtonElement: ['document.createElement("button")'],
|
HTMLButtonElement: ['document.createElement("button")'],
|
||||||
HTMLSelectElement: ['document.createElement("select")'],
|
HTMLSelectElement: ['document.createElement("select")'],
|
||||||
HTMLDataListElement: ['document.createElement("datalist")'],
|
HTMLDataListElement: ['document.createElement("datalist")'],
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset=utf-8>
|
<meta charset=utf-8>
|
||||||
<link rel="match" href="div-align-ref.html">
|
|
||||||
<style>
|
<style>
|
||||||
.test { width: 50px; background-color: yellow; }
|
.test { width: 50px; background-color: yellow; }
|
||||||
.center { text-align: center; }
|
.center { text-align: center; }
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset=utf-8>
|
<meta charset=utf-8>
|
||||||
|
<link rel="match" href="div-align-ref.html">
|
||||||
<style>
|
<style>
|
||||||
.test { width: 50px; background-color: yellow; }
|
.test { width: 50px; background-color: yellow; }
|
||||||
.rtl { direction: rtl; }
|
.rtl { direction: rtl; }
|
||||||
|
|
|
@ -32,7 +32,7 @@ var HTML5_VOID_ELEMENTS = [ 'area', 'base', 'br', 'col', 'command', 'embed',
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/multipage/forms.html#form-associated-element
|
// https://html.spec.whatwg.org/multipage/multipage/forms.html#form-associated-element
|
||||||
var HTML5_FORM_ASSOCIATED_ELEMENTS = [ 'button', 'fieldset', 'input', 'keygen',
|
var HTML5_FORM_ASSOCIATED_ELEMENTS = [ 'button', 'fieldset', 'input', 'keygen',
|
||||||
'label', 'object', 'output', 'select', 'textarea' ];
|
'object', 'output', 'select', 'textarea' ];
|
||||||
|
|
||||||
function newDocument() {
|
function newDocument() {
|
||||||
var d = document.implementation.createDocument();
|
var d = document.implementation.createDocument();
|
||||||
|
|
|
@ -0,0 +1,89 @@
|
||||||
|
<!doctype html>
|
||||||
|
<meta charset=utf-8>
|
||||||
|
<title>Check how allowfullscreen affects fullscreen enabled flag</title>
|
||||||
|
<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org">
|
||||||
|
<link rel="author" title="Mozilla" href="https://www.mozilla.org">
|
||||||
|
<link rel="help" href="https://html.spec.whatwg.org/multipage/browsers.html#initialise-the-document-object">
|
||||||
|
<link rel="help" href="https://fullscreen.spec.whatwg.org/#fullscreen-enabled-flag">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
|
||||||
|
<div id="log"></div>
|
||||||
|
<script>
|
||||||
|
function test_allowfullscreen(t, setup_iframe) {
|
||||||
|
var iframe = document.createElement("iframe");
|
||||||
|
setup_iframe(iframe);
|
||||||
|
iframe.src = "support/blank.htm";
|
||||||
|
var eventWatcher = new EventWatcher(t, iframe, "load");
|
||||||
|
document.body.appendChild(iframe);
|
||||||
|
t.add_cleanup(function() {
|
||||||
|
document.body.removeChild(iframe);
|
||||||
|
});
|
||||||
|
|
||||||
|
assert_true(document.fullscreenEnabled, "Top level document has fullscreen enabled flag set");
|
||||||
|
eventWatcher.wait_for("load").then(t.step_func(function() {
|
||||||
|
assert_false(iframe.contentDocument.fullscreenEnabled, "Document inside iframe without allowfullscreen attribute should not have fullscreen enabled flag set");
|
||||||
|
iframe.setAttribute("allowfullscreen", true);
|
||||||
|
assert_false(iframe.contentDocument.fullscreenEnabled, "Setting allowfullscreen attribute after document load should not affect fullscreen enabled flag");
|
||||||
|
iframe.contentWindow.location.reload();
|
||||||
|
return eventWatcher.wait_for("load");
|
||||||
|
})).then(t.step_func(function() {
|
||||||
|
assert_true(iframe.contentDocument.fullscreenEnabled, "Fullscreen enabled flag should be set when a new document is loaded with allowfullscreen attribute present");
|
||||||
|
iframe.removeAttribute("allowfullscreen");
|
||||||
|
assert_true(iframe.contentDocument.fullscreenEnabled, "Removing allowfullscreen attribute should not affect fullscreen enabled flag");
|
||||||
|
iframe.contentWindow.location.reload();
|
||||||
|
return eventWatcher.wait_for("load");
|
||||||
|
})).then(t.step_func_done(function() {
|
||||||
|
assert_false(iframe.contentDocument.fullscreenEnabled, "Fullscreen enabled flag should be reset when a new document is loaded with allowfullscreen attribute absent");
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
async_test(function(t) {
|
||||||
|
test_allowfullscreen(t, function(iframe) {});
|
||||||
|
}, "iframe-allowfullscreen");
|
||||||
|
|
||||||
|
async_test(function(t) {
|
||||||
|
test_allowfullscreen(t, function(iframe) {
|
||||||
|
iframe.setAttribute("sandbox", "allow-same-origin");
|
||||||
|
});
|
||||||
|
}, "iframe-sandbox-allowfullscreen");
|
||||||
|
|
||||||
|
function test_allowfullscreen_dialog(t, setup_iframe, check) {
|
||||||
|
var iframe = document.createElement("iframe");
|
||||||
|
setup_iframe(iframe);
|
||||||
|
iframe.src = "support/blank.htm";
|
||||||
|
var eventWatcher = new EventWatcher(t, iframe, "load");
|
||||||
|
document.body.appendChild(iframe);
|
||||||
|
t.add_cleanup(function() {
|
||||||
|
document.body.removeChild(iframe);
|
||||||
|
});
|
||||||
|
|
||||||
|
var newWin;
|
||||||
|
assert_true(document.fullscreenEnabled, "Top level document has fullscreen enabled flag set");
|
||||||
|
eventWatcher.wait_for("load").then(t.step_func(function() {
|
||||||
|
assert_false(iframe.contentDocument.fullscreenEnabled, "Document inside iframe without allowfullscreen attribute should not have fullscreen enabled flag set");
|
||||||
|
newWin = iframe.contentWindow.open("support/blank.htm");
|
||||||
|
t.add_cleanup(function() {
|
||||||
|
newWin.close();
|
||||||
|
});
|
||||||
|
var newWinEventWatcher = new EventWatcher(t, newWin, "load");
|
||||||
|
return newWinEventWatcher.wait_for("load");
|
||||||
|
})).then(t.step_func_done(function() {
|
||||||
|
check(newWin);
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
async_test(function(t) {
|
||||||
|
test_allowfullscreen_dialog(t, function() {}, function(newWin) {
|
||||||
|
assert_true(newWin.document.fullscreenEnabled, "Document in the new window is a top level document, thus should has fullscreen enabled flag set");
|
||||||
|
});
|
||||||
|
}, "iframe-allowfullscreen-dialog");
|
||||||
|
|
||||||
|
async_test(function(t) {
|
||||||
|
test_allowfullscreen_dialog(t, function(iframe) {
|
||||||
|
iframe.setAttribute("sandbox", "allow-same-origin allow-popups");
|
||||||
|
}, function(newWin) {
|
||||||
|
assert_false(newWin.document.fullscreenEnabled, "Document in the new window should inherit the sandboxed fullscreen flag and should not have fullscreen enabled flag set");
|
||||||
|
});
|
||||||
|
}, "iframe-sandbox-allowfullscreen-dialog");
|
||||||
|
</script>
|
|
@ -0,0 +1,25 @@
|
||||||
|
<!doctype html>
|
||||||
|
<meta charset=utf-8>
|
||||||
|
<title>Check that popups from a sandboxed iframe escape the sandbox if
|
||||||
|
allow-popups-to-escape-sandbox is used</title>
|
||||||
|
<script src=/resources/testharness.js></script>
|
||||||
|
<script src=/resources/testharnessreport.js></script>
|
||||||
|
<iframe sandbox="allow-scripts allow-popups allow-popups-to-escape-sandbox">
|
||||||
|
</iframe>
|
||||||
|
<script>
|
||||||
|
var t = async_test();
|
||||||
|
var ourOrigin;
|
||||||
|
onmessage = t.step_func(function(e) {
|
||||||
|
assert_equals(e.data, "hello", "This is our origin getter message");
|
||||||
|
ourOrigin = e.origin;
|
||||||
|
|
||||||
|
onmessage = t.step_func_done(function(e) {
|
||||||
|
assert_equals(e.origin, "null", "It came from a sandboxed iframe");
|
||||||
|
assert_equals(e.data.data, undefined, "Should have the right message");
|
||||||
|
assert_equals(e.data.origin, ourOrigin, "Should have escaped the sandbox");
|
||||||
|
});
|
||||||
|
|
||||||
|
document.querySelector("iframe").src = "iframe_sandbox_popups_helper.html";
|
||||||
|
});
|
||||||
|
postMessage("hello", "*");
|
||||||
|
</script>
|
|
@ -0,0 +1,17 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<script>
|
||||||
|
var popupWin;
|
||||||
|
if (opener) {
|
||||||
|
// We're the popup. Send back our state. What we really want to send is
|
||||||
|
// our origin, but that will come automatically.
|
||||||
|
opener.postMessage(undefined, "*");
|
||||||
|
self.close();
|
||||||
|
} else {
|
||||||
|
// We're the child. Start listening for messages and open ourselves as the
|
||||||
|
// popup.
|
||||||
|
onmessage = function (e) {
|
||||||
|
parent.postMessage({ data: e.data, origin: e.origin }, "*");
|
||||||
|
};
|
||||||
|
popupWin = window.open(location.href);
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -0,0 +1,15 @@
|
||||||
|
<!doctype html>
|
||||||
|
<meta charset=utf-8>
|
||||||
|
<title>Check that popups from a sandboxed iframe do not escape the sandbox</title>
|
||||||
|
<script src=/resources/testharness.js></script>
|
||||||
|
<script src=/resources/testharnessreport.js></script>
|
||||||
|
<script>
|
||||||
|
var t = async_test();
|
||||||
|
onmessage = t.step_func_done(function(e) {
|
||||||
|
assert_equals(e.origin, "null", "It came from a sandboxed iframe");
|
||||||
|
assert_equals(e.data.data, undefined, "Should have the right message");
|
||||||
|
assert_equals(e.data.origin, "null", "Should not have escaped the sandbox");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<iframe sandbox="allow-scripts allow-popups"
|
||||||
|
src="iframe_sandbox_popups_helper.html"></iframe>
|
|
@ -125,6 +125,8 @@
|
||||||
<img srcset='/images/green-1x1.png?e107 50w, /images/green-16x16.png?e107 51w' sizes='not ((min-width:0) or (unknown "general-enclosed")) 100vw, 1px'>
|
<img srcset='/images/green-1x1.png?e107 50w, /images/green-16x16.png?e107 51w' sizes='not ((min-width:0) or (unknown "general-enclosed")) 100vw, 1px'>
|
||||||
<img srcset='/images/green-1x1.png?e108 50w, /images/green-16x16.png?e108 51w' sizes='(max-width:0) or (unknown-general-enclosed !) 100vw, 1px'>
|
<img srcset='/images/green-1x1.png?e108 50w, /images/green-16x16.png?e108 51w' sizes='(max-width:0) or (unknown-general-enclosed !) 100vw, 1px'>
|
||||||
<img srcset='/images/green-1x1.png?e109 50w, /images/green-16x16.png?e109 51w' sizes='not ((max-width:0) or (unknown "general-enclosed")) 100vw, 1px'>
|
<img srcset='/images/green-1x1.png?e109 50w, /images/green-16x16.png?e109 51w' sizes='not ((max-width:0) or (unknown "general-enclosed")) 100vw, 1px'>
|
||||||
|
<img srcset='/images/green-1x1.png?f48 50w, /images/green-16x16.png?f48 51w' sizes='calc(1px'>
|
||||||
|
<img srcset='/images/green-1x1.png?f49 50w, /images/green-16x16.png?f49 51w' sizes='(min-width:0) calc(1px'>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<img srcset='/images/green-1x1.png?f1 50w, /images/green-16x16.png?f1 51w' sizes='100vw'>
|
<img srcset='/images/green-1x1.png?f1 50w, /images/green-16x16.png?f1 51w' sizes='100vw'>
|
||||||
|
@ -174,5 +176,3 @@
|
||||||
<img srcset='/images/green-1x1.png?f45 50w, /images/green-16x16.png?f45 51w' sizes='-1e0px'>
|
<img srcset='/images/green-1x1.png?f45 50w, /images/green-16x16.png?f45 51w' sizes='-1e0px'>
|
||||||
<img srcset='/images/green-1x1.png?f46 50w, /images/green-16x16.png?f46 51w' sizes='1e1.5px'>
|
<img srcset='/images/green-1x1.png?f46 50w, /images/green-16x16.png?f46 51w' sizes='1e1.5px'>
|
||||||
<img srcset='/images/green-1x1.png?f47 50w, /images/green-16x16.png?f47 51w' style='--foo: 1px' sizes='var(--foo)'>
|
<img srcset='/images/green-1x1.png?f47 50w, /images/green-16x16.png?f47 51w' style='--foo: 1px' sizes='var(--foo)'>
|
||||||
<img srcset='/images/green-1x1.png?f48 50w, /images/green-16x16.png?f48 51w' sizes='calc(1px'>
|
|
||||||
<img srcset='/images/green-1x1.png?f49 50w, /images/green-16x16.png?f49 51w' sizes='(min-width:0) calc(1px'>
|
|
||||||
|
|
|
@ -99,6 +99,11 @@
|
||||||
}, "Check the checkValidity method of the form element when it has a fieldset child");
|
}, "Check the checkValidity method of the form element when it has a fieldset child");
|
||||||
|
|
||||||
test(function(){
|
test(function(){
|
||||||
|
// Restore the condition to default which was modified during the previous test.
|
||||||
|
document.getElementById("fs").disabled = false;
|
||||||
|
document.getElementById("inp1").value = "";
|
||||||
|
document.getElementById("inp1").type = "text";
|
||||||
|
|
||||||
assert_true("reportValidity" in fm3, "The reportValidity method is not supported.");
|
assert_true("reportValidity" in fm3, "The reportValidity method is not supported.");
|
||||||
assert_false(fm3.reportValidity(), "The reportValidity method should be false.");
|
assert_false(fm3.reportValidity(), "The reportValidity method should be false.");
|
||||||
document.getElementById("fs").disabled = true;
|
document.getElementById("fs").disabled = true;
|
||||||
|
|
|
@ -10,37 +10,88 @@
|
||||||
<p><fieldset id="fieldset">fieldset</fieldset>
|
<p><fieldset id="fieldset">fieldset</fieldset>
|
||||||
<p><input id="input">
|
<p><input id="input">
|
||||||
<p><keygen id="keygen">
|
<p><keygen id="keygen">
|
||||||
<p><label id="label">label</label>
|
|
||||||
<p><object id="object">object</object>
|
<p><object id="object">object</object>
|
||||||
<p><output id="output">output</output>
|
<p><output id="output">output</output>
|
||||||
<p><select id="select"><option>select</option></select>
|
<p><select id="select"><option>select</option></select>
|
||||||
<p><textarea id="textarea">textarea</textarea>
|
<p><textarea id="textarea">textarea</textarea>
|
||||||
|
|
||||||
|
<!-- label is special: label.form is an alias for label.control.form -->
|
||||||
|
<p><label id="label">label</label>
|
||||||
|
<p><label id="label-form" form="form">label-form</label>
|
||||||
|
<p><label id="label-form-form2" form="form2">label-form-form2</label>
|
||||||
|
<p><label id="label-with-control">label-with-control <input></label>
|
||||||
|
<p><label id="label-for" for="control-for-label">label-for</label> <input id="control-for-label">
|
||||||
|
<p><label id="label-with-progress">label-with-progress <progress></progress></label>
|
||||||
|
<p><label id="label-with-meter">label-with-meter <meter></meter></label>
|
||||||
|
<p>
|
||||||
|
<input id="input-with-form-attr-in-form" form="form2">
|
||||||
|
<label id="label-for-control-form-in-form" for="input-with-form-attr-in-form">label-for-control-form-in-form</label>
|
||||||
|
</p>
|
||||||
</form>
|
</form>
|
||||||
|
<form id="form2"></form>
|
||||||
|
<p>
|
||||||
|
<input id="input-with-form-attr" form="form2">
|
||||||
|
<label id="label-for-control-form" for="input-with-form-attr">label-for-control-form</label>
|
||||||
|
</p>
|
||||||
|
<!-- misnested tags where form-association is set by the HTML parser -->
|
||||||
|
<table>
|
||||||
|
<form id="form3"><!-- self-closes but sets the form element pointer -->
|
||||||
|
<tr>
|
||||||
|
<td><label id="label-in-table">label-in-table</label>
|
||||||
|
<td><label id="label-in-table-with-control">label-in-table <input></label>
|
||||||
|
<td><label id="label-in-table-for" for="input-in-table">label-in-table-for</label>
|
||||||
|
<td><input id="input-in-table"><!-- is associated with form3 -->
|
||||||
|
</tr>
|
||||||
|
</form>
|
||||||
|
</table>
|
||||||
<script>
|
<script>
|
||||||
var form;
|
var form;
|
||||||
setup(function() {
|
setup(function() {
|
||||||
form = document.getElementById("form");
|
form = document.getElementById("form");
|
||||||
if (!form) {
|
form2 = document.getElementById("form2");
|
||||||
throw new TypeError("Didn't find form");
|
form3 = document.getElementById("form3");
|
||||||
|
if (!form || !form2 || !form3) {
|
||||||
|
throw new TypeError("Didn't find all forms");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var reassociateableElements = [
|
var listedElements = [
|
||||||
"button",
|
"button",
|
||||||
"fieldset",
|
"fieldset",
|
||||||
"input",
|
"input",
|
||||||
"keygen",
|
"keygen",
|
||||||
"label",
|
|
||||||
"object",
|
"object",
|
||||||
"output",
|
"output",
|
||||||
"select",
|
"select",
|
||||||
"textarea",
|
"textarea",
|
||||||
];
|
];
|
||||||
|
|
||||||
reassociateableElements.forEach(function(localName) {
|
listedElements.forEach(function(localName) {
|
||||||
test(function() {
|
test(function() {
|
||||||
var button = document.getElementById(localName);
|
var control = document.getElementById(localName);
|
||||||
assert_equals(button.form, form);
|
assert_equals(control.form, form);
|
||||||
}, localName + ".form");
|
}, localName + ".form");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// label
|
||||||
|
function testLabel(id, expected) {
|
||||||
|
test(function() {
|
||||||
|
var label = document.getElementById(id);
|
||||||
|
assert_equals(label.control && label.control.form, expected, 'Sanity check: label.control.form');
|
||||||
|
assert_equals(label.form, expected, 'label.form');
|
||||||
|
}, id + ".form");
|
||||||
|
}
|
||||||
|
|
||||||
|
testLabel("label", null);
|
||||||
|
testLabel("label-form", null);
|
||||||
|
testLabel("label-form-form2", null);
|
||||||
|
testLabel("label-with-control", form);
|
||||||
|
testLabel("label-for", form);
|
||||||
|
testLabel("label-with-progress", null);
|
||||||
|
testLabel("label-with-meter", null);
|
||||||
|
testLabel("label-for-control-form-in-form", form2);
|
||||||
|
testLabel("label-for-control-form", form2);
|
||||||
|
testLabel("label-in-table", null);
|
||||||
|
testLabel("label-in-table-with-control", form3);
|
||||||
|
testLabel("label-in-table-for", form3);
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
c1_click_fired = true;
|
c1_click_fired = true;
|
||||||
assert_false(c1_input_fired, "click event should fire before input event");
|
assert_false(c1_input_fired, "click event should fire before input event");
|
||||||
assert_false(c1_change_fired, "click event should fire before change event");
|
assert_false(c1_change_fired, "click event should fire before change event");
|
||||||
|
assert_false(e.isTrusted, "click()-initiated click event should not be trusted");
|
||||||
});
|
});
|
||||||
checkbox1.oninput = t1.step_func(function(e) {
|
checkbox1.oninput = t1.step_func(function(e) {
|
||||||
c1_input_fired = true;
|
c1_input_fired = true;
|
||||||
|
|
|
@ -83,6 +83,7 @@
|
||||||
click_fired = true;
|
click_fired = true;
|
||||||
assert_false(input_fired, "click event should fire before input event");
|
assert_false(input_fired, "click event should fire before input event");
|
||||||
assert_false(change_fired, "click event should fire before change event");
|
assert_false(change_fired, "click event should fire before change event");
|
||||||
|
assert_false(e.isTrusted, "click()-initiated click event shouldn't be trusted");
|
||||||
});
|
});
|
||||||
|
|
||||||
radio5.oninput = t1.step_func(function(e) {
|
radio5.oninput = t1.step_func(function(e) {
|
||||||
|
@ -90,7 +91,7 @@
|
||||||
assert_true(click_fired, "input event should fire after click event");
|
assert_true(click_fired, "input event should fire after click event");
|
||||||
assert_false(change_fired, "input event should fire before change event");
|
assert_false(change_fired, "input event should fire before change event");
|
||||||
assert_true(e.bubbles, "input event should bubble")
|
assert_true(e.bubbles, "input event should bubble")
|
||||||
assert_false(e.isTrusted, "click()-initiated input event shouldn't be trusted");
|
assert_true(e.isTrusted, "input event should be trusted");
|
||||||
assert_false(e.cancelable, "input event should not be cancelable");
|
assert_false(e.cancelable, "input event should not be cancelable");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -99,7 +100,7 @@
|
||||||
assert_true(click_fired, "change event should fire after click event");
|
assert_true(click_fired, "change event should fire after click event");
|
||||||
assert_true(input_fired, "change event should fire after input event");
|
assert_true(input_fired, "change event should fire after input event");
|
||||||
assert_true(e.bubbles, "change event should bubble")
|
assert_true(e.bubbles, "change event should bubble")
|
||||||
assert_false(e.isTrusted, "click()-initiated change event shouldn't be trusted");
|
assert_true(e.isTrusted, "change event should be trusted");
|
||||||
assert_false(e.cancelable, "change event should not be cancelable");
|
assert_false(e.cancelable, "change event should not be cancelable");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -105,6 +105,8 @@ test(function() {
|
||||||
input.selectionStart = 0;
|
input.selectionStart = 0;
|
||||||
a = input.selectionEnd;
|
a = input.selectionEnd;
|
||||||
input.selectionEnd = 0;
|
input.selectionEnd = 0;
|
||||||
|
a = input.selectionDirection;
|
||||||
|
input.selectionDirection = "none";
|
||||||
input.setSelectionRange(0, 0);
|
input.setSelectionRange(0, 0);
|
||||||
input.setRangeText('', 0, 0);
|
input.setRangeText('', 0, 0);
|
||||||
|
|
||||||
|
@ -118,10 +120,12 @@ test(function() {
|
||||||
input.type = type;
|
input.type = type;
|
||||||
assert_equals(input.type, type, "the given input type is not supported");
|
assert_equals(input.type, type, "the given input type is not supported");
|
||||||
|
|
||||||
assert_throws("INVALID_STATE_ERR", function() { var a = input.selectionStart; });
|
assert_equals(input.selectionStart, null, 'getting input.selectionStart');
|
||||||
assert_throws("INVALID_STATE_ERR", function() { input.selectionStart = 0; });
|
assert_throws("INVALID_STATE_ERR", function() { input.selectionStart = 0; });
|
||||||
assert_throws("INVALID_STATE_ERR", function() { var a = input.selectionEnd; });
|
assert_equals(input.selectionEnd, null, 'getting input.selectionEnd');
|
||||||
assert_throws("INVALID_STATE_ERR", function() { input.selectionEnd = 0; });
|
assert_throws("INVALID_STATE_ERR", function() { input.selectionEnd = 0; });
|
||||||
|
assert_equals(input.selectionDirection, null, 'getting input.selectionDirection');
|
||||||
|
assert_throws("INVALID_STATE_ERR", function() { input.selectionDirection = "none"; });
|
||||||
assert_throws("INVALID_STATE_ERR", function() { input.setSelectionRange(0, 0); });
|
assert_throws("INVALID_STATE_ERR", function() { input.setSelectionRange(0, 0); });
|
||||||
assert_throws("INVALID_STATE_ERR", function() { input.setRangeText('', 0, 0); });
|
assert_throws("INVALID_STATE_ERR", function() { input.setRangeText('', 0, 0); });
|
||||||
|
|
||||||
|
|
|
@ -121,14 +121,14 @@
|
||||||
|
|
||||||
// form attribute
|
// form attribute
|
||||||
test(function () {
|
test(function () {
|
||||||
assert_equals(document.getElementById("lbl0").form, document.getElementById("fm"),
|
assert_equals(document.getElementById("lbl0").form, null,
|
||||||
"The 'form' property for a label with a form owner should return the form owner.");
|
"The 'form' property for a label should return null if label.control is null.");
|
||||||
}, "A label's form attribute should return its form owner.");
|
}, "A label in a form without a control");
|
||||||
|
|
||||||
test(function () {
|
test(function () {
|
||||||
assert_equals(document.getElementById("lbl6").form, null,
|
assert_equals(document.getElementById("lbl6").form, document.getElementById("fm"),
|
||||||
"The 'form' property for a label without a form owner should return null.");
|
"The 'form' property for a label should return label.control.form.");
|
||||||
}, "Check that the labels property of a form control with no label returns a zero-length NodeList.");
|
}, "A label outside a form with a control inside the form");
|
||||||
|
|
||||||
// htmlFor attribute
|
// htmlFor attribute
|
||||||
test(function () {
|
test(function () {
|
||||||
|
|
|
@ -30,14 +30,14 @@
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
testSelector(":checked", ["option1", "checkbox1", "radio1", "menuitem1", "menuitem4"], "':checked' matches checked <input>/<menuitem> in checkbox and radio button states, selected <option>s");
|
testSelectorIdsMatch(":checked", ["option1", "checkbox1", "radio1", "menuitem1", "menuitem4"], "':checked' matches checked <input>/<menuitem> in checkbox and radio button states, selected <option>s");
|
||||||
|
|
||||||
document.getElementById("checkbox1").removeAttribute("type"); // change type of input
|
document.getElementById("checkbox1").removeAttribute("type"); // change type of input
|
||||||
document.getElementById("radio1").removeAttribute("type"); // change type of input
|
document.getElementById("radio1").removeAttribute("type"); // change type of input
|
||||||
testSelector(":checked", ["option1", "menuitem1", "menuitem4"], "':checked' should no longer match <input>s whose type checkbox/radio has been removed");
|
testSelectorIdsMatch(":checked", ["option1", "menuitem1", "menuitem4"], "':checked' should no longer match <input>s whose type checkbox/radio has been removed");
|
||||||
|
|
||||||
document.getElementById("option2").selected = "selected"; // select option2
|
document.getElementById("option2").selected = "selected"; // select option2
|
||||||
document.getElementById("checkbox2").click(); // check chekbox2
|
document.getElementById("checkbox2").click(); // check chekbox2
|
||||||
document.getElementById("radio2").click(); // check radio2
|
document.getElementById("radio2").click(); // check radio2
|
||||||
testSelector(":checked", ["option2", "checkbox2", "radio2", "menuitem1", "menuitem4"], "':checked' matches clicked checkbox and radio buttons");
|
testSelectorIdsMatch(":checked", ["option2", "checkbox2", "radio2", "menuitem1", "menuitem4"], "':checked' matches clicked checkbox and radio buttons");
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -56,9 +56,9 @@
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
testSelector(":default", ["button2", "button4", "input3", "input5", "input7", "checkbox1", "radio1", "option2", "button6", "button8"], "':default' matches <button>s that are their form's default button, <input>s of type submit/image that are their form's default button, checked <input>s and selected <option>s");
|
testSelectorIdsMatch(":default", ["button2", "button4", "input3", "input5", "input7", "checkbox1", "radio1", "option2", "button6", "button8"], "':default' matches <button>s that are their form's default button, <input>s of type submit/image that are their form's default button, checked <input>s and selected <option>s");
|
||||||
|
|
||||||
document.getElementById("button1").type = "submit"; // change the form's default button
|
document.getElementById("button1").type = "submit"; // change the form's default button
|
||||||
testSelector(":default", ["button1", "button4", "input3", "input5", "input7", "checkbox1", "radio1", "option2", "button6", "button8"], "':default' matches dynamically changed form's default buttons");
|
testSelectorIdsMatch(":default", ["button1", "button4", "input3", "input5", "input7", "checkbox1", "radio1", "option2", "button6", "button8"], "':default' matches dynamically changed form's default buttons");
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<html id=html>
|
||||||
|
<head id=head>
|
||||||
<meta charset=utf-8 id=meta>
|
<meta charset=utf-8 id=meta>
|
||||||
<title id=title>Selector: pseudo-classes (:dir(ltr), :dir(rtl))</title>
|
<title id=title>Selector: pseudo-classes (:dir(ltr), :dir(rtl))</title>
|
||||||
<link rel="author" title="Denis Ah-Kang" href="mailto:denis@w3.org" id=link1>
|
<link rel="author" title="Denis Ah-Kang" href="mailto:denis@w3.org" id=link1>
|
||||||
|
@ -10,12 +12,15 @@
|
||||||
#span1 {direction: rtl;}
|
#span1 {direction: rtl;}
|
||||||
#span5, #span6 {display: none;}
|
#span5, #span6 {display: none;}
|
||||||
</style>
|
</style>
|
||||||
|
</head>
|
||||||
|
<body id=body>
|
||||||
<div id="log"></div>
|
<div id="log"></div>
|
||||||
<bdo dir="rtl" id=bdo1>WERBEH</bdo>
|
<bdo dir="rtl" id=bdo1>WERBEH</bdo>
|
||||||
<bdo dir="ltr" id=bdo2>HEBREW</bdo>
|
<bdo dir="ltr" id=bdo2>HEBREW</bdo>
|
||||||
<bdi id=bdi1>HEBREW</bdi>
|
<bdi id=bdi1>HEBREW</bdi>
|
||||||
<bdi dir="rtl" id=bdi2>WERBEH</bdi>
|
<bdi dir="rtl" id=bdi2>WERBEH</bdi>
|
||||||
<bdi dir="ltr" id=bdi3>HEBREW</bdi>
|
<bdi dir="ltr" id=bdi3>HEBREW</bdi>
|
||||||
|
<bdi id=bdi4>إيان</bdi>
|
||||||
<span id=span1>WERBEH</span>
|
<span id=span1>WERBEH</span>
|
||||||
<span dir="rtl" id=span2>WERBEH</span>
|
<span dir="rtl" id=span2>WERBEH</span>
|
||||||
<span dir="ltr" id=span3>HEBREW</span>
|
<span dir="ltr" id=span3>HEBREW</span>
|
||||||
|
@ -26,11 +31,16 @@
|
||||||
<bdo dir="auto" id=bdo4>إيان</bdo>
|
<bdo dir="auto" id=bdo4>إيان</bdo>
|
||||||
<bdo dir="ltr" id=bdo5>עברית</bdo>
|
<bdo dir="ltr" id=bdo5>עברית</bdo>
|
||||||
|
|
||||||
<script>
|
<script id=script4>
|
||||||
testSelector(":dir(rtl)", ["bdo1", "bdi2", "span1", "span2", "span4", "span5", "bdo4"], "':dir(rtl)' matches all elements whose directionality is 'rtl'.");
|
testSelectorIdsMatch(":dir(rtl)", ["bdo1", "bdi2", "bdi4", "span2", "span5", "bdo4"], "':dir(rtl)' matches all elements whose directionality is 'rtl'.");
|
||||||
testSelector(":dir(ltr)", ["html", "head", "body", "meta", "title", "link1", "link2", "script1", "script2", "script3", "stlyle", "log", "bdo2", "bdi3", "span3", "span6", "bdo3", "bdo5"], "':dir(ltr)' matches all elements whose directionality is 'ltr'.");
|
|
||||||
|
var ltrElements = ["html", "head", "meta", "title", "link1", "link2", "script1", "script2", "script3", "style", "body", "log", "bdo2", "bdi1", "bdi3", "span1", "span3", "span4", "span6", "bdo3", "bdo5", "script4"];
|
||||||
|
|
||||||
|
testSelectorIdsMatch(":dir(ltr)", ltrElements, "':dir(ltr)' matches all elements whose directionality is 'ltr'.");
|
||||||
|
|
||||||
var bdo = document.createElement("bdo");
|
var bdo = document.createElement("bdo");
|
||||||
bdo.setAttribute("dir", "ltr");
|
bdo.setAttribute("dir", "ltr");
|
||||||
testSelector(":dir(ltr)", ["meta", "title", "link1", "link2", "script1", "script2", "script3", "stlyle", "log", "bdo2", "bdi3", "span3", "span6", "bdo3"], "':dir(ltr)' doesn't match elements not in the document.");
|
testSelectorIdsMatch(":dir(ltr)", ltrElements, "':dir(ltr)' doesn't match elements not in the document.");
|
||||||
</script>
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
|
@ -14,5 +14,5 @@
|
||||||
var ltr = new Array(),
|
var ltr = new Array(),
|
||||||
all = document.querySelectorAll('*');
|
all = document.querySelectorAll('*');
|
||||||
for(var i = all.length; i--; ltr.unshift(all[i]));
|
for(var i = all.length; i--; ltr.unshift(all[i]));
|
||||||
testSelector(":dir(ltr)", ltr, "direction doesn't affect :dir()");
|
testSelectorElementsMatch(":dir(ltr)", ltr, "direction doesn't affect :dir()");
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -40,21 +40,21 @@
|
||||||
<progress disabled></progress>
|
<progress disabled></progress>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
testSelector(":disabled", ["button2", "input2", "select2", "optgroup2", "option2", "textarea2", "fieldset2", "clubname", "clubnum"], "':disabled' should match only disabled elements");
|
testSelectorIdsMatch(":disabled", ["button2", "input2", "select2", "optgroup2", "option2", "textarea2", "fieldset2", "clubname", "clubnum"], "':disabled' should match only disabled elements");
|
||||||
|
|
||||||
document.getElementById("button2").removeAttribute("disabled");
|
document.getElementById("button2").removeAttribute("disabled");
|
||||||
testSelector(":disabled", ["input2", "select2", "optgroup2", "option2", "textarea2", "fieldset2", "clubname", "clubnum"], "':disabled' should not match elements whose disabled attribute has been removed");
|
testSelectorIdsMatch(":disabled", ["input2", "select2", "optgroup2", "option2", "textarea2", "fieldset2", "clubname", "clubnum"], "':disabled' should not match elements whose disabled attribute has been removed");
|
||||||
|
|
||||||
document.getElementById("button1").setAttribute("disabled", "disabled");
|
document.getElementById("button1").setAttribute("disabled", "disabled");
|
||||||
testSelector(":disabled", ["button1", "input2", "select2", "optgroup2", "option2", "textarea2", "fieldset2", "clubname", "clubnum"], "':disabled' should also match elements whose disabled attribute has been set");
|
testSelectorIdsMatch(":disabled", ["button1", "input2", "select2", "optgroup2", "option2", "textarea2", "fieldset2", "clubname", "clubnum"], "':disabled' should also match elements whose disabled attribute has been set");
|
||||||
|
|
||||||
document.getElementById("button1").setAttribute("disabled", "disabled");
|
document.getElementById("button1").setAttribute("disabled", "disabled");
|
||||||
testSelector(":disabled", ["button1", "input2", "select2", "optgroup2", "option2", "textarea2", "fieldset2", "clubname", "clubnum"], "':disabled' should also match elements whose disabled attribute has been set twice");
|
testSelectorIdsMatch(":disabled", ["button1", "input2", "select2", "optgroup2", "option2", "textarea2", "fieldset2", "clubname", "clubnum"], "':disabled' should also match elements whose disabled attribute has been set twice");
|
||||||
|
|
||||||
document.getElementById("input2").setAttribute("type", "submit"); // change input type to submit
|
document.getElementById("input2").setAttribute("type", "submit"); // change input type to submit
|
||||||
testSelector(":disabled", ["button1", "input2", "select2", "optgroup2", "option2", "textarea2", "fieldset2", "clubname", "clubnum"], "':disabled' should also match disabled elements whose type has changed");
|
testSelectorIdsMatch(":disabled", ["button1", "input2", "select2", "optgroup2", "option2", "textarea2", "fieldset2", "clubname", "clubnum"], "':disabled' should also match disabled elements whose type has changed");
|
||||||
|
|
||||||
var input = document.createElement("input");
|
var input = document.createElement("input");
|
||||||
input.setAttribute("disabled", "disabled");
|
input.setAttribute("disabled", "disabled");
|
||||||
testSelector(":disabled", ["button1", "input2", "select2", "optgroup2", "option2", "textarea2", "fieldset2", "clubname", "clubnum"], "':disabled' should not match elements not in the document");
|
testSelectorIdsMatch(":disabled", ["button1", "input2", "select2", "optgroup2", "option2", "textarea2", "fieldset2", "clubname", "clubnum"], "':disabled' should not match elements not in the document");
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -38,5 +38,5 @@
|
||||||
<fieldset disabled id=fieldset2></fieldset>
|
<fieldset disabled id=fieldset2></fieldset>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
testSelector(":enabled", ["button1", "input1", "select1", "optgroup1", "option1", "textarea1", "submitbutton", "menuitem1", "fieldset1"], "':enabled' elements that are not disabled");
|
testSelectorIdsMatch(":enabled", ["button1", "input1", "select1", "optgroup1", "option1", "textarea1", "submitbutton", "menuitem1", "fieldset1"], "':enabled' elements that are not disabled");
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -16,24 +16,36 @@
|
||||||
<input type=radio id=radio1 checked>
|
<input type=radio id=radio1 checked>
|
||||||
<div tabindex=0 id=div1>hello</div>
|
<div tabindex=0 id=div1>hello</div>
|
||||||
<div contenteditable id=div2>content</div>
|
<div contenteditable id=div2>content</div>
|
||||||
<iframe src="focus-iframe.html" id=iframe onload="load()"></iframe>
|
<iframe src="focus-iframe.html" id=iframe></iframe>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
document.getElementById("input1").focus(); // set the focus on input1
|
setup({explicit_done: true});
|
||||||
testSelector(":focus", ["input1"], "input1 has the focus");
|
|
||||||
|
|
||||||
document.getElementById("div1").focus();
|
onload = function() {
|
||||||
testSelector(":focus", ["div1"], "tabindex attribute makes the element focusable");
|
if (document.hasFocus() || frames[0].document.hasFocus()) {
|
||||||
|
run_test()
|
||||||
document.getElementById("div2").focus();
|
} else {
|
||||||
testSelector(":focus", ["div2"], "editable elements are focusable");
|
window.onfocus = run_test;
|
||||||
|
}
|
||||||
function load() {
|
|
||||||
document.getElementById("iframe").contentDocument.getElementById("inputiframe").focus();
|
|
||||||
testSelector(":focus", [], "':focus' doesn't match focused elements in iframe");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function run_test() {
|
||||||
|
document.getElementById("input1").focus(); // set the focus on input1
|
||||||
|
testSelectorIdsMatch(":focus", ["input1"], "input1 has the focus");
|
||||||
|
|
||||||
|
document.getElementById("div1").focus();
|
||||||
|
testSelectorIdsMatch(":focus", ["div1"], "tabindex attribute makes the element focusable");
|
||||||
|
|
||||||
|
document.getElementById("div2").focus();
|
||||||
|
testSelectorIdsMatch(":focus", ["div2"], "editable elements are focusable");
|
||||||
|
|
||||||
document.body.focus();
|
document.body.focus();
|
||||||
testSelector(":focus", ["body"], "':focus' matches focussed body with tabindex");
|
testSelectorIdsMatch(":focus", ["body"], "':focus' matches focussed body with tabindex");
|
||||||
|
|
||||||
|
document.getElementById("iframe").contentDocument.getElementById("inputiframe").focus();
|
||||||
|
testSelectorIdsMatch(":focus", [], "':focus' doesn't match focused elements in iframe");
|
||||||
|
|
||||||
|
done();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue