diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 33e5a1e28e2..e82ec5fdbc1 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -3770,44 +3770,44 @@ "url": "/compat/webkit-text-fill-color-property-006.html" }, { - "path": "custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag.html", + "path": "custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag.html", "references": [ [ - "/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag-ref.html", + "/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag-ref.html", "==" ] ], - "url": "/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag.html" + "url": "/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag.html" }, { - "path": "custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag.html", + "path": "custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag.html", "references": [ [ - "/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag-ref.html", + "/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag-ref.html", "==" ] ], - "url": "/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag.html" + "url": "/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag.html" }, { - "path": "custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension.html", + "path": "custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension.html", "references": [ [ - "/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension-ref.html", + "/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension-ref.html", "==" ] ], - "url": "/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension.html" + "url": "/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension.html" }, { - "path": "custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension.html", + "path": "custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension.html", "references": [ [ - "/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension-ref.html", + "/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension-ref.html", "==" ] ], - "url": "/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension.html" + "url": "/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension.html" }, { "path": "html/dom/elements/global-attributes/dir_auto-EN-L.html", @@ -11513,6 +11513,10 @@ "path": "IndexedDB/idbcursor_update_index7.htm", "url": "/IndexedDB/idbcursor_update_index7.htm" }, + { + "path": "IndexedDB/idbcursor_update_index8.htm", + "url": "/IndexedDB/idbcursor_update_index8.htm" + }, { "path": "IndexedDB/idbcursor_update_objectstore.htm", "url": "/IndexedDB/idbcursor_update_objectstore.htm" @@ -11545,6 +11549,10 @@ "path": "IndexedDB/idbcursor_update_objectstore8.htm", "url": "/IndexedDB/idbcursor_update_objectstore8.htm" }, + { + "path": "IndexedDB/idbcursor_update_objectstore9.htm", + "url": "/IndexedDB/idbcursor_update_objectstore9.htm" + }, { "path": "IndexedDB/idbdatabase_close.htm", "url": "/IndexedDB/idbdatabase_close.htm" @@ -12573,6 +12581,10 @@ "path": "XMLHttpRequest/open-url-multi-window-5.htm", "url": "/XMLHttpRequest/open-url-multi-window-5.htm" }, + { + "path": "XMLHttpRequest/open-url-multi-window-6.htm", + "url": "/XMLHttpRequest/open-url-multi-window-6.htm" + }, { "path": "XMLHttpRequest/open-url-multi-window.htm", "url": "/XMLHttpRequest/open-url-multi-window.htm" @@ -13794,224 +13806,224 @@ "url": "/cssom-view/scrollingElement.html" }, { - "path": "custom-elements/pre-v1/concepts/custom-elements-type-naming.html", - "url": "/custom-elements/pre-v1/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" }, { - "path": "custom-elements/pre-v1/creating-and-passing-registries/new-registry-test.html", - "url": "/custom-elements/pre-v1/creating-and-passing-registries/new-registry-test.html" + "path": "custom-elements/v0/creating-and-passing-registries/new-registry-test.html", + "url": "/custom-elements/v0/creating-and-passing-registries/new-registry-test.html" }, { - "path": "custom-elements/pre-v1/creating-and-passing-registries/no-registry-test.html", - "url": "/custom-elements/pre-v1/creating-and-passing-registries/no-registry-test.html" + "path": "custom-elements/v0/creating-and-passing-registries/no-registry-test.html", + "url": "/custom-elements/v0/creating-and-passing-registries/no-registry-test.html" }, { - "path": "custom-elements/pre-v1/creating-and-passing-registries/share-registry-create-document.html", - "url": "/custom-elements/pre-v1/creating-and-passing-registries/share-registry-create-document.html" + "path": "custom-elements/v0/creating-and-passing-registries/share-registry-create-document.html", + "url": "/custom-elements/v0/creating-and-passing-registries/share-registry-create-document.html" }, { - "path": "custom-elements/pre-v1/creating-and-passing-registries/share-registry-import-document.html", - "url": "/custom-elements/pre-v1/creating-and-passing-registries/share-registry-import-document.html" + "path": "custom-elements/v0/creating-and-passing-registries/share-registry-import-document.html", + "url": "/custom-elements/v0/creating-and-passing-registries/share-registry-import-document.html" }, { - "path": "custom-elements/pre-v1/custom-element-lifecycle/enqueuing-and-invoking-callbacks/invoke-callbacks.html", - "url": "/custom-elements/pre-v1/custom-element-lifecycle/enqueuing-and-invoking-callbacks/invoke-callbacks.html" + "path": "custom-elements/v0/custom-element-lifecycle/enqueuing-and-invoking-callbacks/invoke-callbacks.html", + "url": "/custom-elements/v0/custom-element-lifecycle/enqueuing-and-invoking-callbacks/invoke-callbacks.html" }, { - "path": "custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/attached-callback-move-element-test.html", - "url": "/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/attached-callback-move-element-test.html" + "path": "custom-elements/v0/custom-element-lifecycle/types-of-callbacks/attached-callback-move-element-test.html", + "url": "/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/attached-callback-move-element-test.html" }, { - "path": "custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-change-attribute-test.html", - "url": "/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-change-attribute-test.html" + "path": "custom-elements/v0/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-change-attribute-test.html", + "url": "/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-change-attribute-test.html" }, { - "path": "custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-remove-attribute-test.html", - "url": "/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-remove-attribute-test.html" + "path": "custom-elements/v0/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-remove-attribute-test.html", + "url": "/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-remove-attribute-test.html" }, { - "path": "custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-set-attribute-test.html", - "url": "/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-set-attribute-test.html" + "path": "custom-elements/v0/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-set-attribute-test.html", + "url": "/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-set-attribute-test.html" }, { - "path": "custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/created-callback-element-prototype-test.html", - "url": "/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/created-callback-element-prototype-test.html" + "path": "custom-elements/v0/custom-element-lifecycle/types-of-callbacks/created-callback-element-prototype-test.html", + "url": "/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/created-callback-element-prototype-test.html" }, { - "path": "custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/created-callback-invocation-order-test.html", - "url": "/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/created-callback-invocation-order-test.html" + "path": "custom-elements/v0/custom-element-lifecycle/types-of-callbacks/created-callback-invocation-order-test.html", + "url": "/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/created-callback-invocation-order-test.html" }, { - "path": "custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/created-callback-invocation-test.html", - "url": "/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/created-callback-invocation-test.html" + "path": "custom-elements/v0/custom-element-lifecycle/types-of-callbacks/created-callback-invocation-test.html", + "url": "/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/created-callback-invocation-test.html" }, { - "path": "custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/detached-callback-move-element-test.html", - "url": "/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/detached-callback-move-element-test.html" + "path": "custom-elements/v0/custom-element-lifecycle/types-of-callbacks/detached-callback-move-element-test.html", + "url": "/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/detached-callback-move-element-test.html" }, { - "path": "custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/detached-callback-no-browsing-context-test.html", - "url": "/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/detached-callback-no-browsing-context-test.html" + "path": "custom-elements/v0/custom-element-lifecycle/types-of-callbacks/detached-callback-no-browsing-context-test.html", + "url": "/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/detached-callback-no-browsing-context-test.html" }, { - "path": "custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/detached-callback-with-browsing-context-test.html", - "url": "/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/detached-callback-with-browsing-context-test.html" + "path": "custom-elements/v0/custom-element-lifecycle/types-of-callbacks/detached-callback-with-browsing-context-test.html", + "url": "/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/detached-callback-with-browsing-context-test.html" }, { - "path": "custom-elements/pre-v1/instantiating-custom-elements/changing-is-attribute.html", - "url": "/custom-elements/pre-v1/instantiating-custom-elements/changing-is-attribute.html" + "path": "custom-elements/v0/instantiating/changing-is-attribute.html", + "url": "/custom-elements/v0/instantiating/changing-is-attribute.html" }, { - "path": "custom-elements/pre-v1/instantiating-custom-elements/custom-element-constructor-is-attribute.html", - "url": "/custom-elements/pre-v1/instantiating-custom-elements/custom-element-constructor-is-attribute.html" + "path": "custom-elements/v0/instantiating/custom-element-constructor-is-attribute.html", + "url": "/custom-elements/v0/instantiating/custom-element-constructor-is-attribute.html" }, { - "path": "custom-elements/pre-v1/instantiating-custom-elements/custom-element-constructor-local-name.html", - "url": "/custom-elements/pre-v1/instantiating-custom-elements/custom-element-constructor-local-name.html" + "path": "custom-elements/v0/instantiating/custom-element-constructor-local-name.html", + "url": "/custom-elements/v0/instantiating/custom-element-constructor-local-name.html" }, { - "path": "custom-elements/pre-v1/instantiating-custom-elements/custom-element-constructor-namespace.html", - "url": "/custom-elements/pre-v1/instantiating-custom-elements/custom-element-constructor-namespace.html" + "path": "custom-elements/v0/instantiating/custom-element-constructor-namespace.html", + "url": "/custom-elements/v0/instantiating/custom-element-constructor-namespace.html" }, { - "path": "custom-elements/pre-v1/instantiating-custom-elements/custom-element-constructor-node-document.html", - "url": "/custom-elements/pre-v1/instantiating-custom-elements/custom-element-constructor-node-document.html" + "path": "custom-elements/v0/instantiating/custom-element-constructor-node-document.html", + "url": "/custom-elements/v0/instantiating/custom-element-constructor-node-document.html" }, { - "path": "custom-elements/pre-v1/instantiating-custom-elements/custom-element-constructor-prototype.html", - "url": "/custom-elements/pre-v1/instantiating-custom-elements/custom-element-constructor-prototype.html" + "path": "custom-elements/v0/instantiating/custom-element-constructor-prototype.html", + "url": "/custom-elements/v0/instantiating/custom-element-constructor-prototype.html" }, { - "path": "custom-elements/pre-v1/instantiating-custom-elements/custom-element-prototype.html", - "url": "/custom-elements/pre-v1/instantiating-custom-elements/custom-element-prototype.html" + "path": "custom-elements/v0/instantiating/custom-element-prototype.html", + "url": "/custom-elements/v0/instantiating/custom-element-prototype.html" }, { - "path": "custom-elements/pre-v1/instantiating-custom-elements/custom-element-type-is-attribute.html", - "url": "/custom-elements/pre-v1/instantiating-custom-elements/custom-element-type-is-attribute.html" + "path": "custom-elements/v0/instantiating/custom-element-type-is-attribute.html", + "url": "/custom-elements/v0/instantiating/custom-element-type-is-attribute.html" }, { - "path": "custom-elements/pre-v1/instantiating-custom-elements/custom-element-type-local-name-and-is-attribute.html", - "url": "/custom-elements/pre-v1/instantiating-custom-elements/custom-element-type-local-name-and-is-attribute.html" + "path": "custom-elements/v0/instantiating/custom-element-type-local-name-and-is-attribute.html", + "url": "/custom-elements/v0/instantiating/custom-element-type-local-name-and-is-attribute.html" }, { - "path": "custom-elements/pre-v1/instantiating-custom-elements/custom-element-type-local-name.html", - "url": "/custom-elements/pre-v1/instantiating-custom-elements/custom-element-type-local-name.html" + "path": "custom-elements/v0/instantiating/custom-element-type-local-name.html", + "url": "/custom-elements/v0/instantiating/custom-element-type-local-name.html" }, { - "path": "custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-interface-type-is-a-local-name.html", - "url": "/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-interface-type-is-a-local-name.html" + "path": "custom-elements/v0/instantiating/extensions-to-document-interface/create-element-interface-type-is-a-local-name.html", + "url": "/custom-elements/v0/instantiating/extensions-to-document-interface/create-element-interface-type-is-a-local-name.html" }, { - "path": "custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-interface-type-is-a-type-extension.html", - "url": "/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-interface-type-is-a-type-extension.html" + "path": "custom-elements/v0/instantiating/extensions-to-document-interface/create-element-interface-type-is-a-type-extension.html", + "url": "/custom-elements/v0/instantiating/extensions-to-document-interface/create-element-interface-type-is-a-type-extension.html" }, { - "path": "custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-is-attribute.html", - "url": "/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-is-attribute.html" + "path": "custom-elements/v0/instantiating/extensions-to-document-interface/create-element-is-attribute.html", + "url": "/custom-elements/v0/instantiating/extensions-to-document-interface/create-element-is-attribute.html" }, { - "path": "custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-namespace.html", - "url": "/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-namespace.html" + "path": "custom-elements/v0/instantiating/extensions-to-document-interface/create-element-namespace.html", + "url": "/custom-elements/v0/instantiating/extensions-to-document-interface/create-element-namespace.html" }, { - "path": "custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-type-extension-is-a-type.html", - "url": "/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-type-extension-is-a-type.html" + "path": "custom-elements/v0/instantiating/extensions-to-document-interface/create-element-type-extension-is-a-type.html", + "url": "/custom-elements/v0/instantiating/extensions-to-document-interface/create-element-type-extension-is-a-type.html" }, { - "path": "custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-type-extension-unresolved.html", - "url": "/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-type-extension-unresolved.html" + "path": "custom-elements/v0/instantiating/extensions-to-document-interface/create-element-type-extension-unresolved.html", + "url": "/custom-elements/v0/instantiating/extensions-to-document-interface/create-element-type-extension-unresolved.html" }, { - "path": "custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-type-is-a-local-name.html", - "url": "/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-type-is-a-local-name.html" + "path": "custom-elements/v0/instantiating/extensions-to-document-interface/create-element-type-is-a-local-name.html", + "url": "/custom-elements/v0/instantiating/extensions-to-document-interface/create-element-type-is-a-local-name.html" }, { - "path": "custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/created-callback-create-element-ns.html", - "url": "/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/created-callback-create-element-ns.html" + "path": "custom-elements/v0/instantiating/extensions-to-document-interface/created-callback-create-element-ns.html", + "url": "/custom-elements/v0/instantiating/extensions-to-document-interface/created-callback-create-element-ns.html" }, { - "path": "custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/created-callback-create-element.html", - "url": "/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/created-callback-create-element.html" + "path": "custom-elements/v0/instantiating/extensions-to-document-interface/created-callback-create-element.html", + "url": "/custom-elements/v0/instantiating/extensions-to-document-interface/created-callback-create-element.html" }, { - "path": "custom-elements/pre-v1/instantiating-custom-elements/non-configurable-constructor-property.html", - "url": "/custom-elements/pre-v1/instantiating-custom-elements/non-configurable-constructor-property.html" + "path": "custom-elements/v0/instantiating/non-configurable-constructor-property.html", + "url": "/custom-elements/v0/instantiating/non-configurable-constructor-property.html" }, { - "path": "custom-elements/pre-v1/instantiating-custom-elements/prototype-is-interface-prototype-object.html", - "url": "/custom-elements/pre-v1/instantiating-custom-elements/prototype-is-interface-prototype-object.html" + "path": "custom-elements/v0/instantiating/prototype-is-interface-prototype-object.html", + "url": "/custom-elements/v0/instantiating/prototype-is-interface-prototype-object.html" }, { - "path": "custom-elements/pre-v1/instantiating-custom-elements/unchanged-attribute.html", - "url": "/custom-elements/pre-v1/instantiating-custom-elements/unchanged-attribute.html" + "path": "custom-elements/v0/instantiating/unchanged-attribute.html", + "url": "/custom-elements/v0/instantiating/unchanged-attribute.html" }, { - "path": "custom-elements/pre-v1/registering/definition-construction-algorithm-default-namespace.html", - "url": "/custom-elements/pre-v1/registering/definition-construction-algorithm-default-namespace.html" + "path": "custom-elements/v0/registering/definition-construction-algorithm-default-namespace.html", + "url": "/custom-elements/v0/registering/definition-construction-algorithm-default-namespace.html" }, { - "path": "custom-elements/pre-v1/registering/definition-construction-algorithm-duplicate-definition.html", - "url": "/custom-elements/pre-v1/registering/definition-construction-algorithm-duplicate-definition.html" + "path": "custom-elements/v0/registering/definition-construction-algorithm-duplicate-definition.html", + "url": "/custom-elements/v0/registering/definition-construction-algorithm-duplicate-definition.html" }, { - "path": "custom-elements/pre-v1/registering/definition-construction-algorithm-invalid-type.html", - "url": "/custom-elements/pre-v1/registering/definition-construction-algorithm-invalid-type.html" + "path": "custom-elements/v0/registering/definition-construction-algorithm-invalid-type.html", + "url": "/custom-elements/v0/registering/definition-construction-algorithm-invalid-type.html" }, { - "path": "custom-elements/pre-v1/registering/definition-construction-algorithm-local-name-lowercased.html", - "url": "/custom-elements/pre-v1/registering/definition-construction-algorithm-local-name-lowercased.html" + "path": "custom-elements/v0/registering/definition-construction-algorithm-local-name-lowercased.html", + "url": "/custom-elements/v0/registering/definition-construction-algorithm-local-name-lowercased.html" }, { - "path": "custom-elements/pre-v1/registering/definition-construction-algorithm-name-is-null.html", - "url": "/custom-elements/pre-v1/registering/definition-construction-algorithm-name-is-null.html" + "path": "custom-elements/v0/registering/definition-construction-algorithm-name-is-null.html", + "url": "/custom-elements/v0/registering/definition-construction-algorithm-name-is-null.html" }, { - "path": "custom-elements/pre-v1/registering/definition-construction-algorithm-no-interface-for-name.html", - "url": "/custom-elements/pre-v1/registering/definition-construction-algorithm-no-interface-for-name.html" + "path": "custom-elements/v0/registering/definition-construction-algorithm-no-interface-for-name.html", + "url": "/custom-elements/v0/registering/definition-construction-algorithm-no-interface-for-name.html" }, { - "path": "custom-elements/pre-v1/registering/definition-construction-algorithm-svg-namespace-name-is-null.html", - "url": "/custom-elements/pre-v1/registering/definition-construction-algorithm-svg-namespace-name-is-null.html" + "path": "custom-elements/v0/registering/definition-construction-algorithm-svg-namespace-name-is-null.html", + "url": "/custom-elements/v0/registering/definition-construction-algorithm-svg-namespace-name-is-null.html" }, { - "path": "custom-elements/pre-v1/registering/definition-construction-algorithm-svg-namespace.html", - "url": "/custom-elements/pre-v1/registering/definition-construction-algorithm-svg-namespace.html" + "path": "custom-elements/v0/registering/definition-construction-algorithm-svg-namespace.html", + "url": "/custom-elements/v0/registering/definition-construction-algorithm-svg-namespace.html" }, { - "path": "custom-elements/pre-v1/registering/definition-construction-algorithm-type-name-lowercased.html", - "url": "/custom-elements/pre-v1/registering/definition-construction-algorithm-type-name-lowercased.html" + "path": "custom-elements/v0/registering/definition-construction-algorithm-type-name-lowercased.html", + "url": "/custom-elements/v0/registering/definition-construction-algorithm-type-name-lowercased.html" }, { - "path": "custom-elements/pre-v1/registering/element-registration-algorithm-no-registry.html", - "url": "/custom-elements/pre-v1/registering/element-registration-algorithm-no-registry.html" + "path": "custom-elements/v0/registering/element-registration-algorithm-no-registry.html", + "url": "/custom-elements/v0/registering/element-registration-algorithm-no-registry.html" }, { - "path": "custom-elements/pre-v1/registering/extensions-to-document-interface/custom-element-name.html", - "url": "/custom-elements/pre-v1/registering/extensions-to-document-interface/custom-element-name.html" + "path": "custom-elements/v0/registering/extensions-to-document-interface/custom-element-name.html", + "url": "/custom-elements/v0/registering/extensions-to-document-interface/custom-element-name.html" }, { - "path": "custom-elements/pre-v1/registering/extensions-to-document-interface/custom-element-prototype.html", - "url": "/custom-elements/pre-v1/registering/extensions-to-document-interface/custom-element-prototype.html" + "path": "custom-elements/v0/registering/extensions-to-document-interface/custom-element-prototype.html", + "url": "/custom-elements/v0/registering/extensions-to-document-interface/custom-element-prototype.html" }, { - "path": "custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-matching-query-selector-all.html", - "url": "/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-matching-query-selector-all.html" + "path": "custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-matching-query-selector-all.html", + "url": "/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-matching-query-selector-all.html" }, { - "path": "custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-matching-query-selector.html", - "url": "/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-matching-query-selector.html" + "path": "custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-matching-query-selector.html", + "url": "/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-matching-query-selector.html" }, { - "path": "custom-elements/pre-v1/registering/unresolved-elements-interface-html-element.html", - "url": "/custom-elements/pre-v1/registering/unresolved-elements-interface-html-element.html" + "path": "custom-elements/v0/registering/unresolved-elements-interface-html-element.html", + "url": "/custom-elements/v0/registering/unresolved-elements-interface-html-element.html" }, { - "path": "custom-elements/pre-v1/registering/unresolved-elements-interface-html-unknown-element.html", - "url": "/custom-elements/pre-v1/registering/unresolved-elements-interface-html-unknown-element.html" + "path": "custom-elements/v0/registering/unresolved-elements-interface-html-unknown-element.html", + "url": "/custom-elements/v0/registering/unresolved-elements-interface-html-unknown-element.html" }, { - "path": "custom-elements/pre-v1/registering/unresolved-elements-interface-svg-element.html", - "url": "/custom-elements/pre-v1/registering/unresolved-elements-interface-svg-element.html" + "path": "custom-elements/v0/registering/unresolved-elements-interface-svg-element.html", + "url": "/custom-elements/v0/registering/unresolved-elements-interface-svg-element.html" }, { "path": "dom/collections/HTMLCollection-as-proto-length-get-throws.html", @@ -14937,10 +14949,58 @@ "path": "domparsing/XMLSerializer-serializeToString.html", "url": "/domparsing/XMLSerializer-serializeToString.html" }, + { + "path": "domparsing/createContextualFragment.html", + "url": "/domparsing/createContextualFragment.html" + }, + { + "path": "domparsing/innerhtml-01.xhtml", + "url": "/domparsing/innerhtml-01.xhtml" + }, + { + "path": "domparsing/innerhtml-03.xhtml", + "url": "/domparsing/innerhtml-03.xhtml" + }, + { + "path": "domparsing/innerhtml-04.html", + "url": "/domparsing/innerhtml-04.html" + }, + { + "path": "domparsing/innerhtml-05.xhtml", + "url": "/domparsing/innerhtml-05.xhtml" + }, + { + "path": "domparsing/innerhtml-06.html", + "url": "/domparsing/innerhtml-06.html" + }, + { + "path": "domparsing/innerhtml-07.html", + "url": "/domparsing/innerhtml-07.html" + }, { "path": "domparsing/insert-adjacent.html", "url": "/domparsing/insert-adjacent.html" }, + { + "path": "domparsing/insert_adjacent_html.html", + "url": "/domparsing/insert_adjacent_html.html" + }, + { + "path": "domparsing/insert_adjacent_html.xhtml", + "url": "/domparsing/insert_adjacent_html.xhtml" + }, + { + "path": "domparsing/outerhtml-01.html", + "url": "/domparsing/outerhtml-01.html" + }, + { + "path": "domparsing/outerhtml-02.html", + "url": "/domparsing/outerhtml-02.html" + }, + { + "path": "domparsing/xml-serialization.xhtml", + "url": "/domparsing/xml-serialization.xhtml" + }, { "path": "domxpath/001.html", "url": "/domxpath/001.html" @@ -16341,6 +16401,10 @@ "path": "html/browsers/history/the-history-interface/traverse_the_history_write_onload_2.html", "url": "/html/browsers/history/the-history-interface/traverse_the_history_write_onload_2.html" }, + { + "path": "html/browsers/history/the-location-interface/allow_prototype_cycle_through_location.sub.html", + "url": "/html/browsers/history/the-location-interface/allow_prototype_cycle_through_location.sub.html" + }, { "path": "html/browsers/history/the-location-interface/assign_after_load.html", "url": "/html/browsers/history/the-location-interface/assign_after_load.html" @@ -17501,10 +17565,18 @@ "path": "html/semantics/document-metadata/styling/LinkStyle.html", "url": "/html/semantics/document-metadata/styling/LinkStyle.html" }, + { + "path": "html/semantics/document-metadata/the-base-element/base_about_blank.html", + "url": "/html/semantics/document-metadata/the-base-element/base_about_blank.html" + }, { "path": "html/semantics/document-metadata/the-base-element/base_href_empty.html", "url": "/html/semantics/document-metadata/the-base-element/base_href_empty.html" }, + { + "path": "html/semantics/document-metadata/the-base-element/base_href_invalid.html", + "url": "/html/semantics/document-metadata/the-base-element/base_href_invalid.html" + }, { "path": "html/semantics/document-metadata/the-base-element/base_href_specified.sub.html", "url": "/html/semantics/document-metadata/the-base-element/base_href_specified.sub.html" @@ -17517,6 +17589,10 @@ "path": "html/semantics/document-metadata/the-base-element/base_multiple.html", "url": "/html/semantics/document-metadata/the-base-element/base_multiple.html" }, + { + "path": "html/semantics/document-metadata/the-base-element/base_srcdoc.html", + "url": "/html/semantics/document-metadata/the-base-element/base_srcdoc.html" + }, { "path": "html/semantics/document-metadata/the-link-element/link-load-event.html", "url": "/html/semantics/document-metadata/the-link-element/link-load-event.html" @@ -18777,6 +18853,10 @@ "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" }, + { + "path": "html/semantics/embedded-content/the-iframe-element/iframe-load-event.html", + "url": "/html/semantics/embedded-content/the-iframe-element/iframe-load-event.html" + }, { "path": "html/semantics/embedded-content/the-iframe-element/iframe_javascript_url_01.htm", "url": "/html/semantics/embedded-content/the-iframe-element/iframe_javascript_url_01.htm" @@ -19865,6 +19945,10 @@ "path": "html/syntax/serializing-html-fragments/outerHTML.html", "url": "/html/syntax/serializing-html-fragments/outerHTML.html" }, + { + "path": "html/syntax/serializing-html-fragments/serializing.html", + "url": "/html/syntax/serializing-html-fragments/serializing.html" + }, { "path": "html/syntax/serializing-xml-fragments/outerHTML.html", "url": "/html/syntax/serializing-xml-fragments/outerHTML.html" @@ -27881,6 +27965,14 @@ "path": "screen-orientation/orientation-reading.html", "url": "/screen-orientation/orientation-reading.html" }, + { + "path": "secure-contexts/basic-popup-and-iframe-tests.html", + "url": "/secure-contexts/basic-popup-and-iframe-tests.html" + }, + { + "path": "secure-contexts/basic-popup-and-iframe-tests.https.html", + "url": "/secure-contexts/basic-popup-and-iframe-tests.https.html" + }, { "path": "selection/Document-open.html", "url": "/selection/Document-open.html" @@ -28121,6 +28213,10 @@ "path": "service-workers/service-worker/multiple-update.https.html", "url": "/service-workers/service-worker/multiple-update.https.html" }, + { + "path": "service-workers/service-worker/navigate-window.https.html", + "url": "/service-workers/service-worker/navigate-window.https.html" + }, { "path": "service-workers/service-worker/navigation-redirect.https.html", "url": "/service-workers/service-worker/navigation-redirect.https.html" @@ -28277,6 +28373,10 @@ "path": "service-workers/service-worker/update-after-oneday.https.html", "url": "/service-workers/service-worker/update-after-oneday.https.html" }, + { + "path": "service-workers/service-worker/update-recovery.https.html", + "url": "/service-workers/service-worker/update-recovery.https.html" + }, { "path": "service-workers/service-worker/update.https.html", "url": "/service-workers/service-worker/update.https.html" @@ -29005,6 +29105,14 @@ "path": "web-animations/animation/reverse.html", "url": "/web-animations/animation/reverse.html" }, + { + "path": "web-animations/animation/startTime.html", + "url": "/web-animations/animation/startTime.html" + }, + { + "path": "web-animations/document/getAnimations.html", + "url": "/web-animations/document/getAnimations.html" + }, { "path": "web-animations/keyframe-effect/constructor.html", "url": "/web-animations/keyframe-effect/constructor.html" @@ -29013,14 +29121,6 @@ "path": "web-animations/keyframe-effect/effect-easing.html", "url": "/web-animations/keyframe-effect/effect-easing.html" }, - { - "path": "web-animations/keyframe-effect/getComputedTiming-currentIteration.html", - "url": "/web-animations/keyframe-effect/getComputedTiming-currentIteration.html" - }, - { - "path": "web-animations/keyframe-effect/getComputedTiming-progress.html", - "url": "/web-animations/keyframe-effect/getComputedTiming-progress.html" - }, { "path": "web-animations/keyframe-effect/getComputedTiming.html", "url": "/web-animations/keyframe-effect/getComputedTiming.html" @@ -29029,6 +29129,30 @@ "path": "web-animations/keyframe-effect/keyframe-handling.html", "url": "/web-animations/keyframe-effect/keyframe-handling.html" }, + { + "path": "web-animations/keyframe-effect/setFrames.html", + "url": "/web-animations/keyframe-effect/setFrames.html" + }, + { + "path": "web-animations/keyframe-effect/setTarget.html", + "url": "/web-animations/keyframe-effect/setTarget.html" + }, + { + "path": "web-animations/timing-model/animation-effects/active-time.html", + "url": "/web-animations/timing-model/animation-effects/active-time.html" + }, + { + "path": "web-animations/timing-model/animation-effects/current-iteration.html", + "url": "/web-animations/timing-model/animation-effects/current-iteration.html" + }, + { + "path": "web-animations/timing-model/animation-effects/simple-iteration-progress.html", + "url": "/web-animations/timing-model/animation-effects/simple-iteration-progress.html" + }, + { + "path": "web-animations/timing-model/animations/set-the-animation-start-time.html", + "url": "/web-animations/timing-model/animations/set-the-animation-start-time.html" + }, { "path": "webaudio/the-audio-api/the-audiobuffer-interface/idl-test.html", "url": "/webaudio/the-audio-api/the-audiobuffer-interface/idl-test.html" @@ -34362,19 +34486,19 @@ "url": "/cors/status-async.htm" }, { - "path": "custom-elements/pre-v1/concepts/custom-elements-type-allowed-chars-first-char.html", + "path": "custom-elements/v0/concepts/custom-elements-type-allowed-chars-first-char.html", "timeout": "long", - "url": "/custom-elements/pre-v1/concepts/custom-elements-type-allowed-chars-first-char.html" + "url": "/custom-elements/v0/concepts/custom-elements-type-allowed-chars-first-char.html" }, { - "path": "custom-elements/pre-v1/concepts/custom-elements-type-allowed-chars.html", + "path": "custom-elements/v0/concepts/custom-elements-type-allowed-chars.html", "timeout": "long", - "url": "/custom-elements/pre-v1/concepts/custom-elements-type-allowed-chars.html" + "url": "/custom-elements/v0/concepts/custom-elements-type-allowed-chars.html" }, { - "path": "custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/attached-callback-test.html", + "path": "custom-elements/v0/custom-element-lifecycle/types-of-callbacks/attached-callback-test.html", "timeout": "long", - "url": "/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/attached-callback-test.html" + "url": "/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/attached-callback-test.html" }, { "path": "dom/nodes/Document-characterSet-normalization.html", @@ -36368,52 +36492,52 @@ "url": "/compat/webkit-text-fill-color-property-006.html" } ], - "custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag.html": [ + "custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag.html": [ { - "path": "custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag.html", + "path": "custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag.html", "references": [ [ - "/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag-ref.html", + "/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag-ref.html", "==" ] ], - "url": "/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag.html" + "url": "/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag.html" } ], - "custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag.html": [ + "custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag.html": [ { - "path": "custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag.html", + "path": "custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag.html", "references": [ [ - "/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag-ref.html", + "/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag-ref.html", "==" ] ], - "url": "/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag.html" + "url": "/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag.html" } ], - "custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension.html": [ + "custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension.html": [ { - "path": "custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension.html", + "path": "custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension.html", "references": [ [ - "/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension-ref.html", + "/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension-ref.html", "==" ] ], - "url": "/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension.html" + "url": "/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension.html" } ], - "custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension.html": [ + "custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension.html": [ { - "path": "custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension.html", + "path": "custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension.html", "references": [ [ - "/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension-ref.html", + "/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension-ref.html", "==" ] ], - "url": "/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension.html" + "url": "/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension.html" } ], "html/dom/elements/global-attributes/dir_auto-EN-L-ref.html": [ @@ -42141,7 +42265,7 @@ } ] }, - "rev": "fab2c513bffb2bd19600d23b495264d123df092f", + "rev": "697b971060b2d475a73c1c3755232a4674d61cf5", "url_base": "/", "version": 3 } diff --git a/tests/wpt/metadata/XMLHttpRequest/open-url-multi-window-6.htm.ini b/tests/wpt/metadata/XMLHttpRequest/open-url-multi-window-6.htm.ini new file mode 100644 index 00000000000..2f530615db1 --- /dev/null +++ b/tests/wpt/metadata/XMLHttpRequest/open-url-multi-window-6.htm.ini @@ -0,0 +1,6 @@ +[open-url-multi-window-6.htm] + type: testharness + expected: TIMEOUT + [XMLHttpRequest: open() in document that is not fully active (but may be active) should throw] + expected: NOTRUN + diff --git a/tests/wpt/metadata/domparsing/createContextualFragment.html.ini b/tests/wpt/metadata/domparsing/createContextualFragment.html.ini new file mode 100644 index 00000000000..3425974106c --- /dev/null +++ b/tests/wpt/metadata/domparsing/createContextualFragment.html.ini @@ -0,0 +1,35 @@ +[createContextualFragment.html] + type: testharness + [Must not throw INVALID_STATE_ERR for a detached node.] + expected: FAIL + + [Simple test with paragraphs] + expected: FAIL + + [Don't auto-create when applied to ] + expected: FAIL + + [ + + +
+ + diff --git a/tests/wpt/web-platform-tests/IndexedDB/idbcursor_update_objectstore9.htm b/tests/wpt/web-platform-tests/IndexedDB/idbcursor_update_objectstore9.htm new file mode 100644 index 00000000000..34aa78e6be8 --- /dev/null +++ b/tests/wpt/web-platform-tests/IndexedDB/idbcursor_update_objectstore9.htm @@ -0,0 +1,45 @@ + + +IDBCursor.update() - object store - throw InvalidStateError when the cursor is being iterated + + + + + +
+ + diff --git a/tests/wpt/web-platform-tests/IndexedDB/interfaces.idl b/tests/wpt/web-platform-tests/IndexedDB/interfaces.idl index 055e62f46b3..6eee5f47a35 100644 --- a/tests/wpt/web-platform-tests/IndexedDB/interfaces.idl +++ b/tests/wpt/web-platform-tests/IndexedDB/interfaces.idl @@ -88,7 +88,7 @@ interface IDBDatabase : EventTarget { }; interface IDBObjectStore { - readonly attribute DOMString name; + attribute DOMString name; readonly attribute any keyPath; readonly attribute DOMStringList indexNames; readonly attribute IDBTransaction transaction; @@ -106,7 +106,7 @@ interface IDBObjectStore { }; interface IDBIndex { - readonly attribute DOMString name; + attribute DOMString name; readonly attribute IDBObjectStore objectStore; readonly attribute any keyPath; readonly attribute boolean multiEntry; diff --git a/tests/wpt/web-platform-tests/XMLHttpRequest/open-url-multi-window-6.htm b/tests/wpt/web-platform-tests/XMLHttpRequest/open-url-multi-window-6.htm new file mode 100644 index 00000000000..b6f15828afe --- /dev/null +++ b/tests/wpt/web-platform-tests/XMLHttpRequest/open-url-multi-window-6.htm @@ -0,0 +1,41 @@ + + + + XMLHttpRequest: open() in document that is not fully active (but may be active) should throw + + + + + +
+ + + diff --git a/tests/wpt/web-platform-tests/XMLHttpRequest/resources/init.htm b/tests/wpt/web-platform-tests/XMLHttpRequest/resources/init.htm index 7c56d88800d..6f936c4fb28 100644 --- a/tests/wpt/web-platform-tests/XMLHttpRequest/resources/init.htm +++ b/tests/wpt/web-platform-tests/XMLHttpRequest/resources/init.htm @@ -4,6 +4,17 @@ support init file - + diff --git a/tests/wpt/web-platform-tests/compat/webkit-text-fill-color-property-005-ref.html b/tests/wpt/web-platform-tests/compat/webkit-text-fill-color-property-005-ref.html index f173137fabf..1391e38c1e1 100644 --- a/tests/wpt/web-platform-tests/compat/webkit-text-fill-color-property-005-ref.html +++ b/tests/wpt/web-platform-tests/compat/webkit-text-fill-color-property-005-ref.html @@ -5,9 +5,11 @@

Pass if text underline is green!!!

+

                        

diff --git a/tests/wpt/web-platform-tests/compat/webkit-text-fill-color-property-005.html b/tests/wpt/web-platform-tests/compat/webkit-text-fill-color-property-005.html index b3549d68b17..88ac17a8152 100644 --- a/tests/wpt/web-platform-tests/compat/webkit-text-fill-color-property-005.html +++ b/tests/wpt/web-platform-tests/compat/webkit-text-fill-color-property-005.html @@ -1,6 +1,6 @@ -webkit-text-fill-color should take effect while rendering text-decoration underline +webkit-text-fill-color should not take effect while rendering text-decoration underline @@ -8,10 +8,12 @@

Pass if text underline is green!!!

+

                        

diff --git a/tests/wpt/web-platform-tests/cors/credentials-flag.htm b/tests/wpt/web-platform-tests/cors/credentials-flag.htm index 42b37953ca4..bacd43c4ed5 100644 --- a/tests/wpt/web-platform-tests/cors/credentials-flag.htm +++ b/tests/wpt/web-platform-tests/cors/credentials-flag.htm @@ -17,6 +17,13 @@ var url = CROSSDOMAIN + 'resources/cors-cookie.py?ident=' * widthCredentials */ // XXX Do some https tests here as well + +test(function () { + var client = new XMLHttpRequest() + client.open('GET', CROSSDOMAIN, false) + client.withCredentials = true; +}, 'Setting withCredentials on a sync XHR object should not throw') + async_test(function () { var id = new Date().getTime() + '_1', client = new XMLHttpRequest() diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/concepts/custom-elements-type-allowed-chars-first-char.html b/tests/wpt/web-platform-tests/custom-elements/v0/concepts/custom-elements-type-allowed-chars-first-char.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/concepts/custom-elements-type-allowed-chars-first-char.html rename to tests/wpt/web-platform-tests/custom-elements/v0/concepts/custom-elements-type-allowed-chars-first-char.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/concepts/custom-elements-type-allowed-chars.html b/tests/wpt/web-platform-tests/custom-elements/v0/concepts/custom-elements-type-allowed-chars.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/concepts/custom-elements-type-allowed-chars.html rename to tests/wpt/web-platform-tests/custom-elements/v0/concepts/custom-elements-type-allowed-chars.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/concepts/custom-elements-type-naming.html b/tests/wpt/web-platform-tests/custom-elements/v0/concepts/custom-elements-type-naming.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/concepts/custom-elements-type-naming.html rename to tests/wpt/web-platform-tests/custom-elements/v0/concepts/custom-elements-type-naming.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/creating-and-passing-registries/new-registry-test.html b/tests/wpt/web-platform-tests/custom-elements/v0/creating-and-passing-registries/new-registry-test.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/creating-and-passing-registries/new-registry-test.html rename to tests/wpt/web-platform-tests/custom-elements/v0/creating-and-passing-registries/new-registry-test.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/creating-and-passing-registries/no-registry-test.html b/tests/wpt/web-platform-tests/custom-elements/v0/creating-and-passing-registries/no-registry-test.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/creating-and-passing-registries/no-registry-test.html rename to tests/wpt/web-platform-tests/custom-elements/v0/creating-and-passing-registries/no-registry-test.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/creating-and-passing-registries/share-registry-create-document.html b/tests/wpt/web-platform-tests/custom-elements/v0/creating-and-passing-registries/share-registry-create-document.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/creating-and-passing-registries/share-registry-create-document.html rename to tests/wpt/web-platform-tests/custom-elements/v0/creating-and-passing-registries/share-registry-create-document.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/creating-and-passing-registries/share-registry-import-document.html b/tests/wpt/web-platform-tests/custom-elements/v0/creating-and-passing-registries/share-registry-import-document.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/creating-and-passing-registries/share-registry-import-document.html rename to tests/wpt/web-platform-tests/custom-elements/v0/creating-and-passing-registries/share-registry-import-document.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/custom-element-lifecycle/enqueuing-and-invoking-callbacks/invoke-callbacks.html b/tests/wpt/web-platform-tests/custom-elements/v0/custom-element-lifecycle/enqueuing-and-invoking-callbacks/invoke-callbacks.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/custom-element-lifecycle/enqueuing-and-invoking-callbacks/invoke-callbacks.html rename to tests/wpt/web-platform-tests/custom-elements/v0/custom-element-lifecycle/enqueuing-and-invoking-callbacks/invoke-callbacks.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/attached-callback-move-element-test.html b/tests/wpt/web-platform-tests/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/attached-callback-move-element-test.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/attached-callback-move-element-test.html rename to tests/wpt/web-platform-tests/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/attached-callback-move-element-test.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/attached-callback-test.html b/tests/wpt/web-platform-tests/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/attached-callback-test.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/attached-callback-test.html rename to tests/wpt/web-platform-tests/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/attached-callback-test.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-change-attribute-test.html b/tests/wpt/web-platform-tests/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-change-attribute-test.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-change-attribute-test.html rename to tests/wpt/web-platform-tests/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-change-attribute-test.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-remove-attribute-test.html b/tests/wpt/web-platform-tests/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-remove-attribute-test.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-remove-attribute-test.html rename to tests/wpt/web-platform-tests/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-remove-attribute-test.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-set-attribute-test.html b/tests/wpt/web-platform-tests/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-set-attribute-test.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-set-attribute-test.html rename to tests/wpt/web-platform-tests/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/attribute-changed-callback-set-attribute-test.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/created-callback-element-prototype-test.html b/tests/wpt/web-platform-tests/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/created-callback-element-prototype-test.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/created-callback-element-prototype-test.html rename to tests/wpt/web-platform-tests/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/created-callback-element-prototype-test.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/created-callback-invocation-order-test.html b/tests/wpt/web-platform-tests/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/created-callback-invocation-order-test.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/created-callback-invocation-order-test.html rename to tests/wpt/web-platform-tests/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/created-callback-invocation-order-test.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/created-callback-invocation-test.html b/tests/wpt/web-platform-tests/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/created-callback-invocation-test.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/created-callback-invocation-test.html rename to tests/wpt/web-platform-tests/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/created-callback-invocation-test.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/detached-callback-move-element-test.html b/tests/wpt/web-platform-tests/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/detached-callback-move-element-test.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/detached-callback-move-element-test.html rename to tests/wpt/web-platform-tests/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/detached-callback-move-element-test.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/detached-callback-no-browsing-context-test.html b/tests/wpt/web-platform-tests/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/detached-callback-no-browsing-context-test.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/detached-callback-no-browsing-context-test.html rename to tests/wpt/web-platform-tests/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/detached-callback-no-browsing-context-test.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/detached-callback-with-browsing-context-test.html b/tests/wpt/web-platform-tests/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/detached-callback-with-browsing-context-test.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/custom-element-lifecycle/types-of-callbacks/detached-callback-with-browsing-context-test.html rename to tests/wpt/web-platform-tests/custom-elements/v0/custom-element-lifecycle/types-of-callbacks/detached-callback-with-browsing-context-test.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/changing-is-attribute.html b/tests/wpt/web-platform-tests/custom-elements/v0/instantiating/changing-is-attribute.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/changing-is-attribute.html rename to tests/wpt/web-platform-tests/custom-elements/v0/instantiating/changing-is-attribute.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/custom-element-constructor-is-attribute.html b/tests/wpt/web-platform-tests/custom-elements/v0/instantiating/custom-element-constructor-is-attribute.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/custom-element-constructor-is-attribute.html rename to tests/wpt/web-platform-tests/custom-elements/v0/instantiating/custom-element-constructor-is-attribute.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/custom-element-constructor-local-name.html b/tests/wpt/web-platform-tests/custom-elements/v0/instantiating/custom-element-constructor-local-name.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/custom-element-constructor-local-name.html rename to tests/wpt/web-platform-tests/custom-elements/v0/instantiating/custom-element-constructor-local-name.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/custom-element-constructor-namespace.html b/tests/wpt/web-platform-tests/custom-elements/v0/instantiating/custom-element-constructor-namespace.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/custom-element-constructor-namespace.html rename to tests/wpt/web-platform-tests/custom-elements/v0/instantiating/custom-element-constructor-namespace.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/custom-element-constructor-node-document.html b/tests/wpt/web-platform-tests/custom-elements/v0/instantiating/custom-element-constructor-node-document.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/custom-element-constructor-node-document.html rename to tests/wpt/web-platform-tests/custom-elements/v0/instantiating/custom-element-constructor-node-document.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/custom-element-constructor-prototype.html b/tests/wpt/web-platform-tests/custom-elements/v0/instantiating/custom-element-constructor-prototype.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/custom-element-constructor-prototype.html rename to tests/wpt/web-platform-tests/custom-elements/v0/instantiating/custom-element-constructor-prototype.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/custom-element-prototype.html b/tests/wpt/web-platform-tests/custom-elements/v0/instantiating/custom-element-prototype.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/custom-element-prototype.html rename to tests/wpt/web-platform-tests/custom-elements/v0/instantiating/custom-element-prototype.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/custom-element-type-is-attribute.html b/tests/wpt/web-platform-tests/custom-elements/v0/instantiating/custom-element-type-is-attribute.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/custom-element-type-is-attribute.html rename to tests/wpt/web-platform-tests/custom-elements/v0/instantiating/custom-element-type-is-attribute.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/custom-element-type-local-name-and-is-attribute.html b/tests/wpt/web-platform-tests/custom-elements/v0/instantiating/custom-element-type-local-name-and-is-attribute.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/custom-element-type-local-name-and-is-attribute.html rename to tests/wpt/web-platform-tests/custom-elements/v0/instantiating/custom-element-type-local-name-and-is-attribute.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/custom-element-type-local-name.html b/tests/wpt/web-platform-tests/custom-elements/v0/instantiating/custom-element-type-local-name.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/custom-element-type-local-name.html rename to tests/wpt/web-platform-tests/custom-elements/v0/instantiating/custom-element-type-local-name.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-interface-type-is-a-local-name.html b/tests/wpt/web-platform-tests/custom-elements/v0/instantiating/extensions-to-document-interface/create-element-interface-type-is-a-local-name.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-interface-type-is-a-local-name.html rename to tests/wpt/web-platform-tests/custom-elements/v0/instantiating/extensions-to-document-interface/create-element-interface-type-is-a-local-name.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-interface-type-is-a-type-extension.html b/tests/wpt/web-platform-tests/custom-elements/v0/instantiating/extensions-to-document-interface/create-element-interface-type-is-a-type-extension.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-interface-type-is-a-type-extension.html rename to tests/wpt/web-platform-tests/custom-elements/v0/instantiating/extensions-to-document-interface/create-element-interface-type-is-a-type-extension.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-is-attribute.html b/tests/wpt/web-platform-tests/custom-elements/v0/instantiating/extensions-to-document-interface/create-element-is-attribute.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-is-attribute.html rename to tests/wpt/web-platform-tests/custom-elements/v0/instantiating/extensions-to-document-interface/create-element-is-attribute.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-namespace.html b/tests/wpt/web-platform-tests/custom-elements/v0/instantiating/extensions-to-document-interface/create-element-namespace.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-namespace.html rename to tests/wpt/web-platform-tests/custom-elements/v0/instantiating/extensions-to-document-interface/create-element-namespace.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-type-extension-is-a-type.html b/tests/wpt/web-platform-tests/custom-elements/v0/instantiating/extensions-to-document-interface/create-element-type-extension-is-a-type.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-type-extension-is-a-type.html rename to tests/wpt/web-platform-tests/custom-elements/v0/instantiating/extensions-to-document-interface/create-element-type-extension-is-a-type.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-type-extension-unresolved.html b/tests/wpt/web-platform-tests/custom-elements/v0/instantiating/extensions-to-document-interface/create-element-type-extension-unresolved.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-type-extension-unresolved.html rename to tests/wpt/web-platform-tests/custom-elements/v0/instantiating/extensions-to-document-interface/create-element-type-extension-unresolved.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-type-is-a-local-name.html b/tests/wpt/web-platform-tests/custom-elements/v0/instantiating/extensions-to-document-interface/create-element-type-is-a-local-name.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/create-element-type-is-a-local-name.html rename to tests/wpt/web-platform-tests/custom-elements/v0/instantiating/extensions-to-document-interface/create-element-type-is-a-local-name.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/created-callback-create-element-ns.html b/tests/wpt/web-platform-tests/custom-elements/v0/instantiating/extensions-to-document-interface/created-callback-create-element-ns.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/created-callback-create-element-ns.html rename to tests/wpt/web-platform-tests/custom-elements/v0/instantiating/extensions-to-document-interface/created-callback-create-element-ns.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/created-callback-create-element.html b/tests/wpt/web-platform-tests/custom-elements/v0/instantiating/extensions-to-document-interface/created-callback-create-element.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/extensions-to-document-interface/created-callback-create-element.html rename to tests/wpt/web-platform-tests/custom-elements/v0/instantiating/extensions-to-document-interface/created-callback-create-element.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/non-configurable-constructor-property.html b/tests/wpt/web-platform-tests/custom-elements/v0/instantiating/non-configurable-constructor-property.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/non-configurable-constructor-property.html rename to tests/wpt/web-platform-tests/custom-elements/v0/instantiating/non-configurable-constructor-property.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/prototype-is-interface-prototype-object.html b/tests/wpt/web-platform-tests/custom-elements/v0/instantiating/prototype-is-interface-prototype-object.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/prototype-is-interface-prototype-object.html rename to tests/wpt/web-platform-tests/custom-elements/v0/instantiating/prototype-is-interface-prototype-object.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/unchanged-attribute.html b/tests/wpt/web-platform-tests/custom-elements/v0/instantiating/unchanged-attribute.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/instantiating-custom-elements/unchanged-attribute.html rename to tests/wpt/web-platform-tests/custom-elements/v0/instantiating/unchanged-attribute.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/definition-construction-algorithm-default-namespace.html b/tests/wpt/web-platform-tests/custom-elements/v0/registering/definition-construction-algorithm-default-namespace.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/definition-construction-algorithm-default-namespace.html rename to tests/wpt/web-platform-tests/custom-elements/v0/registering/definition-construction-algorithm-default-namespace.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/definition-construction-algorithm-duplicate-definition.html b/tests/wpt/web-platform-tests/custom-elements/v0/registering/definition-construction-algorithm-duplicate-definition.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/definition-construction-algorithm-duplicate-definition.html rename to tests/wpt/web-platform-tests/custom-elements/v0/registering/definition-construction-algorithm-duplicate-definition.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/definition-construction-algorithm-invalid-type.html b/tests/wpt/web-platform-tests/custom-elements/v0/registering/definition-construction-algorithm-invalid-type.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/definition-construction-algorithm-invalid-type.html rename to tests/wpt/web-platform-tests/custom-elements/v0/registering/definition-construction-algorithm-invalid-type.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/definition-construction-algorithm-local-name-lowercased.html b/tests/wpt/web-platform-tests/custom-elements/v0/registering/definition-construction-algorithm-local-name-lowercased.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/definition-construction-algorithm-local-name-lowercased.html rename to tests/wpt/web-platform-tests/custom-elements/v0/registering/definition-construction-algorithm-local-name-lowercased.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/definition-construction-algorithm-name-is-null.html b/tests/wpt/web-platform-tests/custom-elements/v0/registering/definition-construction-algorithm-name-is-null.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/definition-construction-algorithm-name-is-null.html rename to tests/wpt/web-platform-tests/custom-elements/v0/registering/definition-construction-algorithm-name-is-null.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/definition-construction-algorithm-no-interface-for-name.html b/tests/wpt/web-platform-tests/custom-elements/v0/registering/definition-construction-algorithm-no-interface-for-name.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/definition-construction-algorithm-no-interface-for-name.html rename to tests/wpt/web-platform-tests/custom-elements/v0/registering/definition-construction-algorithm-no-interface-for-name.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/definition-construction-algorithm-svg-namespace-name-is-null.html b/tests/wpt/web-platform-tests/custom-elements/v0/registering/definition-construction-algorithm-svg-namespace-name-is-null.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/definition-construction-algorithm-svg-namespace-name-is-null.html rename to tests/wpt/web-platform-tests/custom-elements/v0/registering/definition-construction-algorithm-svg-namespace-name-is-null.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/definition-construction-algorithm-svg-namespace.html b/tests/wpt/web-platform-tests/custom-elements/v0/registering/definition-construction-algorithm-svg-namespace.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/definition-construction-algorithm-svg-namespace.html rename to tests/wpt/web-platform-tests/custom-elements/v0/registering/definition-construction-algorithm-svg-namespace.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/definition-construction-algorithm-type-name-lowercased.html b/tests/wpt/web-platform-tests/custom-elements/v0/registering/definition-construction-algorithm-type-name-lowercased.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/definition-construction-algorithm-type-name-lowercased.html rename to tests/wpt/web-platform-tests/custom-elements/v0/registering/definition-construction-algorithm-type-name-lowercased.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/element-registration-algorithm-no-registry.html b/tests/wpt/web-platform-tests/custom-elements/v0/registering/element-registration-algorithm-no-registry.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/element-registration-algorithm-no-registry.html rename to tests/wpt/web-platform-tests/custom-elements/v0/registering/element-registration-algorithm-no-registry.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/extensions-to-document-interface/custom-element-name.html b/tests/wpt/web-platform-tests/custom-elements/v0/registering/extensions-to-document-interface/custom-element-name.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/extensions-to-document-interface/custom-element-name.html rename to tests/wpt/web-platform-tests/custom-elements/v0/registering/extensions-to-document-interface/custom-element-name.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/extensions-to-document-interface/custom-element-prototype.html b/tests/wpt/web-platform-tests/custom-elements/v0/registering/extensions-to-document-interface/custom-element-prototype.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/extensions-to-document-interface/custom-element-prototype.html rename to tests/wpt/web-platform-tests/custom-elements/v0/registering/extensions-to-document-interface/custom-element-prototype.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag-ref.html b/tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag-ref.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag-ref.html rename to tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag-ref.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag.html b/tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag.html rename to tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag-ref.html b/tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag-ref.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag-ref.html rename to tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag-ref.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag.html b/tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag.html rename to tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension-ref.html b/tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension-ref.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension-ref.html rename to tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension-ref.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension.html b/tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension.html rename to tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension-ref.html b/tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension-ref.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension-ref.html rename to tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension-ref.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension.html b/tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension.html rename to tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-matching-query-selector-all.html b/tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-matching-query-selector-all.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-matching-query-selector-all.html rename to tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-matching-query-selector-all.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-matching-query-selector.html b/tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-matching-query-selector.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-matching-query-selector.html rename to tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-element-pseudoclass/unresolved-element-pseudoclass-matching-query-selector.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-elements-interface-html-element.html b/tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-elements-interface-html-element.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-elements-interface-html-element.html rename to tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-elements-interface-html-element.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-elements-interface-html-unknown-element.html b/tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-elements-interface-html-unknown-element.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-elements-interface-html-unknown-element.html rename to tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-elements-interface-html-unknown-element.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-elements-interface-svg-element.html b/tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-elements-interface-svg-element.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/registering/unresolved-elements-interface-svg-element.html rename to tests/wpt/web-platform-tests/custom-elements/v0/registering/unresolved-elements-interface-svg-element.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/resources/blank.html b/tests/wpt/web-platform-tests/custom-elements/v0/resources/blank.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/resources/blank.html rename to tests/wpt/web-platform-tests/custom-elements/v0/resources/blank.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/resources/import-master-async.html b/tests/wpt/web-platform-tests/custom-elements/v0/resources/import-master-async.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/resources/import-master-async.html rename to tests/wpt/web-platform-tests/custom-elements/v0/resources/import-master-async.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/resources/import-master.html b/tests/wpt/web-platform-tests/custom-elements/v0/resources/import-master.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/resources/import-master.html rename to tests/wpt/web-platform-tests/custom-elements/v0/resources/import-master.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/resources/import.html b/tests/wpt/web-platform-tests/custom-elements/v0/resources/import.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/resources/import.html rename to tests/wpt/web-platform-tests/custom-elements/v0/resources/import.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/resources/register-and-create-custom-element.html b/tests/wpt/web-platform-tests/custom-elements/v0/resources/register-and-create-custom-element.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/resources/register-and-create-custom-element.html rename to tests/wpt/web-platform-tests/custom-elements/v0/resources/register-and-create-custom-element.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/resources/x-element.html b/tests/wpt/web-platform-tests/custom-elements/v0/resources/x-element.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/resources/x-element.html rename to tests/wpt/web-platform-tests/custom-elements/v0/resources/x-element.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/resources/x-mathml-element.html b/tests/wpt/web-platform-tests/custom-elements/v0/resources/x-mathml-element.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/resources/x-mathml-element.html rename to tests/wpt/web-platform-tests/custom-elements/v0/resources/x-mathml-element.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/resources/x-svg-element.html b/tests/wpt/web-platform-tests/custom-elements/v0/resources/x-svg-element.html similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/resources/x-svg-element.html rename to tests/wpt/web-platform-tests/custom-elements/v0/resources/x-svg-element.html diff --git a/tests/wpt/web-platform-tests/custom-elements/pre-v1/testcommon.js b/tests/wpt/web-platform-tests/custom-elements/v0/testcommon.js similarity index 100% rename from tests/wpt/web-platform-tests/custom-elements/pre-v1/testcommon.js rename to tests/wpt/web-platform-tests/custom-elements/v0/testcommon.js diff --git a/tests/wpt/web-platform-tests/dom/nodes/Element-classlist.html b/tests/wpt/web-platform-tests/dom/nodes/Element-classlist.html index d3d6deb040c..22b499e931f 100644 --- a/tests/wpt/web-platform-tests/dom/nodes/Element-classlist.html +++ b/tests/wpt/web-platform-tests/dom/nodes/Element-classlist.html @@ -377,6 +377,26 @@ test(function () { assert_equals(secondelem.classList[0],'foo'); assert_equals(secondelem.classList[1],'bar'); }, 'classList must have [PutForwards=value]'); +test(function () { + var foo = document.createElement('div'); + foo.className = 'a'; + foo.classList.replace('token1', 'token2'); + + assert_equals(foo.className, 'a'); + + foo.classList.replace('a', 'b'); + assert_equals(foo.className, 'b'); + + assert_throws('SYNTAX_ERR', function () { foo.classList.replace('t with space', '') }); + assert_throws('INVALID_CHARACTER_ERR', function () { foo.classList.replace('t with space', 'foo') }); + assert_throws('SYNTAX_ERR', function () { foo.classList.replace('', 'foo') }); +}, 'classList.replace should work'); + +test(function() { + var foo = document.createElement('div'); + assert_throws(new TypeError(), + function() { foo.classList.supports('hello') }); +}, 'classList.supports should throw'); diff --git a/tests/wpt/web-platform-tests/domparsing/OWNERS b/tests/wpt/web-platform-tests/domparsing/OWNERS index 113c79d205d..8aeebafa5f5 100644 --- a/tests/wpt/web-platform-tests/domparsing/OWNERS +++ b/tests/wpt/web-platform-tests/domparsing/OWNERS @@ -2,4 +2,3 @@ @ChrisParis @deniak @jdm -@Ms2ger diff --git a/tests/wpt/web-platform-tests/domparsing/createContextualFragment.html b/tests/wpt/web-platform-tests/domparsing/createContextualFragment.html new file mode 100644 index 00000000000..ce7d813583c --- /dev/null +++ b/tests/wpt/web-platform-tests/domparsing/createContextualFragment.html @@ -0,0 +1,131 @@ + +createContextualFragment() tests +
+ + + diff --git a/tests/wpt/web-platform-tests/domparsing/innerhtml-01.xhtml b/tests/wpt/web-platform-tests/domparsing/innerhtml-01.xhtml new file mode 100644 index 00000000000..432cfbf41f5 --- /dev/null +++ b/tests/wpt/web-platform-tests/domparsing/innerhtml-01.xhtml @@ -0,0 +1,28 @@ + + +innerHTML in XHTML: getting while the document is in an invalid state + + + + + + + + +
+ + + diff --git a/tests/wpt/web-platform-tests/domparsing/innerhtml-03.xhtml b/tests/wpt/web-platform-tests/domparsing/innerhtml-03.xhtml new file mode 100644 index 00000000000..313531e49cd --- /dev/null +++ b/tests/wpt/web-platform-tests/domparsing/innerhtml-03.xhtml @@ -0,0 +1,59 @@ + + + +innerHTML in XHTML + + + + + + + +
+ + + diff --git a/tests/wpt/web-platform-tests/domparsing/innerhtml-04.html b/tests/wpt/web-platform-tests/domparsing/innerhtml-04.html new file mode 100644 index 00000000000..32c921d235d --- /dev/null +++ b/tests/wpt/web-platform-tests/domparsing/innerhtml-04.html @@ -0,0 +1,24 @@ + +innerHTML in HTML + + + + +
+ diff --git a/tests/wpt/web-platform-tests/domparsing/innerhtml-05.xhtml b/tests/wpt/web-platform-tests/domparsing/innerhtml-05.xhtml new file mode 100644 index 00000000000..da2d8515952 --- /dev/null +++ b/tests/wpt/web-platform-tests/domparsing/innerhtml-05.xhtml @@ -0,0 +1,26 @@ + + +innerHTML in XHTML + + + + + + + + +
+ + + + diff --git a/tests/wpt/web-platform-tests/domparsing/innerhtml-06.html b/tests/wpt/web-platform-tests/domparsing/innerhtml-06.html new file mode 100644 index 00000000000..81e9c57b5ce --- /dev/null +++ b/tests/wpt/web-platform-tests/domparsing/innerhtml-06.html @@ -0,0 +1,19 @@ + + + +math in html: innerHTML + + + + +

math in html: innerHTML

+
+
+
x
+
+ diff --git a/tests/wpt/web-platform-tests/domparsing/innerhtml-07.html b/tests/wpt/web-platform-tests/domparsing/innerhtml-07.html new file mode 100644 index 00000000000..9e313a2cb01 --- /dev/null +++ b/tests/wpt/web-platform-tests/domparsing/innerhtml-07.html @@ -0,0 +1,49 @@ + +innerHTML and string conversion + + + + +
+ diff --git a/tests/wpt/web-platform-tests/domparsing/insert_adjacent_html.html b/tests/wpt/web-platform-tests/domparsing/insert_adjacent_html.html new file mode 100644 index 00000000000..dfe624f03ad --- /dev/null +++ b/tests/wpt/web-platform-tests/domparsing/insert_adjacent_html.html @@ -0,0 +1,94 @@ + + + + insertAdjacentHTML in HTML + + + + + +

+ +
+ + diff --git a/tests/wpt/web-platform-tests/domparsing/insert_adjacent_html.js b/tests/wpt/web-platform-tests/domparsing/insert_adjacent_html.js new file mode 100644 index 00000000000..2451228d193 --- /dev/null +++ b/tests/wpt/web-platform-tests/domparsing/insert_adjacent_html.js @@ -0,0 +1,33 @@ +function testThrowingNoParent(element, desc) { + test(function() { + assert_throws("NO_MODIFICATION_ALLOWED_ERR", + function() { element.insertAdjacentHTML("afterend", "") } + ); + assert_throws("NO_MODIFICATION_ALLOWED_ERR", + function() { element.insertAdjacentHTML("beforebegin", "") } + ); + assert_throws("NO_MODIFICATION_ALLOWED_ERR", + function() { element.insertAdjacentHTML("afterend", "foo") } + ); + assert_throws("NO_MODIFICATION_ALLOWED_ERR", + function() { element.insertAdjacentHTML("beforebegin", "foo") } + ); + }, "When the parent node is " + desc + ", insertAdjacentHTML should throw for beforebegin and afterend (text)"); + test(function() { + assert_throws("NO_MODIFICATION_ALLOWED_ERR", + function() { element.insertAdjacentHTML("afterend", "") } + ); + assert_throws("NO_MODIFICATION_ALLOWED_ERR", + function() { element.insertAdjacentHTML("beforebegin", "") } + ); + }, "When the parent node is " + desc + ", insertAdjacentHTML should throw for beforebegin and afterend (comments)"); + test(function() { + assert_throws("NO_MODIFICATION_ALLOWED_ERR", + function() { element.insertAdjacentHTML("afterend", "
") } + ); + assert_throws("NO_MODIFICATION_ALLOWED_ERR", + function() { element.insertAdjacentHTML("beforebegin", "
") } + ); + }, "When the parent node is " + desc + ", insertAdjacentHTML should throw for beforebegin and afterend (elements)"); +} + diff --git a/tests/wpt/web-platform-tests/domparsing/insert_adjacent_html.xhtml b/tests/wpt/web-platform-tests/domparsing/insert_adjacent_html.xhtml new file mode 100644 index 00000000000..eadf10e2c1f --- /dev/null +++ b/tests/wpt/web-platform-tests/domparsing/insert_adjacent_html.xhtml @@ -0,0 +1,91 @@ + + + insertAdjacentHTML in HTML + + + + + +

+ +
+ + diff --git a/tests/wpt/web-platform-tests/domparsing/outerhtml-01.html b/tests/wpt/web-platform-tests/domparsing/outerhtml-01.html new file mode 100644 index 00000000000..2e8072e49f9 --- /dev/null +++ b/tests/wpt/web-platform-tests/domparsing/outerhtml-01.html @@ -0,0 +1,15 @@ + +outerHTML: child of #document + + + + +
+ + diff --git a/tests/wpt/web-platform-tests/domparsing/outerhtml-02.html b/tests/wpt/web-platform-tests/domparsing/outerhtml-02.html new file mode 100644 index 00000000000..7b69fbf6724 --- /dev/null +++ b/tests/wpt/web-platform-tests/domparsing/outerhtml-02.html @@ -0,0 +1,54 @@ + +outerHTML and string conversion + + + + +
+ diff --git a/tests/wpt/web-platform-tests/domparsing/xml-serialization.xhtml b/tests/wpt/web-platform-tests/domparsing/xml-serialization.xhtml new file mode 100644 index 00000000000..678523d1e9d --- /dev/null +++ b/tests/wpt/web-platform-tests/domparsing/xml-serialization.xhtml @@ -0,0 +1,91 @@ + + + XML serialization + + + + +
+ + + diff --git a/tests/wpt/web-platform-tests/fetch/api/request/request-init-001.sub.html b/tests/wpt/web-platform-tests/fetch/api/request/request-init-001.sub.html index 92206b45128..b41f6f0fe71 100644 --- a/tests/wpt/web-platform-tests/fetch/api/request/request-init-001.sub.html +++ b/tests/wpt/web-platform-tests/fetch/api/request/request-init-001.sub.html @@ -29,14 +29,14 @@ var referrerPolicies = {"givenValues" : [ "", "no-referrer", "no-referrer-when-downgrade", - "origin-only", + "origin", "origin-when-cross-origin", "unsafe-url" ], "expectedValues" : ["", "no-referrer", "no-referrer-when-downgrade", - "origin-only", + "origin", "origin-when-cross-origin", "unsafe-url" ] diff --git a/tests/wpt/web-platform-tests/fetch/api/request/request-init-003.sub.html b/tests/wpt/web-platform-tests/fetch/api/request/request-init-003.sub.html index 41bafebb18d..12181a21970 100644 --- a/tests/wpt/web-platform-tests/fetch/api/request/request-init-003.sub.html +++ b/tests/wpt/web-platform-tests/fetch/api/request/request-init-003.sub.html @@ -17,7 +17,7 @@ var initValuesDict = {"method" : "POST", "referrer" : "http://{{host}}:{{ports[http][0]}}/", - "referrerPolicy" : "origin-only", + "referrerPolicy" : "origin", "mode" : "same-origin", "credentials" : "include", "cache" : "no-cache", @@ -29,7 +29,7 @@ var expectedInitialized = {"method" : "POST", "referrer" : "http://{{host}}:{{ports[http][0]}}/", - "referrerPolicy" : "origin-only", + "referrerPolicy" : "origin", "mode" : "same-origin", "credentials" : "include", "cache" : "no-cache", diff --git a/tests/wpt/web-platform-tests/hr-time/basic.html b/tests/wpt/web-platform-tests/hr-time/basic.html index a10548fc94a..cc26d242f96 100644 --- a/tests/wpt/web-platform-tests/hr-time/basic.html +++ b/tests/wpt/web-platform-tests/hr-time/basic.html @@ -28,12 +28,12 @@ async_test(function() { // Check whether the performance.now() method is close to Date() within 30ms (due to inaccuracies) var initial_hrt = performance.now(); var initial_date = Date.now(); - setTimeout(this.step_func(function() { + this.step_timeout(function() { var final_hrt = performance.now(); var final_date = Date.now(); assert_approx_equals(final_hrt - initial_hrt, final_date - initial_date, 30, 'High resolution time value increased by approximately the same amount as time from date object'); this.done(); - }), 2000); + }, 2000); }, 'High resolution time has approximately the right relative magnitude'); diff --git a/tests/wpt/web-platform-tests/hr-time/test_cross_frame_start.html b/tests/wpt/web-platform-tests/hr-time/test_cross_frame_start.html index 4633a73843e..30e804bd735 100644 --- a/tests/wpt/web-platform-tests/hr-time/test_cross_frame_start.html +++ b/tests/wpt/web-platform-tests/hr-time/test_cross_frame_start.html @@ -12,13 +12,16 @@ + + + +
+ +
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/html/browsers/history/the-location-interface/cross_origin_joined_frame.sub.html b/tests/wpt/web-platform-tests/html/browsers/history/the-location-interface/cross_origin_joined_frame.sub.html new file mode 100644 index 00000000000..a3ffdd005af --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/history/the-location-interface/cross_origin_joined_frame.sub.html @@ -0,0 +1,15 @@ + + + + + Cross-origin subframe for Location cyclic [[Prototype]] test + + + + + +

Cross-origin iframe with joined document.domain

+ + diff --git a/tests/wpt/web-platform-tests/html/browsers/history/the-location-interface/same_origin_frame.html b/tests/wpt/web-platform-tests/html/browsers/history/the-location-interface/same_origin_frame.html new file mode 100644 index 00000000000..953e696b2ab --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/history/the-location-interface/same_origin_frame.html @@ -0,0 +1,12 @@ + + + + + Same-origin subframe for Location cyclic [[Prototype]] test + + + + +

Same-origin iframe

+ + diff --git a/tests/wpt/web-platform-tests/html/dom/interfaces.html b/tests/wpt/web-platform-tests/html/dom/interfaces.html index b0120c05634..9886e7538f4 100644 --- a/tests/wpt/web-platform-tests/html/dom/interfaces.html +++ b/tests/wpt/web-platform-tests/html/dom/interfaces.html @@ -3215,7 +3215,11 @@ window.onload = function() { HTMLHeadingElement: ['document.createElement("h1")'], HTMLParagraphElement: ['document.createElement("p")'], HTMLHRElement: ['document.createElement("hr")'], - HTMLPreElement: ['document.createElement("pre")'], + HTMLPreElement: [ + 'document.createElement("pre")', + 'document.createElement("listing")', + 'document.createElement("xmp")', + ], HTMLQuoteElement: [ 'document.createElement("blockquote")', 'document.createElement("q")', diff --git a/tests/wpt/web-platform-tests/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-color-01.html b/tests/wpt/web-platform-tests/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-color-01.html index 8e2fbe7b002..38364cd3e65 100644 --- a/tests/wpt/web-platform-tests/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-color-01.html +++ b/tests/wpt/web-platform-tests/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-color-01.html @@ -8,11 +8,46 @@
diff --git a/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-base-element/base_about_blank.html b/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-base-element/base_about_blank.html new file mode 100644 index 00000000000..54c4794549a --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-base-element/base_about_blank.html @@ -0,0 +1,19 @@ + + +base element in about:blank document should resolve against its fallback base URI + + + + diff --git a/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-base-element/base_href_invalid.html b/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-base-element/base_href_invalid.html new file mode 100644 index 00000000000..6d12d29e8a9 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-base-element/base_href_invalid.html @@ -0,0 +1,12 @@ + + +base element with unparseable href should have .href getter return attr value + + + diff --git a/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-base-element/base_srcdoc.html b/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-base-element/base_srcdoc.html new file mode 100644 index 00000000000..eea1efe51d3 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-base-element/base_srcdoc.html @@ -0,0 +1,19 @@ + + +base element in srcdoc document should resolve against its fallback base URI + + + + diff --git a/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-link-element/link-rellist.html b/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-link-element/link-rellist.html index 8d11f1e5ccc..41496519514 100644 --- a/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-link-element/link-rellist.html +++ b/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-link-element/link-rellist.html @@ -19,5 +19,7 @@ test(function() { assert_equals(list.contains(NaN), true); //"NaN" assert_equals(list.contains(+Infinity), true); //"Infinity" assert_equals(list.contains(-Infinity), false); //"-Infinity" + assert_equals(list.supports("stylesheet"), true); + assert_equals(list.supports("nosuchrelvalueever"), false); }); diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/kind.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/kind.html index 4f1ba31e160..78c3bff51a2 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/kind.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/kind.html @@ -13,7 +13,7 @@ test(function(){ test(function(){ var track = document.createElement('track'); track.setAttribute('kind', 'invalid'); - assert_equals(track.kind, 'subtitles'); + assert_equals(track.kind, 'metadata'); assert_equals(track.getAttribute('kind'), 'invalid'); }, document.title + ' invalid value in content attribute'); @@ -27,14 +27,14 @@ test(function(){ test(function(){ var track = document.createElement('track'); track.setAttribute('kind', 'CAPT\u0130ONS'); - assert_equals(track.kind, 'subtitles'); + assert_equals(track.kind, 'metadata'); assert_equals(track.getAttribute('kind'), 'CAPT\u0130ONS'); }, document.title + ' content attribute with uppercase turkish I (with dot)'); test(function(){ var track = document.createElement('track'); track.setAttribute('kind', 'capt\u0131ons'); - assert_equals(track.kind, 'subtitles'); + assert_equals(track.kind, 'metadata'); assert_equals(track.getAttribute('kind'), 'capt\u0131ons'); }, document.title + ' content attribute with lowercase turkish i (dotless)'); @@ -76,7 +76,7 @@ test(function(){ test(function(){ var track = document.createElement('track'); track.setAttribute('kind', 'captions\u0000'); - assert_equals(track.kind, 'subtitles'); + assert_equals(track.kind, 'metadata'); assert_equals(track.getAttribute('kind'), 'captions\u0000'); }, document.title + ' content attribute "captions\\u0000"'); @@ -126,21 +126,21 @@ test(function(){ var track = document.createElement('track'); track.kind = 'CAPT\u0130ONS'; assert_equals(track.getAttribute('kind'), 'CAPT\u0130ONS'); - assert_equals(track.kind, 'subtitles'); + assert_equals(track.kind, 'metadata'); }, document.title + ' setting IDL attribute with uppercase turkish I (with dot)'); test(function(){ var track = document.createElement('track'); track.kind = 'capt\u0131ons'; assert_equals(track.getAttribute('kind'), 'capt\u0131ons'); - assert_equals(track.kind, 'subtitles'); + assert_equals(track.kind, 'metadata'); }, document.title + ' setting IDL attribute with lowercase turkish I (dotless)'); test(function(){ var track = document.createElement('track'); track.kind = 'captions\u0000'; assert_equals(track.getAttribute('kind'), 'captions\u0000'); - assert_equals(track.kind, 'subtitles'); + assert_equals(track.kind, 'metadata'); }, document.title + ' setting IDL attribute with \\u0000'); diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind.html index d91373d860b..d5dbc8342c0 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind.html @@ -26,6 +26,6 @@ test(function(){ test(function(){ var track = document.createElement('track'); track.kind = 'captions\u0000'; - assert_equals(track.track.kind, 'subtitles'); + assert_equals(track.track.kind, 'metadata'); }, document.title+', \\u0000'); diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-load-event.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-load-event.html new file mode 100644 index 00000000000..d245bf0b964 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-load-event.html @@ -0,0 +1,48 @@ + + +Test some sanity behavior around iframe load/error events + + + + + diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html index a30ae6e89ad..c8e09e8d0b8 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html @@ -89,8 +89,15 @@ - - + + + + + + + + + @@ -352,11 +359,35 @@ onload = function() { }), 0); }, 'timeout'); - t('picture is inserted', function(img) { + t('picture is inserted; img has src', function(img) { img.parentNode.nextSibling.appendChild(img.parentNode); }, 'timeout'); - t('picture is removed', function(img) { + t('picture is inserted; img has srcset', function(img) { + img.parentNode.nextSibling.appendChild(img.parentNode); + }, 'timeout'); + + t('picture is inserted; img has previous sibling source', function(img) { + img.parentNode.nextSibling.appendChild(img.parentNode); + }, 'timeout'); + + t('picture is inserted; img has following sibling source', function(img) { + img.parentNode.nextSibling.appendChild(img.parentNode); + }, 'timeout'); + + t('picture is removed; img has src', function(img) { + img.parentNode.parentNode.removeChild(img.parentNode); + }, 'timeout'); + + t('picture is removed; img has srcset', function(img) { + img.parentNode.parentNode.removeChild(img.parentNode); + }, 'timeout'); + + t('picture is removed; img has previous sibling source', function(img) { + img.parentNode.parentNode.removeChild(img.parentNode); + }, 'timeout'); + + t('picture is removed; img has following sibling source', function(img) { img.parentNode.parentNode.removeChild(img.parentNode); }, 'timeout'); diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/checkbox.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/checkbox.html index 0c07fdd4a40..4efe83b52a5 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/checkbox.html +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/checkbox.html @@ -40,7 +40,7 @@ assert_true(c1_click_fired, "input event should fire after click event"); assert_false(c1_change_fired, "input event should fire before change event"); assert_true(e.bubbles, "event should bubble"); - assert_false(e.isTrusted, "click()-initiated event should not be trusted"); + assert_true(e.isTrusted, "click()-initiated event should be trusted"); assert_false(e.cancelable, "event should not be cancelable"); assert_true(checkbox1.checked, "checkbox is checked"); assert_false(checkbox1.indeterminate, "checkbox is not indeterminate"); @@ -51,7 +51,7 @@ assert_true(c1_click_fired, "change event should fire after click event"); assert_true(c1_input_fired, "change event should fire after input event"); assert_true(e.bubbles, "event should bubble") - assert_false(e.isTrusted, "click()-initiated event should not be trusted"); + assert_true(e.isTrusted, "click()-initiated event should be trusted"); assert_false(e.cancelable, "event should not be cancelable"); assert_true(checkbox1.checked, "checkbox is checked"); assert_false(checkbox1.indeterminate, "checkbox is not indeterminate"); diff --git a/tests/wpt/web-platform-tests/html/syntax/serializing-html-fragments/serializing.html b/tests/wpt/web-platform-tests/html/syntax/serializing-html-fragments/serializing.html new file mode 100644 index 00000000000..8303901f652 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/syntax/serializing-html-fragments/serializing.html @@ -0,0 +1,332 @@ + +innerHTML in HTML + + +
+ + + + + diff --git a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/audio-tag/top-level/no-redirect/allowed.https.html b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/audio-tag/top-level/no-redirect/allowed.https.html index 721e31d399a..a29157047a6 100644 --- a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/audio-tag/top-level/no-redirect/allowed.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/audio-tag/top-level/no-redirect/allowed.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: audio-tag expectation: allowed"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/fetch-request/top-level/no-redirect/allowed.https.html b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/fetch-request/top-level/no-redirect/allowed.https.html index e78f5493f91..825fb2441b4 100644 --- a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/fetch-request/top-level/no-redirect/allowed.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/fetch-request/top-level/no-redirect/allowed.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: fetch-request expectation: allowed"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/form-tag/top-level/no-redirect/allowed.https.html b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/form-tag/top-level/no-redirect/allowed.https.html index 7b8652238ff..8452988259b 100644 --- a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/form-tag/top-level/no-redirect/allowed.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/form-tag/top-level/no-redirect/allowed.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: form-tag expectation: allowed"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/iframe-tag/top-level/no-redirect/allowed.https.html b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/iframe-tag/top-level/no-redirect/allowed.https.html index a3430f19368..148a6ec880d 100644 --- a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/iframe-tag/top-level/no-redirect/allowed.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/iframe-tag/top-level/no-redirect/allowed.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: iframe-tag expectation: allowed"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/img-tag/top-level/no-redirect/allowed.https.html b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/img-tag/top-level/no-redirect/allowed.https.html index 46ece8f0caa..e4ac20f4f08 100644 --- a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/img-tag/top-level/no-redirect/allowed.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/img-tag/top-level/no-redirect/allowed.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: img-tag expectation: allowed"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/link-css-tag/top-level/no-redirect/allowed.https.html b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/link-css-tag/top-level/no-redirect/allowed.https.html index 51d06274602..869c05abeca 100644 --- a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/link-css-tag/top-level/no-redirect/allowed.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/link-css-tag/top-level/no-redirect/allowed.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: link-css-tag expectation: allowed"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/link-prefetch-tag/top-level/no-redirect/allowed.https.html b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/link-prefetch-tag/top-level/no-redirect/allowed.https.html index 3763052b387..71ef6d359d1 100644 --- a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/link-prefetch-tag/top-level/no-redirect/allowed.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/link-prefetch-tag/top-level/no-redirect/allowed.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: link-prefetch-tag expectation: allowed"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/object-tag/top-level/no-redirect/allowed.https.html b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/object-tag/top-level/no-redirect/allowed.https.html index 7a5e5dfa350..662ac192a88 100644 --- a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/object-tag/top-level/no-redirect/allowed.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/object-tag/top-level/no-redirect/allowed.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: object-tag expectation: allowed"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/picture-tag/top-level/no-redirect/allowed.https.html b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/picture-tag/top-level/no-redirect/allowed.https.html index c9885eb8577..0d846777fab 100644 --- a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/picture-tag/top-level/no-redirect/allowed.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/picture-tag/top-level/no-redirect/allowed.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: picture-tag expectation: allowed"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/script-tag/top-level/no-redirect/allowed.https.html b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/script-tag/top-level/no-redirect/allowed.https.html index c0e7eb86796..0d0eec01c36 100644 --- a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/script-tag/top-level/no-redirect/allowed.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/script-tag/top-level/no-redirect/allowed.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: script-tag expectation: allowed"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/video-tag/top-level/no-redirect/allowed.https.html b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/video-tag/top-level/no-redirect/allowed.https.html index 2799f5af02f..cf84396315e 100644 --- a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/video-tag/top-level/no-redirect/allowed.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/video-tag/top-level/no-redirect/allowed.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: video-tag expectation: allowed"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/worker-request/top-level/no-redirect/allowed.https.html b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/worker-request/top-level/no-redirect/allowed.https.html index 091bc03c161..e5bf5ce95a8 100644 --- a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/worker-request/top-level/no-redirect/allowed.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/worker-request/top-level/no-redirect/allowed.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: worker-request expectation: allowed"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/xhr-request/top-level/no-redirect/allowed.https.html b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/xhr-request/top-level/no-redirect/allowed.https.html index 4044ccec1fc..ebbc9ec0c67 100644 --- a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/xhr-request/top-level/no-redirect/allowed.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-https/xhr-request/top-level/no-redirect/allowed.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: xhr-request expectation: allowed"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-wss/websocket-request/top-level/no-redirect/websocket-allowed.https.html b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-wss/websocket-request/top-level/no-redirect/websocket-allowed.https.html index 1967e45115c..f1cfed1984c 100644 --- a/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-wss/websocket-request/top-level/no-redirect/websocket-allowed.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/allowed/meta-csp/same-host-wss/websocket-request/top-level/no-redirect/websocket-allowed.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: websocket-request expectation: allowed"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/fetch-request/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/fetch-request/top-level/no-redirect/opt-in-blocks.https.html index ccc8e9b0b86..a1b37ef1ee7 100644 --- a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/fetch-request/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/fetch-request/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: fetch-request expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/form-tag/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/form-tag/top-level/no-redirect/opt-in-blocks.https.html index 147bd58578d..2ea8aadcaa3 100644 --- a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/form-tag/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/form-tag/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: form-tag expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/iframe-tag/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/iframe-tag/top-level/no-redirect/opt-in-blocks.https.html index 84af99aca91..2aa9e013bb1 100644 --- a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/iframe-tag/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/iframe-tag/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: iframe-tag expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/link-css-tag/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/link-css-tag/top-level/no-redirect/opt-in-blocks.https.html index bf9b606aed9..191b4a9ea66 100644 --- a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/link-css-tag/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/link-css-tag/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: link-css-tag expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/object-tag/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/object-tag/top-level/no-redirect/opt-in-blocks.https.html index 128c08dcd6e..ee5cfea7192 100644 --- a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/object-tag/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/object-tag/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: object-tag expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/picture-tag/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/picture-tag/top-level/no-redirect/opt-in-blocks.https.html index debd088dbb9..abe50087f63 100644 --- a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/picture-tag/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/picture-tag/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: picture-tag expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/script-tag/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/script-tag/top-level/no-redirect/opt-in-blocks.https.html index 4872269168d..7e9a2395a3c 100644 --- a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/script-tag/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/script-tag/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: script-tag expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/worker-request/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/worker-request/top-level/no-redirect/opt-in-blocks.https.html index b4bfdb8781c..63ba9045403 100644 --- a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/worker-request/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/worker-request/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: worker-request expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/xhr-request/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/xhr-request/top-level/no-redirect/opt-in-blocks.https.html index 39a44b4524f..cf95677c7f6 100644 --- a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/xhr-request/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-http/xhr-request/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: xhr-request expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-ws/websocket-request/top-level/no-redirect/ws-downgrade-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-ws/websocket-request/top-level/no-redirect/ws-downgrade-blocks.https.html index 04a462d1302..1bc4b11d9a7 100644 --- a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-ws/websocket-request/top-level/no-redirect/ws-downgrade-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/cross-origin-ws/websocket-request/top-level/no-redirect/ws-downgrade-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: websocket-request expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/fetch-request/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/fetch-request/top-level/no-redirect/opt-in-blocks.https.html index 85be9eb2b7d..0fb506de19f 100644 --- a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/fetch-request/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/fetch-request/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: fetch-request expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/form-tag/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/form-tag/top-level/no-redirect/opt-in-blocks.https.html index f5a0bf5dc92..b5dcde734a4 100644 --- a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/form-tag/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/form-tag/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: form-tag expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/iframe-tag/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/iframe-tag/top-level/no-redirect/opt-in-blocks.https.html index 6a70032ecdf..1fb7a9385a6 100644 --- a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/iframe-tag/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/iframe-tag/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: iframe-tag expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/link-css-tag/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/link-css-tag/top-level/no-redirect/opt-in-blocks.https.html index 68b5ac7066c..5e71b99d4c6 100644 --- a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/link-css-tag/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/link-css-tag/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: link-css-tag expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/object-tag/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/object-tag/top-level/no-redirect/opt-in-blocks.https.html index a71d608c404..28fdc6f0887 100644 --- a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/object-tag/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/object-tag/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: object-tag expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/picture-tag/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/picture-tag/top-level/no-redirect/opt-in-blocks.https.html index b1cf804b339..9c484e398a2 100644 --- a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/picture-tag/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/picture-tag/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: picture-tag expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/script-tag/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/script-tag/top-level/no-redirect/opt-in-blocks.https.html index 05201512b34..44b4795c91e 100644 --- a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/script-tag/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/script-tag/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: script-tag expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/worker-request/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/worker-request/top-level/no-redirect/opt-in-blocks.https.html index 599a5280f19..22e7c6eac28 100644 --- a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/worker-request/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/worker-request/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: worker-request expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/xhr-request/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/xhr-request/top-level/no-redirect/opt-in-blocks.https.html index fd22ba37e55..80a633ab22f 100644 --- a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/xhr-request/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-http/xhr-request/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: xhr-request expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-ws/websocket-request/top-level/no-redirect/ws-downgrade-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-ws/websocket-request/top-level/no-redirect/ws-downgrade-blocks.https.html index 1f887fb5870..a3cb304e034 100644 --- a/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-ws/websocket-request/top-level/no-redirect/ws-downgrade-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/blockable/meta-csp/same-host-ws/websocket-request/top-level/no-redirect/ws-downgrade-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: websocket-request expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/generic/common.js b/tests/wpt/web-platform-tests/mixed-content/generic/common.js index 3881513b2f2..36427a4669f 100644 --- a/tests/wpt/web-platform-tests/mixed-content/generic/common.js +++ b/tests/wpt/web-platform-tests/mixed-content/generic/common.js @@ -107,11 +107,22 @@ function createElement(tagName, attrs, parent, doBindEvents) { // We set the attributes after binding to events to catch any // event-triggering attribute changes. E.g. form submission. - setAttributes(element, attrs); + // + // But be careful with images: unlike other elements they will start the load + // as soon as the attr is set, even if not in the document yet, and sometimes + // complete it synchronously, so the append doesn't have the effect we want. + // So for images, we want to set the attrs after appending, whereas for other + // elements we want to do it before appending. + var isImg = (tagName == "img"); + if (!isImg) + setAttributes(element, attrs); if (parent) parent.appendChild(element); + if (isImg) + setAttributes(element, attrs); + return element; } diff --git a/tests/wpt/web-platform-tests/mixed-content/generic/expect.py b/tests/wpt/web-platform-tests/mixed-content/generic/expect.py index e25f2f9f470..a3ea61b2139 100644 --- a/tests/wpt/web-platform-tests/mixed-content/generic/expect.py +++ b/tests/wpt/web-platform-tests/mixed-content/generic/expect.py @@ -70,20 +70,20 @@ def main(request, response): if content_type == "image/png": response_data = open(os.path.join(request.doc_root, "images", - "smiley.png")).read() + "smiley.png"), "rb").read() elif content_type == "audio/mpeg": response_data = open(os.path.join(request.doc_root, "media", - "sound_5.oga")).read() + "sound_5.oga"), "rb").read() elif content_type == "video/mp4": response_data = open(os.path.join(request.doc_root, "media", - "movie_5.mp4")).read() + "movie_5.mp4"), "rb").read() elif content_type == "application/javascript": response_data = open(os.path.join(request.doc_root, "mixed-content", "generic", - "worker.js")).read() + "worker.js"), "rb").read() else: response_data = "/* purged */" elif action == "take": diff --git a/tests/wpt/web-platform-tests/mixed-content/generic/template/test.release.html.template b/tests/wpt/web-platform-tests/mixed-content/generic/template/test.release.html.template index 45473ad5ff1..ca77389cc68 100644 --- a/tests/wpt/web-platform-tests/mixed-content/generic/template/test.release.html.template +++ b/tests/wpt/web-platform-tests/mixed-content/generic/template/test.release.html.template @@ -7,7 +7,7 @@ - + %(meta_opt_in)s diff --git a/tests/wpt/web-platform-tests/mixed-content/generic/tools/generate.py b/tests/wpt/web-platform-tests/mixed-content/generic/tools/generate.py index e27988b5734..6dcaebdc30d 100755 --- a/tests/wpt/web-platform-tests/mixed-content/generic/tools/generate.py +++ b/tests/wpt/web-platform-tests/mixed-content/generic/tools/generate.py @@ -89,7 +89,7 @@ def generate_selection(selection, spec, test_html_template_basename): opt_in_method = selection['opt_in_method'] selection['meta_opt_in'] = '' if opt_in_method == 'meta-csp': - selection['meta_opt_in'] = '' elif opt_in_method == 'http-csp': opt_in_headers = "Content-Security-Policy: block-all-mixed-content\n" diff --git a/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/cross-origin-http/audio-tag/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/cross-origin-http/audio-tag/top-level/no-redirect/opt-in-blocks.https.html index ddc860ba2fc..283c34207bf 100644 --- a/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/cross-origin-http/audio-tag/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/cross-origin-http/audio-tag/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: audio-tag expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/cross-origin-http/img-tag/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/cross-origin-http/img-tag/top-level/no-redirect/opt-in-blocks.https.html index 44fdb8b7aa1..684d2449a4e 100644 --- a/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/cross-origin-http/img-tag/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/cross-origin-http/img-tag/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: img-tag expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/cross-origin-http/link-prefetch-tag/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/cross-origin-http/link-prefetch-tag/top-level/no-redirect/opt-in-blocks.https.html index b5de46754dd..7f5cc295598 100644 --- a/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/cross-origin-http/link-prefetch-tag/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/cross-origin-http/link-prefetch-tag/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: link-prefetch-tag expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/cross-origin-http/video-tag/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/cross-origin-http/video-tag/top-level/no-redirect/opt-in-blocks.https.html index 2aebedc7857..a181ecd388a 100644 --- a/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/cross-origin-http/video-tag/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/cross-origin-http/video-tag/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: video-tag expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/same-host-http/audio-tag/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/same-host-http/audio-tag/top-level/no-redirect/opt-in-blocks.https.html index e066dd1e3e7..1c65507b4ce 100644 --- a/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/same-host-http/audio-tag/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/same-host-http/audio-tag/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: audio-tag expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/same-host-http/img-tag/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/same-host-http/img-tag/top-level/no-redirect/opt-in-blocks.https.html index 0572c8079bc..b05dff3b33d 100644 --- a/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/same-host-http/img-tag/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/same-host-http/img-tag/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: img-tag expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/same-host-http/link-prefetch-tag/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/same-host-http/link-prefetch-tag/top-level/no-redirect/opt-in-blocks.https.html index 3b1d36af291..28003d9a1bd 100644 --- a/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/same-host-http/link-prefetch-tag/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/same-host-http/link-prefetch-tag/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: link-prefetch-tag expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/same-host-http/video-tag/top-level/no-redirect/opt-in-blocks.https.html b/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/same-host-http/video-tag/top-level/no-redirect/opt-in-blocks.https.html index c78aa6b9942..05f1890c98d 100644 --- a/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/same-host-http/video-tag/top-level/no-redirect/opt-in-blocks.https.html +++ b/tests/wpt/web-platform-tests/mixed-content/optionally-blockable/meta-csp/same-host-http/video-tag/top-level/no-redirect/opt-in-blocks.https.html @@ -14,6 +14,7 @@ redirection: no-redirect subresource: video-tag expectation: blocked"> + diff --git a/tests/wpt/web-platform-tests/mixed-content/spec_json.js b/tests/wpt/web-platform-tests/mixed-content/spec_json.js index 11d3ac1c254..5de1b17e303 100644 --- a/tests/wpt/web-platform-tests/mixed-content/spec_json.js +++ b/tests/wpt/web-platform-tests/mixed-content/spec_json.js @@ -1 +1 @@ -var SPEC_JSON = {"test_expansion_schema": {"origin": ["same-host-https", "same-host-http", "cross-origin-https", "cross-origin-http"], "subresource": {"blockable": ["iframe-tag", "script-tag", "link-css-tag", "form-tag", "xhr-request", "worker-request", "fetch-request", "a-tag", "object-tag", "picture-tag", "websocket-request"], "optionally-blockable": ["img-tag", "audio-tag", "video-tag", "link-prefetch-tag"]}, "context_nesting": ["top-level", "sub-level"], "expectation": ["allowed", "blocked"], "expansion": ["default", "override"], "redirection": ["no-redirect", "keep-scheme-redirect", "swap-scheme-redirect"], "opt_in_method": ["no-opt-in", "http-csp", "meta-csp", "img-crossorigin"], "source_scheme": ["http", "https"]}, "specification": [{"test_expansion": [{"origin": ["cross-origin-http", "same-host-http"], "name": "opt-in-blocks", "redirection": "*", "expectation": "blocked", "expansion": "default", "context_nesting": "top-level", "opt_in_method": ["http-csp", "meta-csp"], "source_scheme": "https", "subresource": {"blockable": [], "optionally-blockable": "*"}}, {"origin": ["cross-origin-http", "same-host-http"], "name": "no-opt-in-allows", "redirection": "*", "expectation": "allowed", "expansion": "default", "context_nesting": "top-level", "opt_in_method": "no-opt-in", "source_scheme": "https", "subresource": {"blockable": [], "optionally-blockable": "*"}}], "description": "Test behavior of optionally-blockable content", "specification_url": "http://www.w3.org/TR/mixed-content/#category-optionally-blockable", "name": "optionally-blockable", "title": "Optionally-blockable content"}, {"test_expansion": [{"origin": ["cross-origin-http", "same-host-http"], "name": "opt-in-blocks", "redirection": "*", "expectation": "blocked", "expansion": "default", "context_nesting": "top-level", "opt_in_method": ["http-csp", "meta-csp"], "source_scheme": "https", "subresource": {"blockable": "*", "optionally-blockable": []}}, {"origin": ["cross-origin-http", "same-host-http"], "name": "no-opt-in-blocks", "redirection": "*", "expectation": "blocked", "expansion": "default", "context_nesting": "top-level", "opt_in_method": "no-opt-in", "source_scheme": "https", "subresource": {"blockable": "*", "optionally-blockable": []}}], "description": "Test behavior of blockable content.", "specification_url": "http://www.w3.org/TR/mixed-content/#category-blockable", "name": "blockable", "title": "Blockable content"}, {"test_expansion": [{"origin": ["same-host-https"], "name": "allowed", "redirection": ["no-redirect", "keep-scheme-redirect"], "expectation": "allowed", "expansion": "default", "context_nesting": "top-level", "opt_in_method": "*", "source_scheme": "https", "subresource": {"blockable": "*", "optionally-blockable": "*"}}], "description": "Test behavior of allowed content.", "specification_url": "http://www.w3.org/TR/mixed-content/", "name": "allowed", "title": "Allowed content"}], "excluded_tests": [{"origin": "*", "name": "TODO-subresources-not-supported", "redirection": "*", "expectation": "*", "expansion": "*", "context_nesting": "*", "opt_in_method": "*", "source_scheme": "*", "subresource": {"blockable": ["a-tag", "websocket-request"], "optionally-blockable": []}}, {"origin": "*", "name": "TODO-opt-in-method-img-cross-origin", "redirection": "*", "expectation": "*", "expansion": "*", "context_nesting": "*", "opt_in_method": "img-crossorigin", "source_scheme": "*", "subresource": {"blockable": "*", "optionally-blockable": "*"}}, {"origin": "*", "name": "Skip-redundant-for-opt-in-method", "redirection": ["keep-scheme-redirect", "swap-scheme-redirect"], "expectation": "*", "expansion": "*", "context_nesting": "*", "opt_in_method": ["meta-csp", "img-crossorigin"], "source_scheme": "*", "subresource": {"blockable": "*", "optionally-blockable": "*"}}]}; +var SPEC_JSON = {"test_expansion_schema": {"origin": ["same-host-https", "same-host-http", "cross-origin-https", "cross-origin-http", "same-host-wss", "same-host-ws", "cross-origin-wss", "cross-origin-ws"], "subresource": {"blockable": ["iframe-tag", "script-tag", "link-css-tag", "form-tag", "xhr-request", "worker-request", "fetch-request", "a-tag", "object-tag", "picture-tag", "websocket-request"], "optionally-blockable": ["img-tag", "audio-tag", "video-tag", "link-prefetch-tag"]}, "context_nesting": ["top-level", "sub-level"], "expectation": ["allowed", "blocked"], "expansion": ["default", "override"], "redirection": ["no-redirect", "keep-scheme-redirect", "swap-scheme-redirect"], "opt_in_method": ["no-opt-in", "http-csp", "meta-csp", "img-crossorigin"], "source_scheme": ["http", "https"]}, "specification": [{"test_expansion": [{"origin": ["cross-origin-http", "same-host-http"], "name": "opt-in-blocks", "redirection": "*", "expectation": "blocked", "expansion": "default", "context_nesting": "top-level", "opt_in_method": ["http-csp", "meta-csp"], "source_scheme": "https", "subresource": {"blockable": [], "optionally-blockable": "*"}}, {"origin": ["cross-origin-http", "same-host-http"], "name": "no-opt-in-allows", "redirection": "*", "expectation": "allowed", "expansion": "default", "context_nesting": "top-level", "opt_in_method": "no-opt-in", "source_scheme": "https", "subresource": {"blockable": [], "optionally-blockable": "*"}}], "description": "Test behavior of optionally-blockable content", "specification_url": "http://www.w3.org/TR/mixed-content/#category-optionally-blockable", "name": "optionally-blockable", "title": "Optionally-blockable content"}, {"test_expansion": [{"origin": ["cross-origin-http", "same-host-http"], "name": "opt-in-blocks", "redirection": "*", "expectation": "blocked", "expansion": "default", "context_nesting": "top-level", "opt_in_method": ["http-csp", "meta-csp"], "source_scheme": "https", "subresource": {"blockable": "*", "optionally-blockable": []}}, {"origin": ["cross-origin-http", "same-host-http"], "name": "no-opt-in-blocks", "redirection": "*", "expectation": "blocked", "expansion": "default", "context_nesting": "top-level", "opt_in_method": "no-opt-in", "source_scheme": "https", "subresource": {"blockable": "*", "optionally-blockable": []}}, {"origin": ["cross-origin-ws", "same-host-ws"], "name": "ws-downgrade-blocks", "redirection": "*", "expectation": "blocked", "expansion": "default", "context_nesting": "top-level", "opt_in_method": ["no-opt-in", "http-csp", "meta-csp"], "source_scheme": "https", "subresource": {"blockable": "websocket-request", "optionally-blockable": []}}], "description": "Test behavior of blockable content.", "specification_url": "http://www.w3.org/TR/mixed-content/#category-blockable", "name": "blockable", "title": "Blockable content"}, {"test_expansion": [{"origin": ["same-host-https"], "name": "allowed", "redirection": ["no-redirect", "keep-scheme-redirect"], "expectation": "allowed", "expansion": "default", "context_nesting": "top-level", "opt_in_method": "*", "source_scheme": "https", "subresource": {"blockable": "*", "optionally-blockable": "*"}}, {"origin": ["same-host-wss"], "name": "websocket-allowed", "redirection": ["no-redirect", "keep-scheme-redirect"], "expectation": "allowed", "expansion": "default", "context_nesting": "top-level", "opt_in_method": "*", "source_scheme": "https", "subresource": {"blockable": "websocket-request", "optionally-blockable": []}}], "description": "Test behavior of allowed content.", "specification_url": "http://www.w3.org/TR/mixed-content/", "name": "allowed", "title": "Allowed content"}], "excluded_tests": [{"origin": "*", "name": "Redundant-subresources", "redirection": "*", "expectation": "*", "expansion": "*", "context_nesting": "*", "opt_in_method": "*", "source_scheme": "*", "subresource": {"blockable": ["a-tag"], "optionally-blockable": []}}, {"origin": ["same-host-https", "same-host-http", "cross-origin-https", "cross-origin-http"], "name": "Skip-origins-not-applicable-to-websockets", "redirection": "*", "expectation": "*", "expansion": "*", "context_nesting": "*", "opt_in_method": "*", "source_scheme": "*", "subresource": {"blockable": ["websocket-request"], "optionally-blockable": []}}, {"origin": "*", "name": "TODO-opt-in-method-img-cross-origin", "redirection": "*", "expectation": "*", "expansion": "*", "context_nesting": "*", "opt_in_method": "img-crossorigin", "source_scheme": "*", "subresource": {"blockable": "*", "optionally-blockable": "*"}}, {"origin": "*", "name": "Skip-redundant-for-opt-in-method", "redirection": ["keep-scheme-redirect", "swap-scheme-redirect"], "expectation": "*", "expansion": "*", "context_nesting": "*", "opt_in_method": ["meta-csp", "img-crossorigin"], "source_scheme": "*", "subresource": {"blockable": "*", "optionally-blockable": "*"}}]}; diff --git a/tests/wpt/web-platform-tests/performance-timeline/po-disconnect.html b/tests/wpt/web-platform-tests/performance-timeline/po-disconnect.html index e347c1d31bc..dff39cfaaaa 100644 --- a/tests/wpt/web-platform-tests/performance-timeline/po-disconnect.html +++ b/tests/wpt/web-platform-tests/performance-timeline/po-disconnect.html @@ -3,6 +3,7 @@ PerformanceObservers: disconnect +

PerformanceObservers: disconnect

-

Invalid referrerpolicy attribute value

+

Invalid referrerPolicy attribute value

Running...
diff --git a/tests/wpt/web-platform-tests/resources/docs/api.md b/tests/wpt/web-platform-tests/resources/docs/api.md index 1405cfdfecf..1f50c73a6ee 100644 --- a/tests/wpt/web-platform-tests/resources/docs/api.md +++ b/tests/wpt/web-platform-tests/resources/docs/api.md @@ -160,7 +160,7 @@ previous Promise Test finishes. `promise_rejects` can be used to test Promises that need to reject: ```js -promise_rejects(test_object, code, promise) +promise_rejects(test_object, code, promise, description) ``` The `code` argument is equivalent to the same argument to the `assert_throws` diff --git a/tests/wpt/web-platform-tests/resources/testharness.js b/tests/wpt/web-platform-tests/resources/testharness.js index b2198b0f1b2..52b65ddf19c 100644 --- a/tests/wpt/web-platform-tests/resources/testharness.js +++ b/tests/wpt/web-platform-tests/resources/testharness.js @@ -540,9 +540,9 @@ policies and contribution forms [3]. }); } - function promise_rejects(test, expected, promise) { - return promise.then(test.unreached_func("Should have rejected.")).catch(function(e) { - assert_throws(expected, function() { throw e }); + function promise_rejects(test, expected, promise, description) { + return promise.then(test.unreached_func("Should have rejected: " + description)).catch(function(e) { + assert_throws(expected, function() { throw e }, description); }); } diff --git a/tests/wpt/web-platform-tests/secure-contexts/basic-popup-and-iframe-tests.html b/tests/wpt/web-platform-tests/secure-contexts/basic-popup-and-iframe-tests.html new file mode 100644 index 00000000000..ab3c4436787 --- /dev/null +++ b/tests/wpt/web-platform-tests/secure-contexts/basic-popup-and-iframe-tests.html @@ -0,0 +1,25 @@ + + + + + Test Window.isSecureContext for HTTP creator + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/secure-contexts/basic-popup-and-iframe-tests.https.html b/tests/wpt/web-platform-tests/secure-contexts/basic-popup-and-iframe-tests.https.html new file mode 100644 index 00000000000..a9c7f3c883d --- /dev/null +++ b/tests/wpt/web-platform-tests/secure-contexts/basic-popup-and-iframe-tests.https.html @@ -0,0 +1,16 @@ + + + + + Test Window.isSecureContext for HTTPS creator + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/secure-contexts/basic-popup-and-iframe-tests.https.js b/tests/wpt/web-platform-tests/secure-contexts/basic-popup-and-iframe-tests.https.js new file mode 100644 index 00000000000..93b5e2b3187 --- /dev/null +++ b/tests/wpt/web-platform-tests/secure-contexts/basic-popup-and-iframe-tests.https.js @@ -0,0 +1,279 @@ + +/** + * This test checks the Secure Context state of documents for various + * permutations of document URI types and loading methods. + * + * The hierarchy that is tested is: + * + * creator-doc > createe-doc + * + * The creator-doc is one of: + * + * http: + * https: + * + * The createe-doc is loaded as either a: + * + * popup + * iframe + * sandboxed-iframe + * + * into which we load and test: + * + * http: + * https: + * blob: + * javascript: + * about:blank + * initial about:blank + * srcdoc + * + * TODO once web-platform-tests supports it: + * - test http://localhost + * - test file: + * + * TODO once https://github.com/w3c/webappsec-secure-contexts/issues/26 is resolved + * - test data: + */ + + +setup({explicit_done:true}); + + +const host_and_dirname = location.host + + location.pathname.substr(0, location.pathname.lastIndexOf("/") + 1); + + +// Flags to indicate where document types should be loaded for testing: +const eLoadInPopup = (1 << 0); +const eLoadInUnsandboxedIframe = (1 << 1); +const eLoadInSandboxedIframe = (1 << 2); +const eLoadInEverything = eLoadInPopup | eLoadInUnsandboxedIframe | eLoadInSandboxedIframe; + +// Flags indicating if a document type is expected to be a Secure Context: +const eSecureNo = 1; +const eSecureIfCreatorSecure = 2; + +// Flags indicating how the result of a test is obtained: +const eResultFromPostMessage = 1; +const eResultFromExaminationOnLoad = 2; +const eResultFromExaminationSync = 3; + + +const loadTypes = [ + new LoadType("an http: URI", + eLoadInEverything, + http_dir + "postMessage-helper.html", + eSecureNo, + eResultFromPostMessage), + new LoadType("an https: URI", + eLoadInEverything, + https_dir + "postMessage-helper.https.html", + eSecureIfCreatorSecure, + eResultFromPostMessage), + new LoadType("a blob: URI", + eLoadInEverything, + URL.createObjectURL(new Blob([""])), + eSecureIfCreatorSecure, + eResultFromPostMessage), + new LoadType("a srcdoc", + // popup not relevant: + eLoadInUnsandboxedIframe | eLoadInSandboxedIframe, + "", + eSecureIfCreatorSecure, + eResultFromPostMessage), + new LoadType("a javascript: URI", + // can't load in sandbox: + eLoadInUnsandboxedIframe | eLoadInPopup, + "javascript:(opener||parent).postMessage(isSecureContext, '*')", + eSecureIfCreatorSecure, + eResultFromPostMessage), + new LoadType("about:blank", + // can't obtain state if sandboxed: + eLoadInUnsandboxedIframe | eLoadInPopup, + "about:blank", + eSecureIfCreatorSecure, + eResultFromExaminationOnLoad), + new LoadType("initial about:blank", + // can't obtain state if sandboxed: + eLoadInUnsandboxedIframe | eLoadInPopup, + "about:blank", // we don't wait for this to load, so whatever + eSecureIfCreatorSecure, + eResultFromExaminationSync), +]; + +const loadTargets = [ + new LoadTarget("an iframe", eLoadInUnsandboxedIframe), + new LoadTarget("a sandboxed iframe", eLoadInSandboxedIframe), + new LoadTarget("a popup", eLoadInPopup), +]; + + +function LoadType(description, loadInFlags, uri, expectedSecureFlag, resultFrom) { + this.desc = description; + this.loadInFlags = loadInFlags; + this.uri = uri; + this.expectedSecureFlag = expectedSecureFlag; + this.resultFrom = resultFrom; +} + + +function LoadTarget(description, loadInFlag) { + this.desc = description; + this.loadInFlag = loadInFlag; +} + +LoadTarget.prototype.open = function(loadType) { + let loadTarget = this; + this.currentTest.step(function() { + assert_true((loadTarget.loadInFlag & loadType.loadInFlags) != 0, + loadType.desc + " cannot be tested in " + loadTarget.desc); + }); + if (this.loadInFlag == eLoadInUnsandboxedIframe) { + let iframe = document.createElement("iframe"); + document.body.appendChild(iframe); + iframe[loadType.desc == "a srcdoc" ? "srcdoc" : "src"] = loadType.uri; + return iframe; + } + if (this.loadInFlag == eLoadInSandboxedIframe) { + let iframe = document.body.appendChild(document.createElement("iframe")); + iframe.setAttribute("sandbox", "allow-scripts"); + iframe[loadType.desc == "a srcdoc" ? "srcdoc" : "src"] = loadType.uri; + return iframe; + } + if (this.loadInFlag == eLoadInPopup) { + return window.open(loadType.uri); + } + this.currentTest.step(function() { + assert_unreached("Unknown load type flag: " + loadInFlags); + }); + return null; +} + +LoadTarget.prototype.close = function(domTarget) { + if (this.loadInFlag == eLoadInUnsandboxedIframe || + this.loadInFlag == eLoadInSandboxedIframe) { + domTarget.remove(); + return; + } + if (this.loadInFlag == eLoadInPopup) { + domTarget.close(); + return; + } + this.currentTest.step(function() { + assert_unreached("Unknown load type flag: " + loadInFlags); + }); +} + +LoadTarget.prototype.load_and_get_result_for = function(loadType) { + if (!(loadType.loadInFlags & this.loadInFlag)) { + return Promise.reject("not applicable"); + } + if (!(this.loadInFlag & eLoadInPopup) && + location.protocol == "https:" && + loadType.uri.substr(0,5) == "http:") { + // Mixed content blocker will prevent this load + return Promise.reject("not applicable"); + } + this.currentTest = async_test("Test Window.isSecureContext in " + this.desc + + " loading " + loadType.desc) + if (loadType.resultFrom == eResultFromExaminationSync) { + let domTarget = this.open(loadType); + let result = domTarget instanceof Window ? + domTarget.isSecureContext : domTarget.contentWindow.isSecureContext; + this.close(domTarget); + return Promise.resolve(result); + } + let target = this; + if (loadType.resultFrom == eResultFromExaminationOnLoad) { + return new Promise(function(resolve, reject) { + function handleLoad(event) { + let result = domTarget instanceof Window ? + domTarget.isSecureContext : domTarget.contentWindow.isSecureContext; + domTarget.removeEventListener("load", handleLoad); + target.close(domTarget); + resolve(result); + } + let domTarget = target.open(loadType); + domTarget.addEventListener("load", handleLoad, false); + }); + } + if (loadType.resultFrom == eResultFromPostMessage) { + return new Promise(function(resolve, reject) { + function handleMessage(event) { + window.removeEventListener("message", handleMessage); + target.close(domTarget); + resolve(event.data); + } + window.addEventListener("message", handleMessage, false); + let domTarget = target.open(loadType); + }); + } + return Promise.reject("unexpected 'result from' type"); +} + + +let current_type_index = -1; +let current_target_index = 0; + +function run_next_test() { + current_type_index++; + if (current_type_index >= loadTypes.length) { + current_type_index = 0; + current_target_index++; + if (current_target_index >= loadTargets.length) { + done(); + return; // all test permutations complete + } + } + let loadTarget = loadTargets[current_target_index]; + let loadType = loadTypes[current_type_index]; + loadTarget.load_and_get_result_for(loadType).then( + function(value) { + run_next_test_soon(); + loadTarget.currentTest.step(function() { + if (loadType.expectedSecureFlag == eSecureNo) { + assert_false(value, loadType.desc + " in " + loadTarget.desc + " should not create a Secure Context"); + } else if (loadType.expectedSecureFlag == eSecureIfCreatorSecure) { + if (!window.isSecureContext) { + assert_false(value, loadType.desc + " in " + loadTarget.desc + " should not create a Secure Context when its creator is not a Secure Context."); + } else { + assert_true(value, loadType.desc + " in " + loadTarget.desc + " should create a Secure Context when its creator is a Secure Context"); + } + } else { + assert_unreached(loadType.desc + " - unknown expected secure flag: " + expectedSecureFlag); + } + loadTarget.currentTest.done(); + }); + }, + function(failReason) { + run_next_test_soon(); + if (failReason == "not applicable") { + return; + } + loadTarget.currentTest.step(function() { + assert_unreached(loadType.desc + " - got unexpected rejected promise"); + }); + } + ); +} + +function run_next_test_soon() { + setTimeout(run_next_test, 0); +} + +function begin() { + test(function() { + if (location.protocol == "http:") { + assert_false(isSecureContext, + "http: creator should not be a Secure Context"); + } else if (location.protocol == "https:") { + assert_true(isSecureContext, + "https: creator should be a Secure Context"); + } else { + assert_unreached("Unknown location.protocol"); + } + }); + run_next_test(); +} + diff --git a/tests/wpt/web-platform-tests/secure-contexts/postMessage-helper.html b/tests/wpt/web-platform-tests/secure-contexts/postMessage-helper.html new file mode 100644 index 00000000000..8971c86b279 --- /dev/null +++ b/tests/wpt/web-platform-tests/secure-contexts/postMessage-helper.html @@ -0,0 +1 @@ + diff --git a/tests/wpt/web-platform-tests/secure-contexts/postMessage-helper.https.html b/tests/wpt/web-platform-tests/secure-contexts/postMessage-helper.https.html new file mode 100644 index 00000000000..8971c86b279 --- /dev/null +++ b/tests/wpt/web-platform-tests/secure-contexts/postMessage-helper.https.html @@ -0,0 +1 @@ + diff --git a/tests/wpt/web-platform-tests/secure-contexts/server-locations.sub.js b/tests/wpt/web-platform-tests/secure-contexts/server-locations.sub.js new file mode 100644 index 00000000000..46754b631e6 --- /dev/null +++ b/tests/wpt/web-platform-tests/secure-contexts/server-locations.sub.js @@ -0,0 +1,6 @@ +var https_dir = "https://{{location[hostname]}}:{{ports[https][0]}}{{location[path]}}"; +https_dir = https_dir.substr(0, https_dir.lastIndexOf("/") + 1); + +var http_dir = "http://{{location[hostname]}}:{{ports[http][0]}}{{location[path]}}"; +http_dir = http_dir.substr(0, http_dir.lastIndexOf("/") + 1); + diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event-redirect.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event-redirect.https.html index 556d04413fa..23bb85612c9 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event-redirect.https.html +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event-redirect.https.html @@ -65,6 +65,7 @@ function redirect_fetch_test(t, test) { url: url, request_init: test.request_init, redirect_dest: test.redirect_dest, + expected_type: test.expected_type, }, '*', [channel.port2]); }); @@ -225,12 +226,10 @@ async_test(function(t) { redirect: 'manual', mode: 'no-cors' }, - // should reject because only navigations can be intercepted with - // opaqueredirect responses - should_reject: true + should_reject: false }); }, 'Non-navigation, manual redirect, no-cors mode Request redirected to ' + - 'no-cors without credentials should fail opaqueredirect interception'); + 'no-cors without credentials should succeed interception'); async_test(function(t) { redirect_fetch_test(t, { @@ -242,12 +241,10 @@ async_test(function(t) { redirect: 'manual', mode: 'no-cors' }, - // should reject because only navigations can be intercepted with - // opaqueredirect responses - should_reject: true + should_reject: false }); }, 'Non-navigation, manual redirect, no-cors mode Request redirected to ' + - 'cors without credentials should fail opaqueredirect interception'); + 'cors without credentials should succeed interception'); async_test(function(t) { redirect_fetch_test(t, { @@ -378,12 +375,10 @@ async_test(function(t) { redirect: 'manual', mode: 'no-cors' }, - // should reject because only navigations can be intercepted with - // opaqueredirect responses - should_reject: true + should_reject: false }); }, 'Non-navigation, manual redirect, no-cors mode Request redirected to ' + - 'no-cors with credentials should fail opaqueredirect interception'); + 'no-cors with credentials should succeed interception'); async_test(function(t) { redirect_fetch_test(t, { @@ -395,12 +390,10 @@ async_test(function(t) { redirect: 'manual', mode: 'no-cors' }, - // should reject because only navigations can be intercepted with - // opaqueredirect responses - should_reject: true + should_reject: false }); }, 'Non-navigation, manual redirect, no-cors mode Request redirected to ' + - 'cors with credentials should fail opaqueredirect interception'); + 'cors with credentials should succeed interception'); async_test(function(t) { redirect_fetch_test(t, { diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event.https.html index 4d7e9a4da1b..cbb842d2c76 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event.https.html +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event.https.html @@ -114,27 +114,27 @@ function run_referrer_policy_tests(frame, referrer, href, origin) { 'ReferrerPolicy: no-referrer-when-downgrade', 'Service Worker should respond to fetch with no referrer with ""'); return frame.contentWindow.fetch('resources/simple.html?referrerFull', - {referrerPolicy: "origin-only", referrer: referrer}); + {referrerPolicy: "origin", referrer: referrer}); }) .then(function(response) { return response.text(); }) .then(function(response_text) { assert_equals( response_text, 'Referrer: ' + origin + '/' + '\n' + - 'ReferrerPolicy: origin-only', - 'Service Worker should respond to fetch with the referrer origin with "origin-only" and a same origin request'); + 'ReferrerPolicy: origin', + 'Service Worker should respond to fetch with the referrer origin with "origin" and a same origin request'); var http_url = get_host_info()['HTTP_ORIGIN'] + base_path() + '/resources/simple.html?referrerFull'; return frame.contentWindow.fetch(http_url, - {referrerPolicy: "origin-only", referrer: referrer}); + {referrerPolicy: "origin", referrer: referrer}); }) .then(function(response) { return response.text(); }) .then(function(response_text) { assert_equals( response_text, 'Referrer: ' + origin + '/' + '\n' + - 'ReferrerPolicy: origin-only', - 'Service Worker should respond to fetch with the referrer origin with "origin-only" and a cross origin request'); + 'ReferrerPolicy: origin', + 'Service Worker should respond to fetch with the referrer origin with "origin" and a cross origin request'); return frame.contentWindow.fetch('resources/simple.html?referrerFull', {referrerPolicy: "origin-when-cross-origin", referrer: referrer}); }) diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-request-css-images.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-request-css-images.https.html index cbce7f19d71..777308241e4 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-request-css-images.https.html +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-request-css-images.https.html @@ -5,95 +5,172 @@ diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-request-resources.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-request-resources.https.html index 061add6f167..0584cafb075 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-request-resources.https.html +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-request-resources.https.html @@ -109,16 +109,14 @@ async_test(function(t) { .then(function(f) { frame = f; - // TODO: Disable 'no-cors' tests for image until - // AsyncOpen2 and cookie policy is supported. - // image_test(f, LOCAL_URL, '', 'no-cors', 'include'); - // image_test(f, REMOTE_URL, '', 'no-cors', 'include'); + image_test(f, LOCAL_URL, '', 'no-cors', 'include'); + image_test(f, REMOTE_URL, '', 'no-cors', 'include'); css_test(f, LOCAL_URL, '', 'no-cors', 'include'); css_test(f, REMOTE_URL, '', 'no-cors', 'include'); image_test(f, LOCAL_URL, 'anonymous', 'cors', 'same-origin'); image_test(f, LOCAL_URL, 'use-credentials', 'cors', 'include'); - image_test(f, REMOTE_URL, 'anonymous', 'cors', 'omit'); + image_test(f, REMOTE_URL, 'anonymous', 'cors', 'same-origin'); image_test(f, REMOTE_URL, 'use-credentials', 'cors', 'include'); script_test(f, LOCAL_URL, '', 'no-cors', 'include'); diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/navigate-window.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/navigate-window.https.html new file mode 100644 index 00000000000..e3aaf4c5cd4 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/navigate-window.https.html @@ -0,0 +1,141 @@ + +Service Worker: Navigate a Window + + + + + + + diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-canvas-tainting-iframe.html b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-canvas-tainting-iframe.html index 0bd6b6f07c3..3822971e80a 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-canvas-tainting-iframe.html +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-canvas-tainting-iframe.html @@ -210,6 +210,14 @@ window.addEventListener('message', function(evt) { encodeURIComponent(remote_image_url + '&ACAOrigin=' + host_info['HTTPS_ORIGIN']), '', + LOAD_ERROR), // We expect LOAD_ERROR since the server doesn't respond + // with an Access-Control-Allow-Credentials header. + create_test_promise( + image_url + + '&mode=cors&credentials=same-origin&url=' + + encodeURIComponent(remote_image_url + + '&ACAOrigin=' + host_info['HTTPS_ORIGIN']), + '', NOT_TAINTED), create_test_promise( image_url + @@ -240,9 +248,18 @@ window.addEventListener('message', function(evt) { encodeURIComponent(remote_image_url + '&ACAOrigin=' + host_info['HTTPS_ORIGIN']), '', - TAINTED), // We expect TAINTED since the default origin behavior here - // is taint, and it doesn't matter what kind of fetch the - // SW performs. + LOAD_ERROR), // We expect LOAD_ERROR since the server doesn't respond + // with an Access-Control-Allow-Credentials header. + create_test_promise( + remote_image_url + + '&mode=cors&credentials=same-origin&url=' + + encodeURIComponent(remote_image_url + + '&ACAOrigin=' + host_info['HTTPS_ORIGIN']), + '', + TAINTED), // The cross-origin no-cors request is immediately tainted. + // Since this happens before the service worker interception, + // it does not matter what kind of response it returns. + // The result will always be tainted. create_test_promise( remote_image_url + '&mode=cors&url=' + diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-event-redirect-iframe.html b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-event-redirect-iframe.html index 499e9677569..fbe3bda8471 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-event-redirect-iframe.html +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-event-redirect-iframe.html @@ -4,10 +4,11 @@ window.addEventListener('message', function(evt) { var data = evt.data; fetch(new Request(data.url, data.request_init)).then(function(response) { if (data.request_init.mode === 'no-cors' && data.redirect_dest != 'same-origin') { - if (response.type === 'opaque') { + if (response.type === data.expected_type && + (response.type === 'opaque' || response.type === 'opaqueredirect')) { return {result: 'success', detail: ''}; } else { - return {result: 'failure', detail: 'expected opaque response'}; + return {result: 'failure', detail: 'expected ' + data.expected_type + ' response'}; } } return response.json(); diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/loaded.html b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/loaded.html new file mode 100644 index 00000000000..0cabce69f8e --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/loaded.html @@ -0,0 +1,9 @@ + diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/navigate-window-worker.js b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/navigate-window-worker.js new file mode 100644 index 00000000000..f9617439fc6 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/navigate-window-worker.js @@ -0,0 +1,21 @@ +addEventListener('message', function(evt) { + if (evt.data.type === 'GET_CLIENTS') { + clients.matchAll(evt.data.opts).then(function(clientList) { + var resultList = clientList.map(function(c) { + return { url: c.url, frameType: c.frameType, id: c.id }; + }); + evt.source.postMessage({ type: 'success', detail: resultList }); + }).catch(function(err) { + evt.source.postMessage({ + type: 'failure', + detail: 'matchAll() rejected with "' + err + '"' + }); + }); + return; + } + + evt.source.postMessage({ + type: 'failure', + detail: 'Unexpected message type "' + evt.data.type + '"' + }); +}); diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/update-recovery-worker.py b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/update-recovery-worker.py new file mode 100644 index 00000000000..8aaa5ca9344 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/update-recovery-worker.py @@ -0,0 +1,25 @@ +def main(request, response): + # Set mode to 'init' for initial fetch. + mode = 'init' + if 'update-recovery-mode' in request.cookies: + mode = request.cookies['update-recovery-mode'].value + + # no-cache itself to ensure the user agent finds a new version for each update. + headers = [('Cache-Control', 'no-cache, must-revalidate'), + ('Pragma', 'no-cache')] + + extra_body = '' + + if mode == 'init': + # Install a bad service worker that will break the controlled + # document navigation. + response.set_cookie('update-recovery-mode', 'bad') + extra_body = "addEventListener('fetch', function(e) { e.respondWith(Promise.reject()); });" + elif mode == 'bad': + # When the update tries to pull the script again, update to + # a worker service worker that does not break document + # navigation. Serve the same script from then on. + response.delete_cookie('update-recovery-mode') + + headers.append(('Content-Type', 'application/javascript')) + return headers, '%s' % (extra_body) diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/update-recovery.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/update-recovery.https.html new file mode 100644 index 00000000000..3b3d955b142 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/update-recovery.https.html @@ -0,0 +1,71 @@ + +Service Worker: recovery by navigation update + + + + + diff --git a/tests/wpt/web-platform-tests/streams/readable-streams/bad-strategies.https.html b/tests/wpt/web-platform-tests/streams/readable-streams/bad-strategies.https.html index 4fab9313239..6613ab7fbb9 100644 --- a/tests/wpt/web-platform-tests/streams/readable-streams/bad-strategies.https.html +++ b/tests/wpt/web-platform-tests/streams/readable-streams/bad-strategies.https.html @@ -2,7 +2,7 @@ - + diff --git a/tests/wpt/web-platform-tests/streams/readable-streams/bad-underlying-sources.https.html b/tests/wpt/web-platform-tests/streams/readable-streams/bad-underlying-sources.https.html index ecb11feab12..2b779761aa8 100644 --- a/tests/wpt/web-platform-tests/streams/readable-streams/bad-underlying-sources.https.html +++ b/tests/wpt/web-platform-tests/streams/readable-streams/bad-underlying-sources.https.html @@ -2,7 +2,7 @@ - + diff --git a/tests/wpt/web-platform-tests/streams/readable-streams/brand-checks.https.html b/tests/wpt/web-platform-tests/streams/readable-streams/brand-checks.https.html index 9dfed123d76..ef5f326e3fb 100644 --- a/tests/wpt/web-platform-tests/streams/readable-streams/brand-checks.https.html +++ b/tests/wpt/web-platform-tests/streams/readable-streams/brand-checks.https.html @@ -2,7 +2,7 @@ - + diff --git a/tests/wpt/web-platform-tests/streams/readable-streams/cancel.https.html b/tests/wpt/web-platform-tests/streams/readable-streams/cancel.https.html index f767429f170..e43c6200adc 100644 --- a/tests/wpt/web-platform-tests/streams/readable-streams/cancel.https.html +++ b/tests/wpt/web-platform-tests/streams/readable-streams/cancel.https.html @@ -2,7 +2,7 @@ - + diff --git a/tests/wpt/web-platform-tests/streams/readable-streams/count-queuing-strategy-integration.https.html b/tests/wpt/web-platform-tests/streams/readable-streams/count-queuing-strategy-integration.https.html index bc38166c303..a281f047368 100644 --- a/tests/wpt/web-platform-tests/streams/readable-streams/count-queuing-strategy-integration.https.html +++ b/tests/wpt/web-platform-tests/streams/readable-streams/count-queuing-strategy-integration.https.html @@ -2,7 +2,7 @@ - + diff --git a/tests/wpt/web-platform-tests/streams/readable-streams/garbage-collection.https.html b/tests/wpt/web-platform-tests/streams/readable-streams/garbage-collection.https.html index a38ed20534c..9215eb7dae8 100644 --- a/tests/wpt/web-platform-tests/streams/readable-streams/garbage-collection.https.html +++ b/tests/wpt/web-platform-tests/streams/readable-streams/garbage-collection.https.html @@ -2,7 +2,7 @@ - + diff --git a/tests/wpt/web-platform-tests/streams/readable-streams/general.https.html b/tests/wpt/web-platform-tests/streams/readable-streams/general.https.html index f5241ffe8f0..465271a9bd6 100644 --- a/tests/wpt/web-platform-tests/streams/readable-streams/general.https.html +++ b/tests/wpt/web-platform-tests/streams/readable-streams/general.https.html @@ -2,7 +2,7 @@ - + diff --git a/tests/wpt/web-platform-tests/streams/readable-streams/pipe-through.https.html b/tests/wpt/web-platform-tests/streams/readable-streams/pipe-through.https.html index 62d98d45af4..fbac05a1b5b 100644 --- a/tests/wpt/web-platform-tests/streams/readable-streams/pipe-through.https.html +++ b/tests/wpt/web-platform-tests/streams/readable-streams/pipe-through.https.html @@ -2,7 +2,7 @@ - + diff --git a/tests/wpt/web-platform-tests/streams/readable-streams/readable-stream-reader.https.html b/tests/wpt/web-platform-tests/streams/readable-streams/readable-stream-reader.https.html index df0db11d1bc..cc561351800 100644 --- a/tests/wpt/web-platform-tests/streams/readable-streams/readable-stream-reader.https.html +++ b/tests/wpt/web-platform-tests/streams/readable-streams/readable-stream-reader.https.html @@ -2,7 +2,7 @@ - + diff --git a/tests/wpt/web-platform-tests/streams/readable-streams/tee.https.html b/tests/wpt/web-platform-tests/streams/readable-streams/tee.https.html index 02c847b8117..37c3e8d82d7 100644 --- a/tests/wpt/web-platform-tests/streams/readable-streams/tee.https.html +++ b/tests/wpt/web-platform-tests/streams/readable-streams/tee.https.html @@ -2,7 +2,7 @@ - + diff --git a/tests/wpt/web-platform-tests/streams/readable-streams/templated.https.html b/tests/wpt/web-platform-tests/streams/readable-streams/templated.https.html index 95c6a6acaef..7719eee164f 100644 --- a/tests/wpt/web-platform-tests/streams/readable-streams/templated.https.html +++ b/tests/wpt/web-platform-tests/streams/readable-streams/templated.https.html @@ -2,7 +2,7 @@ - + diff --git a/tests/wpt/web-platform-tests/web-animations/animatable/animate.html b/tests/wpt/web-platform-tests/web-animations/animatable/animate.html index e3838eb0cb6..71aa6e16d2f 100644 --- a/tests/wpt/web-platform-tests/web-animations/animatable/animate.html +++ b/tests/wpt/web-platform-tests/web-animations/animatable/animate.html @@ -1,62 +1,55 @@ Animatable.animate tests - - + +
diff --git a/tests/wpt/web-platform-tests/web-animations/animation/finish.html b/tests/wpt/web-platform-tests/web-animations/animation/finish.html index 35bd7b0d0b0..811923c6798 100644 --- a/tests/wpt/web-platform-tests/web-animations/animation/finish.html +++ b/tests/wpt/web-platform-tests/web-animations/animation/finish.html @@ -96,11 +96,10 @@ promise_test(function(t) { assert_equals(animation.playState, 'finished', 'The play state of a paused animation should become ' + '"finished" after finish() is called'); - assert_approx_equals(animation.startTime, - animation.timeline.currentTime - 100 * MS_PER_SEC, - 0.0001, - 'The start time of a paused animation should be set ' + - 'after calling finish()'); + assert_times_equal(animation.startTime, + animation.timeline.currentTime - 100 * MS_PER_SEC, + 'The start time of a paused animation should be set ' + + 'after calling finish()'); }); }, 'Test finish() while paused'); @@ -117,11 +116,10 @@ test(function(t) { assert_equals(animation.playState, 'finished', 'The play state of a pause-pending animation should become ' + '"finished" after finish() is called'); - assert_approx_equals(animation.startTime, - animation.timeline.currentTime - 100 * MS_PER_SEC / 2, - 0.0001, - 'The start time of a pause-pending animation should ' + - 'be set after calling finish()'); + assert_times_equal(animation.startTime, + animation.timeline.currentTime - 100 * MS_PER_SEC / 2, + 'The start time of a pause-pending animation should ' + + 'be set after calling finish()'); }, 'Test finish() while pause-pending with positive playbackRate'); test(function(t) { @@ -148,11 +146,10 @@ test(function(t) { assert_equals(animation.playState, 'finished', 'The play state of a play-pending animation should become ' + '"finished" after finish() is called'); - assert_approx_equals(animation.startTime, - animation.timeline.currentTime - 100 * MS_PER_SEC / 0.5, - 0.0001, - 'The start time of a play-pending animation should ' + - 'be set after calling finish()'); + assert_times_equal(animation.startTime, + animation.timeline.currentTime - 100 * MS_PER_SEC / 0.5, + 'The start time of a play-pending animation should ' + + 'be set after calling finish()'); }, 'Test finish() while play-pending'); // FIXME: Add a test for when we are play-pending without an active timeline. @@ -206,5 +203,45 @@ promise_test(function(t) { 'Animation.finish()'); }); }, 'Test finish() resolves finished promise synchronously'); + +promise_test(function(t) { + var effect = new KeyframeEffectReadOnly(null, gKeyFrames, 100 * MS_PER_SEC); + var animation = new Animation(effect, document.timeline); + var resolvedFinished = false; + animation.finished.then(function() { + resolvedFinished = true; + }); + + return animation.ready.then(function() { + animation.finish(); + }).then(function() { + assert_true(resolvedFinished, + 'Animation.finished should be resolved soon after ' + + 'Animation.finish()'); + }); +}, 'Test finish() resolves finished promise synchronously with an animation ' + + 'without a target'); + +promise_test(function(t) { + var effect = new KeyframeEffectReadOnly(null, gKeyFrames, 100 * MS_PER_SEC); + var animation = new Animation(effect, document.timeline); + animation.play(); + + var resolvedFinished = false; + animation.finished.then(function() { + resolvedFinished = true; + }); + + return animation.ready.then(function() { + animation.currentTime = animation.effect.getComputedTiming().endTime - 1; + return waitForAnimationFrames(2); + }).then(function() { + assert_true(resolvedFinished, + 'Animation.finished should be resolved soon after ' + + 'Animation finishes normally'); + }); +}, 'Test normally finished animation resolves finished promise synchronously ' + + 'with an animation without a target'); + diff --git a/tests/wpt/web-platform-tests/web-animations/animation/startTime.html b/tests/wpt/web-platform-tests/web-animations/animation/startTime.html new file mode 100644 index 00000000000..642f8e10508 --- /dev/null +++ b/tests/wpt/web-platform-tests/web-animations/animation/startTime.html @@ -0,0 +1,49 @@ + + +Animation.startTime tests + + + + + + +
+ + diff --git a/tests/wpt/web-platform-tests/web-animations/document/getAnimations.html b/tests/wpt/web-platform-tests/web-animations/document/getAnimations.html new file mode 100644 index 00000000000..a2a3352cbcd --- /dev/null +++ b/tests/wpt/web-platform-tests/web-animations/document/getAnimations.html @@ -0,0 +1,55 @@ + + +document.getAnimations tests + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/web-animations/keyframe-effect/constructor.html b/tests/wpt/web-platform-tests/web-animations/keyframe-effect/constructor.html index c14d74fa994..4acffcbf296 100644 --- a/tests/wpt/web-platform-tests/web-animations/keyframe-effect/constructor.html +++ b/tests/wpt/web-platform-tests/web-animations/keyframe-effect/constructor.html @@ -1,11 +1,11 @@ KeyframeEffectReadOnly constructor tests - - + +
@@ -19,28 +19,6 @@ var target = document.getElementById("target"); -function assert_frames_equal(a, b, name) { - assert_equals(Object.keys(a).sort().toString(), - Object.keys(b).sort().toString(), - "properties on " + name); - for (var p in a) { - assert_equals(a[p], b[p], "value for '" + p + "' on " + name); - } -} - -function assert_frame_lists_equal(a, b) { - assert_equals(a.length, b.length, "number of frames"); - for (var i = 0; i < Math.min(a.length, b.length); i++) { - assert_frames_equal(a[i], b[i], "ComputedKeyframe #" + i); - } -} - -var gEmptyKeyframeListTests = [ - [], - null, - undefined, -]; - test(function(t) { gEmptyKeyframeListTests.forEach(function(frames) { assert_equals(new KeyframeEffectReadOnly(target, frames).getFrames().length, @@ -48,14 +26,6 @@ test(function(t) { }); }, "a KeyframeEffectReadOnly can be constructed with no frames"); -// [specified easing value, expected easing value] -var gEasingValueTests = [ - ["linear", "linear"], - ["ease-in-out", "ease-in-out"], - ["Ease\\2d in-out", "ease-in-out"], - ["ease /**/", "ease"], -]; - test(function(t) { gEasingValueTests.forEach(function(subtest) { var easing = subtest[0]; @@ -97,18 +67,6 @@ test(function(t) { }, "easing values are parsed correctly when passed to the " + "KeyframeEffectReadOnly constructor in KeyframeTimingOptions"); -var gGoodKeyframeCompositeValueTests = [ - "replace", "add", "accumulate", undefined -]; - -var gGoodOptionsCompositeValueTests = [ - "replace", "add", "accumulate" -]; - -var gBadCompositeValueTests = [ - "unrecognised", "replace ", "Replace", null -]; - test(function(t) { var getFrame = function(composite) { return { left: [ "10px", "20px" ], composite: composite }; @@ -120,8 +78,8 @@ test(function(t) { }); gBadCompositeValueTests.forEach(function(composite) { assert_throws(new TypeError, function() { - new KeyframeEffectReadOnly(target, getFrame(composite)); - }); + new KeyframeEffectReadOnly(target, getFrame(composite)); + }); }); }, "composite values are parsed correctly when passed to the " + "KeyframeEffectReadOnly constructor in property-indexed keyframes"); @@ -140,8 +98,8 @@ test(function(t) { }); gBadCompositeValueTests.forEach(function(composite) { assert_throws(new TypeError, function() { - new KeyframeEffectReadOnly(target, getFrames(composite)); - }); + new KeyframeEffectReadOnly(target, getFrames(composite)); + }); }); }, "composite values are parsed correctly when passed to the " + "KeyframeEffectReadOnly constructor in regular keyframes"); @@ -156,130 +114,14 @@ test(function(t) { }); gBadCompositeValueTests.forEach(function(composite) { assert_throws(new TypeError, function() { - new KeyframeEffectReadOnly(target, { - left: ["10px", "20px"] - }, { composite: composite }); - }); + new KeyframeEffectReadOnly(target, { + left: ["10px", "20px"] + }, { composite: composite }); + }); }); }, "composite values are parsed correctly when passed to the " + "KeyframeEffectReadOnly constructor in KeyframeTimingOptions"); -var gPropertyIndexedKeyframesTests = [ - { desc: "a one property two value property-indexed keyframes specification", - input: { left: ["10px", "20px"] }, - output: [{ offset: null, computedOffset: 0, easing: "linear", - left: "10px" }, - { offset: null, computedOffset: 1, easing: "linear", - left: "20px" }] }, - { desc: "a one shorthand property two value property-indexed keyframes" - + " specification", - input: { margin: ["10px", "10px 20px 30px 40px"] }, - output: [{ offset: null, computedOffset: 0, easing: "linear", - margin: "10px" }, - { offset: null, computedOffset: 1, easing: "linear", - margin: "10px 20px 30px 40px" }] }, - { desc: "a two property (one shorthand and one of its longhand components)" - + " two value property-indexed keyframes specification", - input: { marginTop: ["50px", "60px"], - margin: ["10px", "10px 20px 30px 40px"] }, - output: [{ offset: null, computedOffset: 0, easing: "linear", - marginTop: "50px", margin: "10px" }, - { offset: null, computedOffset: 1, easing: "linear", - marginTop: "60px", margin: "10px 20px 30px 40px" }] }, - { desc: "a two property two value property-indexed keyframes specification", - input: { left: ["10px", "20px"], - top: ["30px", "40px"] }, - output: [{ offset: null, computedOffset: 0, easing: "linear", - left: "10px", top: "30px" }, - { offset: null, computedOffset: 1, easing: "linear", - left: "20px", top: "40px" }] }, - { desc: "a two property property-indexed keyframes specification with" - + " different numbers of values", - input: { left: ["10px", "20px", "30px"], - top: ["40px", "50px"] }, - output: [{ offset: null, computedOffset: 0.0, easing: "linear", - left: "10px", top: "40px" }, - { offset: null, computedOffset: 0.5, easing: "linear", - left: "20px" }, - { offset: null, computedOffset: 1.0, easing: "linear", - left: "30px", top: "50px" }] }, - { desc: "a property-indexed keyframes specification with an invalid value", - input: { left: ["10px", "20px", "30px", "40px", "50px"], - top: ["15px", "25px", "invalid", "45px", "55px"] }, - output: [{ offset: null, computedOffset: 0.00, easing: "linear", - left: "10px", top: "15px" }, - { offset: null, computedOffset: 0.25, easing: "linear", - left: "20px", top: "25px" }, - { offset: null, computedOffset: 0.50, easing: "linear", - left: "30px", top: "invalid" }, - { offset: null, computedOffset: 0.75, easing: "linear", - left: "40px", top: "45px" }, - { offset: null, computedOffset: 1.00, easing: "linear", - left: "50px", top: "55px" }] }, - { desc: "a one property two value property-indexed keyframes specification" - + " that needs to stringify its values", - input: { opacity: [0, 1] }, - output: [{ offset: null, computedOffset: 0, easing: "linear", - opacity: "0" }, - { offset: null, computedOffset: 1, easing: "linear", - opacity: "1" }] }, - { desc: "a one property one value property-indexed keyframes specification", - input: { left: ["10px"] }, - output: [{ offset: null, computedOffset: 1, easing: "linear", - left: "10px" }] }, - { desc: "a one property one non-array value property-indexed keyframes" - + " specification", - input: { left: "10px" }, - output: [{ offset: null, computedOffset: 1, easing: "linear", - left: "10px" }] }, - { desc: "a one property two value property-indexed keyframes specification" - + " where the first value is invalid", - input: { left: ["invalid", "10px"] }, - output: [{ offset: null, computedOffset: 0, easing: "linear", - left: "invalid" }, - { offset: null, computedOffset: 1, easing: "linear", - left: "10px" }] }, - { desc: "a one property two value property-indexed keyframes specification" - + " where the second value is invalid", - input: { left: ["10px", "invalid"] }, - output: [{ offset: null, computedOffset: 0, easing: "linear", - left: "10px" }, - { offset: null, computedOffset: 1, easing: "linear", - left: "invalid" }] }, - { desc: "a two property property-indexed keyframes specification where one" - + " property is missing from the first keyframe", - input: [{ offset: 0, left: "10px" }, - { offset: 1, left: "20px", top: "30px" }], - output: [{ offset: 0, computedOffset: 0, easing: "linear", left: "10px" }, - { offset: 1, computedOffset: 1, easing: "linear", - left: "20px", top: "30px" }] }, - { desc: "a two property property-indexed keyframes specification where one" - + " property is missing from the last keyframe", - input: [{ offset: 0, left: "10px", top: "20px" }, - { offset: 1, left: "30px" }], - output: [{ offset: 0, computedOffset: 0, easing: "linear", - left: "10px" , top: "20px" }, - { offset: 1, computedOffset: 1, easing: "linear", - left: "30px" }] }, - { desc: "a property-indexed keyframes specification with repeated values" - + " at offset 0 with different easings", - input: [{ offset: 0.0, left: "100px", easing: "ease" }, - { offset: 0.0, left: "200px", easing: "ease" }, - { offset: 0.5, left: "300px", easing: "linear" }, - { offset: 1.0, left: "400px", easing: "ease-out" }, - { offset: 1.0, left: "500px", easing: "step-end" }], - output: [{ offset: 0.0, computedOffset: 0.0, easing: "ease", - left: "100px" }, - { offset: 0.0, computedOffset: 0.0, easing: "ease", - left: "200px" }, - { offset: 0.5, computedOffset: 0.5, easing: "linear", - left: "300px" }, - { offset: 1.0, computedOffset: 1.0, easing: "ease-out", - left: "400px" }, - { offset: 1.0, computedOffset: 1.0, easing: "step-end", - left: "500px" }] }, -]; - gPropertyIndexedKeyframesTests.forEach(function(subtest) { test(function(t) { var effect = new KeyframeEffectReadOnly(target, subtest.input); @@ -314,208 +156,6 @@ test(function(t) { }, "the KeyframeEffectReadOnly constructor reads keyframe properties in the " + "expected order"); -var gKeyframeSequenceTests = [ - { desc: "a one property two keyframe sequence", - input: [{ offset: 0, left: "10px" }, - { offset: 1, left: "20px" }], - output: [{ offset: 0, computedOffset: 0, easing: "linear", left: "10px" }, - { offset: 1, computedOffset: 1, easing: "linear", left: "20px" }] - }, - { desc: "a two property two keyframe sequence", - input: [{ offset: 0, left: "10px", top: "30px" }, - { offset: 1, left: "20px", top: "40px" }], - output: [{ offset: 0, computedOffset: 0, easing: "linear", - left: "10px", top: "30px" }, - { offset: 1, computedOffset: 1, easing: "linear", - left: "20px", top: "40px" }] }, - { desc: "a one shorthand property two keyframe sequence", - input: [{ offset: 0, margin: "10px" }, - { offset: 1, margin: "20px 30px 40px 50px" }], - output: [{ offset: 0, computedOffset: 0, easing: "linear", - margin: "10px" }, - { offset: 1, computedOffset: 1, easing: "linear", - margin: "20px 30px 40px 50px" }] }, - { desc: "a two property (a shorthand and one of its component longhands)" - + " two keyframe sequence", - input: [{ offset: 0, margin: "10px", marginTop: "20px" }, - { offset: 1, marginTop: "70px", margin: "30px 40px 50px 60px" }], - output: [{ offset: 0, computedOffset: 0, easing: "linear", - margin: "10px", marginTop: "20px" }, - { offset: 1, computedOffset: 1, easing: "linear", - marginTop: "70px", margin: "30px 40px 50px 60px" }] }, - { desc: "a keyframe sequence with duplicate values for a given interior" - + " offset", - input: [{ offset: 0.0, left: "10px" }, - { offset: 0.5, left: "20px" }, - { offset: 0.5, left: "30px" }, - { offset: 0.5, left: "40px" }, - { offset: 1.0, left: "50px" }], - output: [{ offset: 0.0, computedOffset: 0.0, easing: "linear", - left: "10px" }, - { offset: 0.5, computedOffset: 0.5, easing: "linear", - left: "20px" }, - { offset: 0.5, computedOffset: 0.5, easing: "linear", - left: "30px" }, - { offset: 0.5, computedOffset: 0.5, easing: "linear", - left: "40px" }, - { offset: 1.0, computedOffset: 1.0, easing: "linear", - left: "50px" }] }, - { desc: "a keyframe sequence with duplicate values for offsets 0 and 1", - input: [{ offset: 0, left: "10px" }, - { offset: 0, left: "20px" }, - { offset: 0, left: "30px" }, - { offset: 1, left: "40px" }, - { offset: 1, left: "50px" }, - { offset: 1, left: "60px" }], - output: [{ offset: 0, computedOffset: 0, easing: "linear", left: "10px" }, - { offset: 0, computedOffset: 0, easing: "linear", left: "20px" }, - { offset: 0, computedOffset: 0, easing: "linear", left: "30px" }, - { offset: 1, computedOffset: 1, easing: "linear", left: "40px" }, - { offset: 1, computedOffset: 1, easing: "linear", left: "50px" }, - { offset: 1, computedOffset: 1, easing: "linear", left: "60px" }] - }, - { desc: "a two property four keyframe sequence", - input: [{ offset: 0, left: "10px" }, - { offset: 0, top: "20px" }, - { offset: 1, top: "30px" }, - { offset: 1, left: "40px" }], - output: [{ offset: 0, computedOffset: 0, easing: "linear", left: "10px" }, - { offset: 0, computedOffset: 0, easing: "linear", top: "20px" }, - { offset: 1, computedOffset: 1, easing: "linear", top: "30px" }, - { offset: 1, computedOffset: 1, easing: "linear", left: "40px" }] - }, - { desc: "a one property keyframe sequence with some omitted offsets", - input: [{ offset: 0.00, left: "10px" }, - { offset: 0.25, left: "20px" }, - { left: "30px" }, - { left: "40px" }, - { offset: 1.00, left: "50px" }], - output: [{ offset: 0.00, computedOffset: 0.00, easing: "linear", - left: "10px" }, - { offset: 0.25, computedOffset: 0.25, easing: "linear", - left: "20px" }, - { offset: null, computedOffset: 0.50, easing: "linear", - left: "30px" }, - { offset: null, computedOffset: 0.75, easing: "linear", - left: "40px" }, - { offset: 1.00, computedOffset: 1.00, easing: "linear", - left: "50px" }] }, - { desc: "a two property keyframe sequence with some omitted offsets", - input: [{ offset: 0.00, left: "10px", top: "20px" }, - { offset: 0.25, left: "30px" }, - { left: "40px" }, - { left: "50px", top: "60px" }, - { offset: 1.00, left: "70px", top: "80px" }], - output: [{ offset: 0.00, computedOffset: 0.00, easing: "linear", - left: "10px", top: "20px" }, - { offset: 0.25, computedOffset: 0.25, easing: "linear", - left: "30px" }, - { offset: null, computedOffset: 0.50, easing: "linear", - left: "40px" }, - { offset: null, computedOffset: 0.75, easing: "linear", - left: "50px", top: "60px" }, - { offset: 1.00, computedOffset: 1.00, easing: "linear", - left: "70px", top: "80px" }] }, - { desc: "a one property keyframe sequence with all omitted offsets", - input: [{ left: "10px" }, - { left: "20px" }, - { left: "30px" }, - { left: "40px" }, - { left: "50px" }], - output: [{ offset: null, computedOffset: 0.00, easing: "linear", - left: "10px" }, - { offset: null, computedOffset: 0.25, easing: "linear", - left: "20px" }, - { offset: null, computedOffset: 0.50, easing: "linear", - left: "30px" }, - { offset: null, computedOffset: 0.75, easing: "linear", - left: "40px" }, - { offset: null, computedOffset: 1.00, easing: "linear", - left: "50px" }] }, - { desc: "a keyframe sequence with different easing values, but the same" - + " easing value for a given offset", - input: [{ offset: 0.0, easing: "ease", left: "10px"}, - { offset: 0.0, easing: "ease", top: "20px"}, - { offset: 0.5, easing: "linear", left: "30px" }, - { offset: 0.5, easing: "linear", top: "40px" }, - { offset: 1.0, easing: "step-end", left: "50px" }, - { offset: 1.0, easing: "step-end", top: "60px" }], - output: [{ offset: 0.0, computedOffset: 0.0, easing: "ease", - left: "10px" }, - { offset: 0.0, computedOffset: 0.0, easing: "ease", - top: "20px" }, - { offset: 0.5, computedOffset: 0.5, easing: "linear", - left: "30px" }, - { offset: 0.5, computedOffset: 0.5, easing: "linear", - top: "40px" }, - { offset: 1.0, computedOffset: 1.0, easing: "step-end", - left: "50px" }, - { offset: 1.0, computedOffset: 1.0, easing: "step-end", - top: "60px" }] }, - { desc: "a keyframe sequence with different composite values, but the" - + " same composite value for a given offset", - input: [{ offset: 0.0, composite: "replace", left: "10px" }, - { offset: 0.0, composite: "replace", top: "20px" }, - { offset: 0.5, composite: "add", left: "30px" }, - { offset: 0.5, composite: "add", top: "40px" }, - { offset: 1.0, composite: "replace", left: "50px" }, - { offset: 1.0, composite: "replace", top: "60px" }], - output: [{ offset: 0.0, computedOffset: 0.0, easing: "linear", - composite: "replace", left: "10px" }, - { offset: 0.0, computedOffset: 0.0, easing: "linear", - composite: "replace", top: "20px" }, - { offset: 0.5, computedOffset: 0.0, easing: "linear", - composite: "add", left: "30px" }, - { offset: 0.5, computedOffset: 0.0, easing: "linear", - composite: "add", top: "40px" }, - { offset: 1.0, computedOffset: 1.0, easing: "linear", - composite: "replace", left: "50px" }, - { offset: 1.0, computedOffset: 1.0, easing: "linear", - composite: "replace", top: "60px" }] }, - { desc: "a one property two keyframe sequence that needs to stringify" - + " its values", - input: [{ offset: 0, opacity: 0 }, - { offset: 1, opacity: 1 }], - output: [{ offset: 0, computedOffset: 0, easing: "linear", opacity: "0" }, - { offset: 1, computedOffset: 1, easing: "linear", opacity: "1" }] - }, - { desc: "a keyframe sequence where shorthand precedes longhand", - input: [{ offset: 0, margin: "10px", marginRight: "20px" }, - { offset: 1, margin: "30px" }], - output: [{ offset: 0, computedOffset: 0, easing: "linear", - margin: "10px", marginRight: "20px" }, - { offset: 1, computedOffset: 1, easing: "linear", - margin: "30px" }] }, - { desc: "a keyframe sequence where longhand precedes shorthand", - input: [{ offset: 0, marginRight: "20px", margin: "10px" }, - { offset: 1, margin: "30px" }], - output: [{ offset: 0, computedOffset: 0, easing: "linear", - marginRight: "20px", margin: "10px" }, - { offset: 1, computedOffset: 1, easing: "linear", - margin: "30px" }] }, - { desc: "a keyframe sequence where lesser shorthand precedes greater" - + " shorthand", - input: [{ offset: 0, - borderLeft: "1px solid rgb(1, 2, 3)", - border: "2px dotted rgb(4, 5, 6)" }, - { offset: 1, border: "3px dashed rgb(7, 8, 9)" }], - output: [{ offset: 0, computedOffset: 0, easing: "linear", - borderLeft: "1px solid rgb(1, 2, 3)", - border: "2px dotted rgb(4, 5, 6)" }, - { offset: 1, computedOffset: 1, easing: "linear", - border: "3px dashed rgb(7, 8, 9)" }] }, - { desc: "a keyframe sequence where greater shorthand precedes lesser" - + " shorthand", - input: [{ offset: 0, border: "2px dotted rgb(4, 5, 6)", - borderLeft: "1px solid rgb(1, 2, 3)" }, - { offset: 1, border: "3px dashed rgb(7, 8, 9)" }], - output: [{ offset: 0, computedOffset: 0, easing: "linear", - border: "2px dotted rgb(4, 5, 6)", - borderLeft: "1px solid rgb(1, 2, 3)" }, - { offset: 1, computedOffset: 1, easing: "linear", - border: "3px dashed rgb(7, 8, 9)" }] }, -]; - gKeyframeSequenceTests.forEach(function(subtest) { test(function(t) { var effect = new KeyframeEffectReadOnly(target, subtest.input); @@ -530,20 +170,13 @@ gKeyframeSequenceTests.forEach(function(subtest) { " roundtrips"); }); -var gInvalidEasingInKeyframeSequenceTests = [ - { desc: "a blank easing", - input: [{ easing: "" }] }, - { desc: "an unrecognized easing", - input: [{ easing: "unrecognized" }] }, - { desc: "an 'initial' easing", - input: [{ easing: "initial" }] }, - { desc: "an 'inherit' easing", - input: [{ easing: "inherit" }] }, - { desc: "a variable easing", - input: [{ easing: "var(--x)" }] }, - { desc: "a multi-value easing", - input: [{ easing: "ease-in-out, ease-out" }] } -]; +gInvalidKeyframesTests.forEach(function(subtest) { + test(function(t) { + assert_throws(subtest.expected, function() { + new KeyframeEffectReadOnly(target, subtest.input); + }); + }, "KeyframeEffectReadOnly constructor throws with " + subtest.desc); +}); gInvalidEasingInKeyframeSequenceTests.forEach(function(subtest) { test(function(t) { @@ -556,7 +189,7 @@ gInvalidEasingInKeyframeSequenceTests.forEach(function(subtest) { test(function(t) { var effect = new KeyframeEffectReadOnly(target, - {left: ["10px", "20px"]}); + { left: ["10px", "20px"] }); var timing = effect.timing; assert_equals(timing.delay, 0, "default delay"); @@ -576,48 +209,10 @@ test(function(t) { }, "a KeyframeEffectReadOnly constructed without any " + "KeyframeEffectOptions object"); -var gKeyframeEffectOptionTests = [ - { desc: "an empty KeyframeEffectOptions object", - input: { }, - expected: { } }, - { desc: "a normal KeyframeEffectOptions object", - input: { delay: 1000, - fill: "auto", - iterations: 5.5, - duration: "auto", - direction: "alternate" }, - expected: { delay: 1000, - fill: "auto", - iterations: 5.5, - duration: "auto", - direction: "alternate" } }, - { desc: "a double value", - input: 3000, - expected: { duration: 3000 } }, - { desc: "+Infinity", - input: Infinity, - expected: { duration: Infinity } }, - { desc: "an Infinity duration", - input: { duration: Infinity }, - expected: { duration: Infinity } }, - { desc: "an auto duration", - input: { duration: "auto" }, - expected: { duration: "auto" } }, - { desc: "an Infinity iterations", - input: { iterations: Infinity }, - expected: { iterations: Infinity } }, - { desc: "an auto fill", - input: { fill: "auto" }, - expected: { fill: "auto" } }, - { desc: "a forwards fill", - input: { fill: "forwards" }, - expected: { fill: "forwards" } } -]; - gKeyframeEffectOptionTests.forEach(function(stest) { test(function(t) { var effect = new KeyframeEffectReadOnly(target, - {left: ["10px", "20px"]}, + { left: ["10px", "20px"] }, stest.input); // Helper function to provide default expected values when the test does @@ -641,57 +236,6 @@ gKeyframeEffectOptionTests.forEach(function(stest) { }, "a KeyframeEffectReadOnly constructed by " + stest.desc); }); -var gInvalidKeyframeEffectOptionTests = [ - { desc: "-Infinity", - input: -Infinity, - expected: { name: "TypeError" } }, - { desc: "NaN", - input: NaN, - expected: { name: "TypeError" } }, - { desc: "a negative value", - input: -1, - expected: { name: "TypeError" } }, - { desc: "a negative Infinity duration", - input: { duration: -Infinity }, - expected: { name: "TypeError" } }, - { desc: "a NaN duration", - input: { duration: NaN }, - expected: { name: "TypeError" } }, - { desc: "a negative duration", - input: { duration: -1 }, - expected: { name: "TypeError" } }, - { desc: "a string duration", - input: { duration: "merrychristmas" }, - expected: { name: "TypeError" } }, - { desc: "a negative Infinity iterations", - input: { iterations: -Infinity}, - expected: { name: "TypeError" } }, - { desc: "a NaN iterations", - input: { iterations: NaN }, - expected: { name: "TypeError" } }, - { desc: "a negative iterations", - input: { iterations: -1 }, - expected: { name: "TypeError" } }, - { desc: "a blank easing", - input: { easing: "" }, - expected: { name: "TypeError" } }, - { desc: "an unrecognized easing", - input: { easing: "unrecognised" }, - expected: { name: "TypeError" } }, - { desc: "an 'initial' easing", - input: { easing: "initial" }, - expected: { name: "TypeError" } }, - { desc: "an 'inherit' easing", - input: { easing: "inherit" }, - expected: { name: "TypeError" } }, - { desc: "a variable easing", - input: { easing: "var(--x)" }, - expected: { name: "TypeError" } }, - { desc: "a multi-value easing", - input: { easing: "ease-in-out, ease-out" }, - expected: { name: "TypeError" } } -]; - gInvalidKeyframeEffectOptionTests.forEach(function(stest) { test(function(t) { assert_throws(stest.expected, function() { @@ -703,9 +247,16 @@ gInvalidKeyframeEffectOptionTests.forEach(function(stest) { }); test(function(t) { - var effect = new KeyframeEffect(target, - { left: ["10px", "20px"] }); + var effect = new KeyframeEffectReadOnly(null, + { left: ["10px", "20px"] }, + { duration: 100 * MS_PER_SEC, + fill: "forwards" }); + assert_equals(effect.target, null, + "Effect created with null target has correct target"); +}, "a KeyframeEffectReadOnly constructed with null target"); +test(function(t) { + var effect = new KeyframeEffect(target, null); assert_class_string(effect, "KeyframeEffect"); assert_class_string(effect.timing, "AnimationEffectTiming"); }, "KeyframeEffect constructor creates an AnimationEffectTiming timing object"); @@ -718,7 +269,5 @@ test(function(t) { }); }, "KeyframeEffect constructor propagates exceptions generated by accessing" + " the options object"); - -done(); diff --git a/tests/wpt/web-platform-tests/web-animations/keyframe-effect/setFrames.html b/tests/wpt/web-platform-tests/web-animations/keyframe-effect/setFrames.html new file mode 100644 index 00000000000..5564a9e47ca --- /dev/null +++ b/tests/wpt/web-platform-tests/web-animations/keyframe-effect/setFrames.html @@ -0,0 +1,50 @@ + + +KeyframeEffect setFrames() tests + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/web-animations/keyframe-effect/setTarget.html b/tests/wpt/web-platform-tests/web-animations/keyframe-effect/setTarget.html new file mode 100644 index 00000000000..e6be42e4f3f --- /dev/null +++ b/tests/wpt/web-platform-tests/web-animations/keyframe-effect/setTarget.html @@ -0,0 +1,89 @@ + + +Writable effect.target tests + + + + + +
+ + diff --git a/tests/wpt/web-platform-tests/web-animations/resources/keyframe-utils.js b/tests/wpt/web-platform-tests/web-animations/resources/keyframe-utils.js new file mode 100644 index 00000000000..6f24a9807b1 --- /dev/null +++ b/tests/wpt/web-platform-tests/web-animations/resources/keyframe-utils.js @@ -0,0 +1,530 @@ +"use strict"; + +// Utility functions and common keyframe test data. + +// ------------------------------ +// Helper functions +// ------------------------------ + +/** + * Test equality between two lists of computed keyframes + * @param {Array.} a - actual computed keyframes + * @param {Array.} b - expected computed keyframes + */ +function assert_frame_lists_equal(a, b) { + assert_equals(a.length, b.length, "number of frames"); + for (var i = 0; i < Math.min(a.length, b.length); i++) { + assert_frames_equal(a[i], b[i], "ComputedKeyframe #" + i); + } +} + +/** Helper */ +function assert_frames_equal(a, b, name) { + assert_equals(Object.keys(a).sort().toString(), + Object.keys(b).sort().toString(), + "properties on " + name); + for (var p in a) { + assert_equals(a[p], b[p], "value for '" + p + "' on " + name); + } +} + +// ------------------------------ +// Easing values +// ------------------------------ + +// [specified easing value, expected easing value] +var gEasingValueTests = [ + ["linear", "linear"], + ["ease-in-out", "ease-in-out"], + ["Ease\\2d in-out", "ease-in-out"], + ["ease /**/", "ease"], +]; + +var gInvalidEasingInKeyframeSequenceTests = [ + { desc: "a blank easing", + input: [{ easing: "" }] }, + { desc: "an unrecognized easing", + input: [{ easing: "unrecognized" }] }, + { desc: "an 'initial' easing", + input: [{ easing: "initial" }] }, + { desc: "an 'inherit' easing", + input: [{ easing: "inherit" }] }, + { desc: "a variable easing", + input: [{ easing: "var(--x)" }] }, + { desc: "a multi-value easing", + input: [{ easing: "ease-in-out, ease-out" }] } +]; + +// ------------------------------ +// Composite values +// ------------------------------ + +var gGoodKeyframeCompositeValueTests = [ + "replace", "add", "accumulate", undefined +]; + +var gGoodOptionsCompositeValueTests = [ + "replace", "add", "accumulate" +]; + +var gBadCompositeValueTests = [ + "unrecognised", "replace ", "Replace", null +]; + +// ------------------------------ +// Keyframes +// ------------------------------ + +var gEmptyKeyframeListTests = [ + [], + null, + undefined, +]; + +var gPropertyIndexedKeyframesTests = [ + { desc: "a one property two value property-indexed keyframes specification", + input: { left: ["10px", "20px"] }, + output: [{ offset: null, computedOffset: 0, easing: "linear", + left: "10px" }, + { offset: null, computedOffset: 1, easing: "linear", + left: "20px" }] }, + { desc: "a one shorthand property two value property-indexed keyframes" + + " specification", + input: { margin: ["10px", "10px 20px 30px 40px"] }, + output: [{ offset: null, computedOffset: 0, easing: "linear", + margin: "10px" }, + { offset: null, computedOffset: 1, easing: "linear", + margin: "10px 20px 30px 40px" }] }, + { desc: "a two property (one shorthand and one of its longhand components)" + + " two value property-indexed keyframes specification", + input: { marginTop: ["50px", "60px"], + margin: ["10px", "10px 20px 30px 40px"] }, + output: [{ offset: null, computedOffset: 0, easing: "linear", + marginTop: "50px", margin: "10px" }, + { offset: null, computedOffset: 1, easing: "linear", + marginTop: "60px", margin: "10px 20px 30px 40px" }] }, + { desc: "a two property two value property-indexed keyframes specification", + input: { left: ["10px", "20px"], + top: ["30px", "40px"] }, + output: [{ offset: null, computedOffset: 0, easing: "linear", + left: "10px", top: "30px" }, + { offset: null, computedOffset: 1, easing: "linear", + left: "20px", top: "40px" }] }, + { desc: "a two property property-indexed keyframes specification with" + + " different numbers of values", + input: { left: ["10px", "20px", "30px"], + top: ["40px", "50px"] }, + output: [{ offset: null, computedOffset: 0.0, easing: "linear", + left: "10px", top: "40px" }, + { offset: null, computedOffset: 0.5, easing: "linear", + left: "20px" }, + { offset: null, computedOffset: 1.0, easing: "linear", + left: "30px", top: "50px" }] }, + { desc: "a property-indexed keyframes specification with an invalid value", + input: { left: ["10px", "20px", "30px", "40px", "50px"], + top: ["15px", "25px", "invalid", "45px", "55px"] }, + output: [{ offset: null, computedOffset: 0.00, easing: "linear", + left: "10px", top: "15px" }, + { offset: null, computedOffset: 0.25, easing: "linear", + left: "20px", top: "25px" }, + { offset: null, computedOffset: 0.50, easing: "linear", + left: "30px", top: "invalid" }, + { offset: null, computedOffset: 0.75, easing: "linear", + left: "40px", top: "45px" }, + { offset: null, computedOffset: 1.00, easing: "linear", + left: "50px", top: "55px" }] }, + { desc: "a one property two value property-indexed keyframes specification" + + " that needs to stringify its values", + input: { opacity: [0, 1] }, + output: [{ offset: null, computedOffset: 0, easing: "linear", + opacity: "0" }, + { offset: null, computedOffset: 1, easing: "linear", + opacity: "1" }] }, + { desc: "a one property one value property-indexed keyframes specification", + input: { left: ["10px"] }, + output: [{ offset: null, computedOffset: 1, easing: "linear", + left: "10px" }] }, + { desc: "a one property one non-array value property-indexed keyframes" + + " specification", + input: { left: "10px" }, + output: [{ offset: null, computedOffset: 1, easing: "linear", + left: "10px" }] }, + { desc: "a one property two value property-indexed keyframes specification" + + " where the first value is invalid", + input: { left: ["invalid", "10px"] }, + output: [{ offset: null, computedOffset: 0, easing: "linear", + left: "invalid" }, + { offset: null, computedOffset: 1, easing: "linear", + left: "10px" }] }, + { desc: "a one property two value property-indexed keyframes specification" + + " where the second value is invalid", + input: { left: ["10px", "invalid"] }, + output: [{ offset: null, computedOffset: 0, easing: "linear", + left: "10px" }, + { offset: null, computedOffset: 1, easing: "linear", + left: "invalid" }] }, + { desc: "a two property property-indexed keyframes specification where one" + + " property is missing from the first keyframe", + input: [{ offset: 0, left: "10px" }, + { offset: 1, left: "20px", top: "30px" }], + output: [{ offset: 0, computedOffset: 0, easing: "linear", left: "10px" }, + { offset: 1, computedOffset: 1, easing: "linear", + left: "20px", top: "30px" }] }, + { desc: "a two property property-indexed keyframes specification where one" + + " property is missing from the last keyframe", + input: [{ offset: 0, left: "10px", top: "20px" }, + { offset: 1, left: "30px" }], + output: [{ offset: 0, computedOffset: 0, easing: "linear", + left: "10px" , top: "20px" }, + { offset: 1, computedOffset: 1, easing: "linear", + left: "30px" }] }, + { desc: "a property-indexed keyframes specification with repeated values" + + " at offset 0 with different easings", + input: [{ offset: 0.0, left: "100px", easing: "ease" }, + { offset: 0.0, left: "200px", easing: "ease" }, + { offset: 0.5, left: "300px", easing: "linear" }, + { offset: 1.0, left: "400px", easing: "ease-out" }, + { offset: 1.0, left: "500px", easing: "step-end" }], + output: [{ offset: 0.0, computedOffset: 0.0, easing: "ease", + left: "100px" }, + { offset: 0.0, computedOffset: 0.0, easing: "ease", + left: "200px" }, + { offset: 0.5, computedOffset: 0.5, easing: "linear", + left: "300px" }, + { offset: 1.0, computedOffset: 1.0, easing: "ease-out", + left: "400px" }, + { offset: 1.0, computedOffset: 1.0, easing: "step-end", + left: "500px" }] }, +]; + +var gKeyframeSequenceTests = [ + { desc: "a one property one keyframe sequence", + input: [{ offset: 1, left: "10px" }], + output: [{ offset: null, computedOffset: 1, easing: "linear", + left: "10px" }] }, + { desc: "a one property two keyframe sequence", + input: [{ offset: 0, left: "10px" }, + { offset: 1, left: "20px" }], + output: [{ offset: 0, computedOffset: 0, easing: "linear", left: "10px" }, + { offset: 1, computedOffset: 1, easing: "linear", left: "20px" }] + }, + { desc: "a two property two keyframe sequence", + input: [{ offset: 0, left: "10px", top: "30px" }, + { offset: 1, left: "20px", top: "40px" }], + output: [{ offset: 0, computedOffset: 0, easing: "linear", + left: "10px", top: "30px" }, + { offset: 1, computedOffset: 1, easing: "linear", + left: "20px", top: "40px" }] }, + { desc: "a one shorthand property two keyframe sequence", + input: [{ offset: 0, margin: "10px" }, + { offset: 1, margin: "20px 30px 40px 50px" }], + output: [{ offset: 0, computedOffset: 0, easing: "linear", + margin: "10px" }, + { offset: 1, computedOffset: 1, easing: "linear", + margin: "20px 30px 40px 50px" }] }, + { desc: "a two property (a shorthand and one of its component longhands)" + + " two keyframe sequence", + input: [{ offset: 0, margin: "10px", marginTop: "20px" }, + { offset: 1, marginTop: "70px", margin: "30px 40px 50px 60px" }], + output: [{ offset: 0, computedOffset: 0, easing: "linear", + margin: "10px", marginTop: "20px" }, + { offset: 1, computedOffset: 1, easing: "linear", + marginTop: "70px", margin: "30px 40px 50px 60px" }] }, + { desc: "a keyframe sequence with duplicate values for a given interior" + + " offset", + input: [{ offset: 0.0, left: "10px" }, + { offset: 0.5, left: "20px" }, + { offset: 0.5, left: "30px" }, + { offset: 0.5, left: "40px" }, + { offset: 1.0, left: "50px" }], + output: [{ offset: 0.0, computedOffset: 0.0, easing: "linear", + left: "10px" }, + { offset: 0.5, computedOffset: 0.5, easing: "linear", + left: "20px" }, + { offset: 0.5, computedOffset: 0.5, easing: "linear", + left: "30px" }, + { offset: 0.5, computedOffset: 0.5, easing: "linear", + left: "40px" }, + { offset: 1.0, computedOffset: 1.0, easing: "linear", + left: "50px" }] }, + { desc: "a keyframe sequence with duplicate values for offsets 0 and 1", + input: [{ offset: 0, left: "10px" }, + { offset: 0, left: "20px" }, + { offset: 0, left: "30px" }, + { offset: 1, left: "40px" }, + { offset: 1, left: "50px" }, + { offset: 1, left: "60px" }], + output: [{ offset: 0, computedOffset: 0, easing: "linear", left: "10px" }, + { offset: 0, computedOffset: 0, easing: "linear", left: "20px" }, + { offset: 0, computedOffset: 0, easing: "linear", left: "30px" }, + { offset: 1, computedOffset: 1, easing: "linear", left: "40px" }, + { offset: 1, computedOffset: 1, easing: "linear", left: "50px" }, + { offset: 1, computedOffset: 1, easing: "linear", left: "60px" }] + }, + { desc: "a two property four keyframe sequence", + input: [{ offset: 0, left: "10px" }, + { offset: 0, top: "20px" }, + { offset: 1, top: "30px" }, + { offset: 1, left: "40px" }], + output: [{ offset: 0, computedOffset: 0, easing: "linear", left: "10px" }, + { offset: 0, computedOffset: 0, easing: "linear", top: "20px" }, + { offset: 1, computedOffset: 1, easing: "linear", top: "30px" }, + { offset: 1, computedOffset: 1, easing: "linear", left: "40px" }] + }, + { desc: "a single keyframe sequence with omitted offsets", + input: [{ left: "10px" }], + output: [{ offset: null, computedOffset: 1, easing: "linear", + left: "10px" }] }, + { desc: "a one property keyframe sequence with some omitted offsets", + input: [{ offset: 0.00, left: "10px" }, + { offset: 0.25, left: "20px" }, + { left: "30px" }, + { left: "40px" }, + { offset: 1.00, left: "50px" }], + output: [{ offset: 0.00, computedOffset: 0.00, easing: "linear", + left: "10px" }, + { offset: 0.25, computedOffset: 0.25, easing: "linear", + left: "20px" }, + { offset: null, computedOffset: 0.50, easing: "linear", + left: "30px" }, + { offset: null, computedOffset: 0.75, easing: "linear", + left: "40px" }, + { offset: 1.00, computedOffset: 1.00, easing: "linear", + left: "50px" }] }, + { desc: "a two property keyframe sequence with some omitted offsets", + input: [{ offset: 0.00, left: "10px", top: "20px" }, + { offset: 0.25, left: "30px" }, + { left: "40px" }, + { left: "50px", top: "60px" }, + { offset: 1.00, left: "70px", top: "80px" }], + output: [{ offset: 0.00, computedOffset: 0.00, easing: "linear", + left: "10px", top: "20px" }, + { offset: 0.25, computedOffset: 0.25, easing: "linear", + left: "30px" }, + { offset: null, computedOffset: 0.50, easing: "linear", + left: "40px" }, + { offset: null, computedOffset: 0.75, easing: "linear", + left: "50px", top: "60px" }, + { offset: 1.00, computedOffset: 1.00, easing: "linear", + left: "70px", top: "80px" }] }, + { desc: "a one property keyframe sequence with all omitted offsets", + input: [{ left: "10px" }, + { left: "20px" }, + { left: "30px" }, + { left: "40px" }, + { left: "50px" }], + output: [{ offset: null, computedOffset: 0.00, easing: "linear", + left: "10px" }, + { offset: null, computedOffset: 0.25, easing: "linear", + left: "20px" }, + { offset: null, computedOffset: 0.50, easing: "linear", + left: "30px" }, + { offset: null, computedOffset: 0.75, easing: "linear", + left: "40px" }, + { offset: null, computedOffset: 1.00, easing: "linear", + left: "50px" }] }, + { desc: "a keyframe sequence with different easing values, but the same" + + " easing value for a given offset", + input: [{ offset: 0.0, easing: "ease", left: "10px"}, + { offset: 0.0, easing: "ease", top: "20px"}, + { offset: 0.5, easing: "linear", left: "30px" }, + { offset: 0.5, easing: "linear", top: "40px" }, + { offset: 1.0, easing: "step-end", left: "50px" }, + { offset: 1.0, easing: "step-end", top: "60px" }], + output: [{ offset: 0.0, computedOffset: 0.0, easing: "ease", + left: "10px" }, + { offset: 0.0, computedOffset: 0.0, easing: "ease", + top: "20px" }, + { offset: 0.5, computedOffset: 0.5, easing: "linear", + left: "30px" }, + { offset: 0.5, computedOffset: 0.5, easing: "linear", + top: "40px" }, + { offset: 1.0, computedOffset: 1.0, easing: "step-end", + left: "50px" }, + { offset: 1.0, computedOffset: 1.0, easing: "step-end", + top: "60px" }] }, + { desc: "a keyframe sequence with different composite values, but the" + + " same composite value for a given offset", + input: [{ offset: 0.0, composite: "replace", left: "10px" }, + { offset: 0.0, composite: "replace", top: "20px" }, + { offset: 0.5, composite: "add", left: "30px" }, + { offset: 0.5, composite: "add", top: "40px" }, + { offset: 1.0, composite: "replace", left: "50px" }, + { offset: 1.0, composite: "replace", top: "60px" }], + output: [{ offset: 0.0, computedOffset: 0.0, easing: "linear", + composite: "replace", left: "10px" }, + { offset: 0.0, computedOffset: 0.0, easing: "linear", + composite: "replace", top: "20px" }, + { offset: 0.5, computedOffset: 0.0, easing: "linear", + composite: "add", left: "30px" }, + { offset: 0.5, computedOffset: 0.0, easing: "linear", + composite: "add", top: "40px" }, + { offset: 1.0, computedOffset: 1.0, easing: "linear", + composite: "replace", left: "50px" }, + { offset: 1.0, computedOffset: 1.0, easing: "linear", + composite: "replace", top: "60px" }] }, + { desc: "a one property two keyframe sequence that needs to stringify" + + " its values", + input: [{ offset: 0, opacity: 0 }, + { offset: 1, opacity: 1 }], + output: [{ offset: 0, computedOffset: 0, easing: "linear", opacity: "0" }, + { offset: 1, computedOffset: 1, easing: "linear", opacity: "1" }] + }, + { desc: "a keyframe sequence where shorthand precedes longhand", + input: [{ offset: 0, margin: "10px", marginRight: "20px" }, + { offset: 1, margin: "30px" }], + output: [{ offset: 0, computedOffset: 0, easing: "linear", + margin: "10px", marginRight: "20px" }, + { offset: 1, computedOffset: 1, easing: "linear", + margin: "30px" }] }, + { desc: "a keyframe sequence where longhand precedes shorthand", + input: [{ offset: 0, marginRight: "20px", margin: "10px" }, + { offset: 1, margin: "30px" }], + output: [{ offset: 0, computedOffset: 0, easing: "linear", + marginRight: "20px", margin: "10px" }, + { offset: 1, computedOffset: 1, easing: "linear", + margin: "30px" }] }, + { desc: "a keyframe sequence where lesser shorthand precedes greater" + + " shorthand", + input: [{ offset: 0, + borderLeft: "1px solid rgb(1, 2, 3)", + border: "2px dotted rgb(4, 5, 6)" }, + { offset: 1, border: "3px dashed rgb(7, 8, 9)" }], + output: [{ offset: 0, computedOffset: 0, easing: "linear", + borderLeft: "1px solid rgb(1, 2, 3)", + border: "2px dotted rgb(4, 5, 6)" }, + { offset: 1, computedOffset: 1, easing: "linear", + border: "3px dashed rgb(7, 8, 9)" }] }, + { desc: "a keyframe sequence where greater shorthand precedes lesser" + + " shorthand", + input: [{ offset: 0, border: "2px dotted rgb(4, 5, 6)", + borderLeft: "1px solid rgb(1, 2, 3)" }, + { offset: 1, border: "3px dashed rgb(7, 8, 9)" }], + output: [{ offset: 0, computedOffset: 0, easing: "linear", + border: "2px dotted rgb(4, 5, 6)", + borderLeft: "1px solid rgb(1, 2, 3)" }, + { offset: 1, computedOffset: 1, easing: "linear", + border: "3px dashed rgb(7, 8, 9)" }] } +]; + +var gInvalidKeyframesTests = [ + { desc: "keyframes with an out-of-bounded positive offset", + input: [ { opacity: 0 }, + { opacity: 0.5, offset: 2 }, + { opacity: 1 } ], + expected: { name: "TypeError" } }, + { desc: "keyframes with an out-of-bounded negative offset", + input: [ { opacity: 0 }, + { opacity: 0.5, offset: -1 }, + { opacity: 1 } ], + expected: { name: "TypeError" } }, + { desc: "keyframes not loosely sorted by offset", + input: [ { opacity: 0, offset: 1 }, + { opacity: 1, offset: 0 } ], + expected: { name: "TypeError" } }, + { desc: "property-indexed keyframes with an invalid easing value", + input: { opacity: [ 0, 0.5, 1 ], + easing: "inherit" }, + expected: { name: "TypeError" } }, + { desc: "a keyframe sequence with an invalid easing value", + input: [ { opacity: 0, easing: "jumpy" }, + { opacity: 1 } ], + expected: { name: "TypeError" } }, + { desc: "keyframes with an invalid composite value", + input: [ { opacity: 0, composite: "alternate" }, + { opacity: 1 } ], + expected: { name: "TypeError" } } +]; + +// ------------------------------ +// KeyframeEffectOptions +// ------------------------------ + +var gKeyframeEffectOptionTests = [ + { desc: "an empty KeyframeEffectOptions object", + input: { }, + expected: { } }, + { desc: "a normal KeyframeEffectOptions object", + input: { delay: 1000, + fill: "auto", + iterations: 5.5, + duration: "auto", + direction: "alternate" }, + expected: { delay: 1000, + fill: "auto", + iterations: 5.5, + duration: "auto", + direction: "alternate" } }, + { desc: "a double value", + input: 3000, + expected: { duration: 3000 } }, + { desc: "+Infinity", + input: Infinity, + expected: { duration: Infinity } }, + { desc: "an Infinity duration", + input: { duration: Infinity }, + expected: { duration: Infinity } }, + { desc: "an auto duration", + input: { duration: "auto" }, + expected: { duration: "auto" } }, + { desc: "an Infinity iterations", + input: { iterations: Infinity }, + expected: { iterations: Infinity } }, + { desc: "an auto fill", + input: { fill: "auto" }, + expected: { fill: "auto" } }, + { desc: "a forwards fill", + input: { fill: "forwards" }, + expected: { fill: "forwards" } } +]; + +var gInvalidKeyframeEffectOptionTests = [ + { desc: "-Infinity", + input: -Infinity, + expected: { name: "TypeError" } }, + { desc: "NaN", + input: NaN, + expected: { name: "TypeError" } }, + { desc: "a negative value", + input: -1, + expected: { name: "TypeError" } }, + { desc: "a negative Infinity duration", + input: { duration: -Infinity }, + expected: { name: "TypeError" } }, + { desc: "a NaN duration", + input: { duration: NaN }, + expected: { name: "TypeError" } }, + { desc: "a negative duration", + input: { duration: -1 }, + expected: { name: "TypeError" } }, + { desc: "a string duration", + input: { duration: "merrychristmas" }, + expected: { name: "TypeError" } }, + { desc: "a negative Infinity iterations", + input: { iterations: -Infinity}, + expected: { name: "TypeError" } }, + { desc: "a NaN iterations", + input: { iterations: NaN }, + expected: { name: "TypeError" } }, + { desc: "a negative iterations", + input: { iterations: -1 }, + expected: { name: "TypeError" } }, + { desc: "a blank easing", + input: { easing: "" }, + expected: { name: "TypeError" } }, + { desc: "an unrecognized easing", + input: { easing: "unrecognised" }, + expected: { name: "TypeError" } }, + { desc: "an 'initial' easing", + input: { easing: "initial" }, + expected: { name: "TypeError" } }, + { desc: "an 'inherit' easing", + input: { easing: "inherit" }, + expected: { name: "TypeError" } }, + { desc: "a variable easing", + input: { easing: "var(--x)" }, + expected: { name: "TypeError" } }, + { desc: "a multi-value easing", + input: { easing: "ease-in-out, ease-out" }, + expected: { name: "TypeError" } } +]; diff --git a/tests/wpt/web-platform-tests/web-animations/testcommon.js b/tests/wpt/web-platform-tests/web-animations/testcommon.js index ab54202f10e..5ba03082a9c 100644 --- a/tests/wpt/web-platform-tests/web-animations/testcommon.js +++ b/tests/wpt/web-platform-tests/web-animations/testcommon.js @@ -8,9 +8,23 @@ policies and contribution forms [3]. [3] http://www.w3.org/2004/10/27-testcases */ -"use strict"; +'use strict'; + var MS_PER_SEC = 1000; +// The recommended minimum precision to use for time values[1]. +// +// [1] https://w3c.github.io/web-animations/#precision-of-time-values +var TIME_PRECISION = 0.0005; // ms + +// Allow implementations to substitute an alternative method for comparing +// times based on their precision requirements. +if (!window.assert_times_equal) { + window.assert_times_equal = function(actual, expected, description) { + assert_approx_equals(actual, expected, TIME_PRECISION, description); + } +} + // creates div element, appends it to the document body and // removes the created element during test cleanup function createDiv(test, doc) { diff --git a/tests/wpt/web-platform-tests/web-animations/timing-model/animation-effects/active-time.html b/tests/wpt/web-platform-tests/web-animations/timing-model/animation-effects/active-time.html new file mode 100644 index 00000000000..2fb028fe79b --- /dev/null +++ b/tests/wpt/web-platform-tests/web-animations/timing-model/animation-effects/active-time.html @@ -0,0 +1,24 @@ + + +Active time tests + + + + + +
+ + diff --git a/tests/wpt/web-platform-tests/web-animations/keyframe-effect/getComputedTiming-currentIteration.html b/tests/wpt/web-platform-tests/web-animations/timing-model/animation-effects/current-iteration.html similarity index 96% rename from tests/wpt/web-platform-tests/web-animations/keyframe-effect/getComputedTiming-currentIteration.html rename to tests/wpt/web-platform-tests/web-animations/timing-model/animation-effects/current-iteration.html index b2602d06330..98d47fd8798 100644 --- a/tests/wpt/web-platform-tests/web-animations/keyframe-effect/getComputedTiming-currentIteration.html +++ b/tests/wpt/web-platform-tests/web-animations/timing-model/animation-effects/current-iteration.html @@ -1,11 +1,10 @@ -currentIteration of KeyframeEffectReadOnly getComputedTiming() tests - - +Current iteration tests + - +
- +
+ + + +
+ +