From eff69b907ef2cd3a9af0351287a929c66f58e3f6 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Tue, 7 Sep 2010 16:06:44 +0100 Subject: Adds a number of fast/ LayoutTest directories to the triaged set Tests are added at r66079. All tests pass fast/constructors/ fast/cookies/ fast/dom/Attr/ fast/dom/CSSStyleDeclaration/ fast/dom/DOMImplementation/ fast/dom/DeviceMotion/ fast/dom/EntityReference/ fast/dom/HTMLAnchorElement/ fast/dom/HTMLButtonElement/ fast/dom/HTMLFontElement/ fast/dom/HTMLFormElement/ fast/dom/HTMLHtmlElement/ fast/dom/HTMLKeygenElement/ fast/dom/HTMLLabelElement/ fast/dom/HTMLMetaElement/ fast/dom/HTMLTableRowElement/ fast/dom/HTMLTableSectionElement/ fast/dom/Node/ fast/dom/NodeList/ fast/dom/Selection/ fast/dom/StyleSheet/ fast/dom/Text/ fast/dom/TreeWalker/ fast/dom/beforeload/ fast/dom/getElementsByClassName/ fast/leaks/ Change-Id: I9a2c401151f7abf5bb22b764b1327022ab651e04 --- .../constructor-as-function-crash-expected.txt | 13 ++ .../constructor-as-function-crash.html | 32 ++++ .../local-file-can-set-cookies-expected.txt | 11 ++ .../fast/cookies/local-file-can-set-cookies.html | 23 +++ .../access-after-element-destruction-expected.txt | 25 +++ .../dom/Attr/access-after-element-destruction.html | 13 ++ .../fast/dom/Attr/child-nodes-cache-expected.txt | 3 + LayoutTests/fast/dom/Attr/child-nodes-cache.html | 38 ++++ .../dom/Attr/child-nodes-length-cache-expected.txt | 3 + .../fast/dom/Attr/child-nodes-length-cache.html | 38 ++++ .../fast/dom/Attr/script-tests/TEMPLATE.html | 13 ++ .../access-after-element-destruction.js | 55 ++++++ .../css-computed-style-item-expected.txt | 12 ++ .../css-computed-style-item.html | 13 ++ .../css-properties-case-sensitive-expected.txt | 34 ++++ .../css-properties-case-sensitive.html | 13 ++ .../css-style-item-expected.txt | 13 ++ .../dom/CSSStyleDeclaration/css-style-item.html | 13 ++ .../empty-string-property-expected.txt | 5 + .../CSSStyleDeclaration/empty-string-property.html | 18 ++ .../CSSStyleDeclaration/script-tests/TEMPLATE.html | 13 ++ .../script-tests/css-computed-style-item.js | 14 ++ .../script-tests/css-properties-case-sensitive.js | 41 ++++ .../script-tests/css-style-item.js | 15 ++ .../script-tests/transition-property-names.js | 13 ++ .../transition-property-names-expected.txt | 11 ++ .../transition-property-names.html | 13 ++ .../createDocument-namespace-err-expected.txt | 51 +++++ .../createDocument-namespace-err.html | 13 ++ .../createDocument-with-used-doctype-expected.txt | 1 + .../createDocument-with-used-doctype.html | 32 ++++ .../createDocumentType-err-expected.txt | 31 +++ .../DOMImplementation/createDocumentType-err.html | 13 ++ .../createHTMLDocument-title-expected.txt | 5 + .../createHTMLDocument-title.html | 9 + .../detached-doctype-expected.txt | 5 + .../dom/DOMImplementation/detached-doctype.html | 29 +++ .../createDocument-with-used-doctype-frame.html | 17 ++ .../DOMImplementation/script-tests/TEMPLATE.html | 13 ++ .../script-tests/createDocument-namespace-err.js | 146 ++++++++++++++ .../script-tests/createDocumentType-err.js | 100 ++++++++++ .../dom/DeviceMotion/create-event-expected.txt | 30 +++ .../fast/dom/DeviceMotion/create-event.html | 12 ++ .../optional-event-properties-expected.txt | 65 +++++++ .../DeviceMotion/optional-event-properties.html | 12 ++ .../dom/DeviceMotion/script-tests/TEMPLATE.html | 12 ++ .../dom/DeviceMotion/script-tests/create-event.js | 29 +++ .../script-tests/optional-event-properties.js | 68 +++++++ .../DeviceMotion/script-tests/window-property.js | 32 ++++ .../dom/DeviceMotion/window-property-expected.txt | 18 ++ .../fast/dom/DeviceMotion/window-property.html | 12 ++ .../readonly-exceptions-expected.txt | 23 +++ .../dom/EntityReference/readonly-exceptions.html | 13 ++ .../dom/EntityReference/script-tests/TEMPLATE.html | 13 ++ .../script-tests/readonly-exceptions.js | 33 ++++ .../HTMLAnchorElement/script-tests/TEMPLATE.html | 13 ++ .../script-tests/set-href-attribute-hash.js | 70 +++++++ .../script-tests/set-href-attribute-host.js | 115 +++++++++++ .../script-tests/set-href-attribute-hostname.js | 72 +++++++ .../script-tests/set-href-attribute-pathname.js | 71 +++++++ .../script-tests/set-href-attribute-port.js | 49 +++++ .../script-tests/set-href-attribute-protocol.js | 80 ++++++++ .../script-tests/set-href-attribute-search.js | 49 +++++ .../script-tests/set-href-attribute-whitespace.js | 49 +++++ .../set-href-attribute-hash-expected.txt | 29 +++ .../HTMLAnchorElement/set-href-attribute-hash.html | 13 ++ .../set-href-attribute-host-expected.txt | 39 ++++ .../HTMLAnchorElement/set-href-attribute-host.html | 13 ++ .../set-href-attribute-hostname-expected.txt | 27 +++ .../set-href-attribute-hostname.html | 13 ++ .../set-href-attribute-pathname-expected.txt | 27 +++ .../set-href-attribute-pathname.html | 13 ++ .../set-href-attribute-port-expected.txt | 25 +++ .../HTMLAnchorElement/set-href-attribute-port.html | 13 ++ .../set-href-attribute-protocol-expected.txt | 29 +++ .../set-href-attribute-protocol.html | 13 ++ .../set-href-attribute-search-expected.txt | 23 +++ .../set-href-attribute-search.html | 13 ++ .../set-href-attribute-whitespace-expected.txt | 31 +++ .../set-href-attribute-whitespace.html | 13 ++ .../HTMLButtonElement/value/getset-expected.txt | 5 + .../fast/dom/HTMLButtonElement/value/getset.html | 27 +++ .../dom/HTMLFontElement/script-tests/TEMPLATE.html | 13 ++ .../HTMLFontElement/script-tests/size-attribute.js | 58 ++++++ .../HTMLFontElement/size-attribute-expected.txt | 41 ++++ .../fast/dom/HTMLFontElement/size-attribute.html | 13 ++ .../HTMLFormElement/adopt-assertion-expected.txt | 3 + .../fast/dom/HTMLFormElement/adopt-assertion.html | 16 ++ ...cument-deactivation-callback-crash-expected.txt | 5 + .../document-deactivation-callback-crash.html | 41 ++++ .../elements-not-in-document-expected.txt | 27 +++ .../HTMLFormElement/elements-not-in-document.html | 13 ++ .../htmlformelement-indexed-getter-expected.txt | 10 + .../htmlformelement-indexed-getter.html | 24 +++ .../dom/HTMLFormElement/script-tests/TEMPLATE.html | 13 ++ .../script-tests/elements-not-in-document.js | 37 ++++ .../duplicate-html-element-crash-expected.txt | 2 + .../duplicate-html-element-crash.html | 17 ++ .../dom/HTMLHtmlElement/set-version-expected.txt | 6 + .../fast/dom/HTMLHtmlElement/set-version.html | 24 +++ .../keygen-option-select-expected.txt | 6 + .../HTMLKeygenElement/keygen-option-select.html | 40 ++++ .../dom/HTMLLabelElement/click-label-expected.txt | 5 + .../fast/dom/HTMLLabelElement/click-label.html | 43 +++++ .../dom/HTMLLabelElement/focus-label-expected.txt | 5 + .../fast/dom/HTMLLabelElement/focus-label.html | 32 ++++ .../dom/HTMLLabelElement/form/test1-expected.txt | 7 + .../fast/dom/HTMLLabelElement/form/test1.html | 46 +++++ .../HTMLLabelElement/label-control-expected.txt | 51 +++++ .../fast/dom/HTMLLabelElement/label-control.html | 13 ++ .../HTMLLabelElement/script-tests/TEMPLATE.html | 13 ++ .../HTMLLabelElement/script-tests/label-control.js | 65 +++++++ .../HTMLMetaElement/meta-attributes-expected.txt | 10 + .../fast/dom/HTMLMetaElement/meta-attributes.html | 28 +++ .../dom/HTMLTableRowElement/cells-expected.txt | 37 ++++ .../fast/dom/HTMLTableRowElement/cells.html | 13 ++ .../HTMLTableRowElement/insertCell-expected.txt | 5 + .../fast/dom/HTMLTableRowElement/insertCell.html | 28 +++ .../HTMLTableRowElement/script-tests/TEMPLATE.html | 13 ++ .../dom/HTMLTableRowElement/script-tests/cells.js | 56 ++++++ .../dom/HTMLTableSectionElement/rows-expected.txt | 24 +++ .../fast/dom/HTMLTableSectionElement/rows.html | 13 ++ .../script-tests/TEMPLATE.html | 13 ++ .../HTMLTableSectionElement/script-tests/rows.js | 44 +++++ .../fast/dom/Node/DOMNodeRemovedEvent-expected.txt | 10 + LayoutTests/fast/dom/Node/DOMNodeRemovedEvent.html | 13 ++ .../default-namespace-empty-argument-expected.txt | 5 + .../dom/Node/default-namespace-empty-argument.html | 8 + .../fast/dom/Node/fragment-mutation-expected.txt | 17 ++ LayoutTests/fast/dom/Node/fragment-mutation.html | 148 ++++++++++++++ .../fast/dom/Node/initial-values-expected.txt | 151 +++++++++++++++ LayoutTests/fast/dom/Node/initial-values.html | 13 ++ LayoutTests/fast/dom/Node/isEqualNode-expected.txt | 13 ++ LayoutTests/fast/dom/Node/isEqualNode.html | 13 ++ .../fast/dom/Node/mutation-blur-expected.txt | 4 + LayoutTests/fast/dom/Node/mutation-blur.html | 73 +++++++ LayoutTests/fast/dom/Node/normalize-expected.txt | 12 ++ .../dom/Node/normalize-with-cdata-expected.txt | 15 ++ .../fast/dom/Node/normalize-with-cdata.html | 13 ++ LayoutTests/fast/dom/Node/normalize.html | 213 +++++++++++++++++++++ .../dom/Node/script-tests/DOMNodeRemovedEvent.js | 12 ++ .../fast/dom/Node/script-tests/TEMPLATE.html | 13 ++ .../fast/dom/Node/script-tests/initial-values.js | 205 ++++++++++++++++++++ .../fast/dom/Node/script-tests/isEqualNode.js | 13 ++ .../dom/Node/script-tests/normalize-with-cdata.js | 22 +++ .../NodeList/5725058-crash-scenario-1-expected.txt | 3 + .../dom/NodeList/5725058-crash-scenario-1.html | 25 +++ .../NodeList/5725058-crash-scenario-2-expected.txt | 3 + .../dom/NodeList/5725058-crash-scenario-2.html | 42 ++++ .../NodeList/5725058-crash-scenario-3-expected.txt | 3 + .../dom/NodeList/5725058-crash-scenario-3.html | 18 ++ .../adoptNode-node-list-cache-expected.txt | 2 + .../dom/NodeList/adoptNode-node-list-cache.html | 56 ++++++ .../NodeList/childNodes-reset-cache-expected.txt | 3 + .../fast/dom/NodeList/childNodes-reset-cache.html | 36 ++++ ...invalidate-node-lists-when-parsing-expected.txt | 10 + .../invalidate-node-lists-when-parsing.html | 77 ++++++++ .../item-by-id-with-no-document-expected.txt | 1 + .../dom/NodeList/item-by-id-with-no-document.html | 13 ++ .../NodeList/nodelist-item-assignment-expected.txt | 23 +++ .../dom/NodeList/nodelist-item-assignment.html | 30 +++ .../nodelist-item-call-as-function-expected.txt | 12 ++ .../NodeList/nodelist-item-call-as-function.html | 13 ++ .../NodeList/nodelist-item-with-index-expected.txt | 18 ++ .../dom/NodeList/nodelist-item-with-index.html | 38 ++++ .../NodeList/nodelist-item-with-name-expected.txt | 16 ++ .../fast/dom/NodeList/nodelist-item-with-name.html | 30 +++ .../adoptNode-node-list-cache-subframe.html | 12 ++ .../fast/dom/NodeList/script-tests/TEMPLATE.html | 13 ++ .../script-tests/nodelist-item-call-as-function.js | 8 + .../fast/dom/Selection/getRangeAt-expected.txt | 10 + LayoutTests/fast/dom/Selection/getRangeAt.html | 13 ++ .../fast/dom/Selection/script-tests/TEMPLATE.html | 13 ++ .../fast/dom/Selection/script-tests/getRangeAt.js | 33 ++++ .../dom/StyleSheet/css-medialist-item-expected.txt | 14 ++ .../fast/dom/StyleSheet/css-medialist-item.html | 13 ++ .../StyleSheet/get-stylesheet-byname-expected.txt | 10 + .../fast/dom/StyleSheet/get-stylesheet-byname.html | 13 ++ .../StyleSheet/ownerNode-lifetime-2-expected.txt | 3 + .../fast/dom/StyleSheet/ownerNode-lifetime-2.html | 37 ++++ .../dom/StyleSheet/ownerNode-lifetime-expected.txt | 3 + .../fast/dom/StyleSheet/ownerNode-lifetime.html | 33 ++++ .../fast/dom/StyleSheet/script-tests/TEMPLATE.html | 13 ++ .../StyleSheet/script-tests/css-medialist-item.js | 16 ++ .../script-tests/get-stylesheet-byname.js | 8 + .../fast/dom/Text/replaceWholeText-expected.txt | 13 ++ LayoutTests/fast/dom/Text/replaceWholeText.html | 13 ++ .../fast/dom/Text/script-tests/TEMPLATE.html | 13 ++ .../fast/dom/Text/script-tests/replaceWholeText.js | 16 ++ .../TreeWalker/TreeWalker-currentNode-expected.txt | 36 ++++ .../dom/TreeWalker/TreeWalker-currentNode.html | 13 ++ .../dom/TreeWalker/acceptNode-filter-expected.txt | 53 +++++ .../fast/dom/TreeWalker/acceptNode-filter.html | 13 ++ .../fast/dom/TreeWalker/filter-throw-expected.txt | 21 ++ LayoutTests/fast/dom/TreeWalker/filter-throw.html | 13 ++ .../previousNodeLastChildReject-expected.txt | 14 ++ .../TreeWalker/previousNodeLastChildReject.html | 13 ++ .../previousSiblingLastChildSkip-expected.txt | 16 ++ .../TreeWalker/previousSiblingLastChildSkip.html | 13 ++ .../TreeWalker/resources/TreeWalker-currentNode.js | 55 ++++++ .../fast/dom/TreeWalker/script-tests/TEMPLATE.html | 13 ++ .../TreeWalker/script-tests/acceptNode-filter.js | 81 ++++++++ .../dom/TreeWalker/script-tests/filter-throw.js | 32 ++++ .../script-tests/previousNodeLastChildReject.js | 21 ++ .../script-tests/previousSiblingLastChildSkip.js | 23 +++ .../TreeWalker/script-tests/traversal-reject.js | 58 ++++++ .../TreeWalker/script-tests/traversal-skip-most.js | 27 +++ .../dom/TreeWalker/script-tests/traversal-skip.js | 60 ++++++ .../dom/TreeWalker/traversal-reject-expected.txt | 33 ++++ .../fast/dom/TreeWalker/traversal-reject.html | 13 ++ .../dom/TreeWalker/traversal-skip-expected.txt | 35 ++++ .../TreeWalker/traversal-skip-most-expected.txt | 16 ++ .../fast/dom/TreeWalker/traversal-skip-most.html | 13 ++ .../fast/dom/TreeWalker/traversal-skip.html | 13 ++ .../dom/beforeload/flash-before-load-expected.txt | 1 + .../fast/dom/beforeload/flash-before-load.html | 18 ++ .../dom/beforeload/frame-before-load-expected.txt | 1 + .../fast/dom/beforeload/frame-before-load.html | 17 ++ .../dom/beforeload/image-before-load-expected.txt | 1 + .../image-before-load-innerHTML-expected.txt | 2 + .../beforeload/image-before-load-innerHTML.html | 25 +++ .../fast/dom/beforeload/image-before-load.html | 16 ++ .../image-object-before-load-expected.txt | 2 + ...image-object-before-load-innerHTML-expected.txt | 2 + .../image-object-before-load-innerHTML.html | 32 ++++ .../dom/beforeload/image-object-before-load.html | 31 +++ .../dom/beforeload/link-before-load-expected.txt | 3 + .../fast/dom/beforeload/link-before-load.html | 30 +++ .../dom/beforeload/pi-before-load-expected.txt | 1 + .../fast/dom/beforeload/pi-before-load.xhtml | 41 ++++ ...-bad-object-in-beforeload-listener-expected.txt | 3 + .../remove-bad-object-in-beforeload-listener.html | 49 +++++ ...emove-flash-in-beforeload-listener-expected.txt | 3 + .../remove-flash-in-beforeload-listener.html | 48 +++++ ...emove-frame-in-beforeload-listener-expected.txt | 3 + .../remove-frame-in-beforeload-listener.html | 25 +++ ...emove-image-in-beforeload-listener-expected.txt | 3 + .../remove-image-in-beforeload-listener.html | 47 +++++ ...remove-link-in-beforeload-listener-expected.txt | 3 + .../remove-link-in-beforeload-listener.html | 25 +++ ...move-script-in-beforeload-listener-expected.txt | 3 + .../remove-script-in-beforeload-listener.html | 28 +++ ...emove-video-in-beforeload-listener-expected.txt | 3 + .../remove-video-in-beforeload-listener.html | 47 +++++ LayoutTests/fast/dom/beforeload/resources/fail.css | 5 + LayoutTests/fast/dom/beforeload/resources/fail.js | 1 + LayoutTests/fast/dom/beforeload/resources/print.js | 9 + .../script-before-load-dynamic-expected.txt | 3 + .../dom/beforeload/script-before-load-dynamic.html | 29 +++ .../dom/beforeload/script-before-load-expected.txt | 3 + .../script-before-load-xhtml-expected.txt | 3 + .../dom/beforeload/script-before-load-xhtml.xhtml | 28 +++ .../fast/dom/beforeload/script-before-load.html | 17 ++ .../dom/beforeload/video-before-load-expected.txt | 2 + .../fast/dom/beforeload/video-before-load.html | 17 ++ .../dom/getElementsByClassName/001-expected.txt | 1 + .../fast/dom/getElementsByClassName/001.html | 11 ++ .../dom/getElementsByClassName/002-expected.txt | 1 + .../fast/dom/getElementsByClassName/002.html | 13 ++ .../dom/getElementsByClassName/003-expected.txt | 1 + .../fast/dom/getElementsByClassName/003.html | 15 ++ .../dom/getElementsByClassName/004-expected.txt | 1 + .../fast/dom/getElementsByClassName/004.html | 15 ++ .../dom/getElementsByClassName/005-expected.txt | 1 + .../fast/dom/getElementsByClassName/005.html | 15 ++ .../dom/getElementsByClassName/006-expected.txt | 3 + .../fast/dom/getElementsByClassName/006.html | 17 ++ .../dom/getElementsByClassName/007-expected.txt | 1 + .../fast/dom/getElementsByClassName/007.html | 11 ++ .../dom/getElementsByClassName/008-expected.txt | 1 + .../fast/dom/getElementsByClassName/008.html | 11 ++ .../dom/getElementsByClassName/009-expected.txt | 1 + .../fast/dom/getElementsByClassName/009.html | 11 ++ .../dom/getElementsByClassName/010-expected.txt | 3 + .../fast/dom/getElementsByClassName/010.xml | 12 ++ .../dom/getElementsByClassName/011-expected.txt | 3 + .../fast/dom/getElementsByClassName/011.xml | 19 ++ .../dom/getElementsByClassName/012-expected.txt | 1 + .../fast/dom/getElementsByClassName/012.html | 11 ++ .../dom/getElementsByClassName/013-expected.txt | 3 + .../fast/dom/getElementsByClassName/013.html | 17 ++ .../dom/getElementsByClassName/014-expected.txt | 1 + .../fast/dom/getElementsByClassName/014.html | 14 ++ .../dom/getElementsByClassName/015-expected.txt | 1 + .../fast/dom/getElementsByClassName/015.html | 14 ++ .../getElementsByClassName/array/001-expected.txt | 1 + .../fast/dom/getElementsByClassName/array/001.html | 13 ++ .../getElementsByClassName/array/002-expected.txt | 1 + .../fast/dom/getElementsByClassName/array/002.html | 12 ++ .../getElementsByClassName/array/003-expected.txt | 1 + .../fast/dom/getElementsByClassName/array/003.html | 11 ++ .../getElementsByClassName/array/004-expected.txt | 1 + .../fast/dom/getElementsByClassName/array/004.html | 11 ++ .../dumpNodeList-expected.txt | 26 +++ .../dom/getElementsByClassName/dumpNodeList.html | 54 ++++++ .../dom/getElementsByClassName/resources/common.js | 21 ++ LayoutTests/fast/leaks/001-expected.txt | 4 + LayoutTests/fast/leaks/001.html | 22 +++ LayoutTests/fast/leaks/002-expected.txt | 4 + LayoutTests/fast/leaks/002.html | 20 ++ LayoutTests/fast/leaks/003-expected.txt | 4 + LayoutTests/fast/leaks/003.html-disabled | 61 ++++++ 302 files changed, 6854 insertions(+) create mode 100644 LayoutTests/fast/constructors/constructor-as-function-crash-expected.txt create mode 100644 LayoutTests/fast/constructors/constructor-as-function-crash.html create mode 100644 LayoutTests/fast/cookies/local-file-can-set-cookies-expected.txt create mode 100644 LayoutTests/fast/cookies/local-file-can-set-cookies.html create mode 100644 LayoutTests/fast/dom/Attr/access-after-element-destruction-expected.txt create mode 100644 LayoutTests/fast/dom/Attr/access-after-element-destruction.html create mode 100644 LayoutTests/fast/dom/Attr/child-nodes-cache-expected.txt create mode 100644 LayoutTests/fast/dom/Attr/child-nodes-cache.html create mode 100644 LayoutTests/fast/dom/Attr/child-nodes-length-cache-expected.txt create mode 100644 LayoutTests/fast/dom/Attr/child-nodes-length-cache.html create mode 100644 LayoutTests/fast/dom/Attr/script-tests/TEMPLATE.html create mode 100644 LayoutTests/fast/dom/Attr/script-tests/access-after-element-destruction.js create mode 100644 LayoutTests/fast/dom/CSSStyleDeclaration/css-computed-style-item-expected.txt create mode 100644 LayoutTests/fast/dom/CSSStyleDeclaration/css-computed-style-item.html create mode 100644 LayoutTests/fast/dom/CSSStyleDeclaration/css-properties-case-sensitive-expected.txt create mode 100644 LayoutTests/fast/dom/CSSStyleDeclaration/css-properties-case-sensitive.html create mode 100644 LayoutTests/fast/dom/CSSStyleDeclaration/css-style-item-expected.txt create mode 100644 LayoutTests/fast/dom/CSSStyleDeclaration/css-style-item.html create mode 100644 LayoutTests/fast/dom/CSSStyleDeclaration/empty-string-property-expected.txt create mode 100644 LayoutTests/fast/dom/CSSStyleDeclaration/empty-string-property.html create mode 100644 LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/TEMPLATE.html create mode 100644 LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-computed-style-item.js create mode 100644 LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-properties-case-sensitive.js create mode 100644 LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-style-item.js create mode 100644 LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/transition-property-names.js create mode 100644 LayoutTests/fast/dom/CSSStyleDeclaration/transition-property-names-expected.txt create mode 100644 LayoutTests/fast/dom/CSSStyleDeclaration/transition-property-names.html create mode 100644 LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err-expected.txt create mode 100644 LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err.html create mode 100644 LayoutTests/fast/dom/DOMImplementation/createDocument-with-used-doctype-expected.txt create mode 100644 LayoutTests/fast/dom/DOMImplementation/createDocument-with-used-doctype.html create mode 100644 LayoutTests/fast/dom/DOMImplementation/createDocumentType-err-expected.txt create mode 100644 LayoutTests/fast/dom/DOMImplementation/createDocumentType-err.html create mode 100644 LayoutTests/fast/dom/DOMImplementation/createHTMLDocument-title-expected.txt create mode 100644 LayoutTests/fast/dom/DOMImplementation/createHTMLDocument-title.html create mode 100644 LayoutTests/fast/dom/DOMImplementation/detached-doctype-expected.txt create mode 100644 LayoutTests/fast/dom/DOMImplementation/detached-doctype.html create mode 100644 LayoutTests/fast/dom/DOMImplementation/resources/createDocument-with-used-doctype-frame.html create mode 100644 LayoutTests/fast/dom/DOMImplementation/script-tests/TEMPLATE.html create mode 100644 LayoutTests/fast/dom/DOMImplementation/script-tests/createDocument-namespace-err.js create mode 100644 LayoutTests/fast/dom/DOMImplementation/script-tests/createDocumentType-err.js create mode 100644 LayoutTests/fast/dom/DeviceMotion/create-event-expected.txt create mode 100644 LayoutTests/fast/dom/DeviceMotion/create-event.html create mode 100644 LayoutTests/fast/dom/DeviceMotion/optional-event-properties-expected.txt create mode 100644 LayoutTests/fast/dom/DeviceMotion/optional-event-properties.html create mode 100644 LayoutTests/fast/dom/DeviceMotion/script-tests/TEMPLATE.html create mode 100644 LayoutTests/fast/dom/DeviceMotion/script-tests/create-event.js create mode 100644 LayoutTests/fast/dom/DeviceMotion/script-tests/optional-event-properties.js create mode 100644 LayoutTests/fast/dom/DeviceMotion/script-tests/window-property.js create mode 100644 LayoutTests/fast/dom/DeviceMotion/window-property-expected.txt create mode 100644 LayoutTests/fast/dom/DeviceMotion/window-property.html create mode 100644 LayoutTests/fast/dom/EntityReference/readonly-exceptions-expected.txt create mode 100644 LayoutTests/fast/dom/EntityReference/readonly-exceptions.html create mode 100644 LayoutTests/fast/dom/EntityReference/script-tests/TEMPLATE.html create mode 100644 LayoutTests/fast/dom/EntityReference/script-tests/readonly-exceptions.js create mode 100644 LayoutTests/fast/dom/HTMLAnchorElement/script-tests/TEMPLATE.html create mode 100644 LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-hash.js create mode 100644 LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-host.js create mode 100644 LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-hostname.js create mode 100644 LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-pathname.js create mode 100644 LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-port.js create mode 100644 LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-protocol.js create mode 100644 LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-search.js create mode 100644 LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-whitespace.js create mode 100644 LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hash-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hash.html create mode 100644 LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host.html create mode 100644 LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hostname-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hostname.html create mode 100644 LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-pathname-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-pathname.html create mode 100644 LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-port-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-port.html create mode 100644 LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol.html create mode 100644 LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-search-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-search.html create mode 100644 LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-whitespace-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-whitespace.html create mode 100644 LayoutTests/fast/dom/HTMLButtonElement/value/getset-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLButtonElement/value/getset.html create mode 100644 LayoutTests/fast/dom/HTMLFontElement/script-tests/TEMPLATE.html create mode 100644 LayoutTests/fast/dom/HTMLFontElement/script-tests/size-attribute.js create mode 100644 LayoutTests/fast/dom/HTMLFontElement/size-attribute-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLFontElement/size-attribute.html create mode 100644 LayoutTests/fast/dom/HTMLFormElement/adopt-assertion-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLFormElement/adopt-assertion.html create mode 100644 LayoutTests/fast/dom/HTMLFormElement/document-deactivation-callback-crash-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLFormElement/document-deactivation-callback-crash.html create mode 100644 LayoutTests/fast/dom/HTMLFormElement/elements-not-in-document-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLFormElement/elements-not-in-document.html create mode 100644 LayoutTests/fast/dom/HTMLFormElement/htmlformelement-indexed-getter-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLFormElement/htmlformelement-indexed-getter.html create mode 100644 LayoutTests/fast/dom/HTMLFormElement/script-tests/TEMPLATE.html create mode 100644 LayoutTests/fast/dom/HTMLFormElement/script-tests/elements-not-in-document.js create mode 100644 LayoutTests/fast/dom/HTMLHtmlElement/duplicate-html-element-crash-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLHtmlElement/duplicate-html-element-crash.html create mode 100644 LayoutTests/fast/dom/HTMLHtmlElement/set-version-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLHtmlElement/set-version.html create mode 100644 LayoutTests/fast/dom/HTMLKeygenElement/keygen-option-select-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLKeygenElement/keygen-option-select.html create mode 100644 LayoutTests/fast/dom/HTMLLabelElement/click-label-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLLabelElement/click-label.html create mode 100644 LayoutTests/fast/dom/HTMLLabelElement/focus-label-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLLabelElement/focus-label.html create mode 100644 LayoutTests/fast/dom/HTMLLabelElement/form/test1-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLLabelElement/form/test1.html create mode 100644 LayoutTests/fast/dom/HTMLLabelElement/label-control-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLLabelElement/label-control.html create mode 100644 LayoutTests/fast/dom/HTMLLabelElement/script-tests/TEMPLATE.html create mode 100644 LayoutTests/fast/dom/HTMLLabelElement/script-tests/label-control.js create mode 100644 LayoutTests/fast/dom/HTMLMetaElement/meta-attributes-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLMetaElement/meta-attributes.html create mode 100644 LayoutTests/fast/dom/HTMLTableRowElement/cells-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLTableRowElement/cells.html create mode 100644 LayoutTests/fast/dom/HTMLTableRowElement/insertCell-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLTableRowElement/insertCell.html create mode 100644 LayoutTests/fast/dom/HTMLTableRowElement/script-tests/TEMPLATE.html create mode 100644 LayoutTests/fast/dom/HTMLTableRowElement/script-tests/cells.js create mode 100644 LayoutTests/fast/dom/HTMLTableSectionElement/rows-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLTableSectionElement/rows.html create mode 100644 LayoutTests/fast/dom/HTMLTableSectionElement/script-tests/TEMPLATE.html create mode 100644 LayoutTests/fast/dom/HTMLTableSectionElement/script-tests/rows.js create mode 100644 LayoutTests/fast/dom/Node/DOMNodeRemovedEvent-expected.txt create mode 100644 LayoutTests/fast/dom/Node/DOMNodeRemovedEvent.html create mode 100644 LayoutTests/fast/dom/Node/default-namespace-empty-argument-expected.txt create mode 100644 LayoutTests/fast/dom/Node/default-namespace-empty-argument.html create mode 100644 LayoutTests/fast/dom/Node/fragment-mutation-expected.txt create mode 100644 LayoutTests/fast/dom/Node/fragment-mutation.html create mode 100644 LayoutTests/fast/dom/Node/initial-values-expected.txt create mode 100644 LayoutTests/fast/dom/Node/initial-values.html create mode 100644 LayoutTests/fast/dom/Node/isEqualNode-expected.txt create mode 100644 LayoutTests/fast/dom/Node/isEqualNode.html create mode 100644 LayoutTests/fast/dom/Node/mutation-blur-expected.txt create mode 100644 LayoutTests/fast/dom/Node/mutation-blur.html create mode 100644 LayoutTests/fast/dom/Node/normalize-expected.txt create mode 100644 LayoutTests/fast/dom/Node/normalize-with-cdata-expected.txt create mode 100644 LayoutTests/fast/dom/Node/normalize-with-cdata.html create mode 100644 LayoutTests/fast/dom/Node/normalize.html create mode 100644 LayoutTests/fast/dom/Node/script-tests/DOMNodeRemovedEvent.js create mode 100644 LayoutTests/fast/dom/Node/script-tests/TEMPLATE.html create mode 100644 LayoutTests/fast/dom/Node/script-tests/initial-values.js create mode 100644 LayoutTests/fast/dom/Node/script-tests/isEqualNode.js create mode 100644 LayoutTests/fast/dom/Node/script-tests/normalize-with-cdata.js create mode 100644 LayoutTests/fast/dom/NodeList/5725058-crash-scenario-1-expected.txt create mode 100644 LayoutTests/fast/dom/NodeList/5725058-crash-scenario-1.html create mode 100644 LayoutTests/fast/dom/NodeList/5725058-crash-scenario-2-expected.txt create mode 100644 LayoutTests/fast/dom/NodeList/5725058-crash-scenario-2.html create mode 100644 LayoutTests/fast/dom/NodeList/5725058-crash-scenario-3-expected.txt create mode 100644 LayoutTests/fast/dom/NodeList/5725058-crash-scenario-3.html create mode 100644 LayoutTests/fast/dom/NodeList/adoptNode-node-list-cache-expected.txt create mode 100644 LayoutTests/fast/dom/NodeList/adoptNode-node-list-cache.html create mode 100644 LayoutTests/fast/dom/NodeList/childNodes-reset-cache-expected.txt create mode 100644 LayoutTests/fast/dom/NodeList/childNodes-reset-cache.html create mode 100644 LayoutTests/fast/dom/NodeList/invalidate-node-lists-when-parsing-expected.txt create mode 100644 LayoutTests/fast/dom/NodeList/invalidate-node-lists-when-parsing.html create mode 100644 LayoutTests/fast/dom/NodeList/item-by-id-with-no-document-expected.txt create mode 100644 LayoutTests/fast/dom/NodeList/item-by-id-with-no-document.html create mode 100644 LayoutTests/fast/dom/NodeList/nodelist-item-assignment-expected.txt create mode 100644 LayoutTests/fast/dom/NodeList/nodelist-item-assignment.html create mode 100644 LayoutTests/fast/dom/NodeList/nodelist-item-call-as-function-expected.txt create mode 100644 LayoutTests/fast/dom/NodeList/nodelist-item-call-as-function.html create mode 100644 LayoutTests/fast/dom/NodeList/nodelist-item-with-index-expected.txt create mode 100644 LayoutTests/fast/dom/NodeList/nodelist-item-with-index.html create mode 100644 LayoutTests/fast/dom/NodeList/nodelist-item-with-name-expected.txt create mode 100644 LayoutTests/fast/dom/NodeList/nodelist-item-with-name.html create mode 100644 LayoutTests/fast/dom/NodeList/resources/adoptNode-node-list-cache-subframe.html create mode 100644 LayoutTests/fast/dom/NodeList/script-tests/TEMPLATE.html create mode 100644 LayoutTests/fast/dom/NodeList/script-tests/nodelist-item-call-as-function.js create mode 100644 LayoutTests/fast/dom/Selection/getRangeAt-expected.txt create mode 100644 LayoutTests/fast/dom/Selection/getRangeAt.html create mode 100644 LayoutTests/fast/dom/Selection/script-tests/TEMPLATE.html create mode 100644 LayoutTests/fast/dom/Selection/script-tests/getRangeAt.js create mode 100644 LayoutTests/fast/dom/StyleSheet/css-medialist-item-expected.txt create mode 100644 LayoutTests/fast/dom/StyleSheet/css-medialist-item.html create mode 100644 LayoutTests/fast/dom/StyleSheet/get-stylesheet-byname-expected.txt create mode 100644 LayoutTests/fast/dom/StyleSheet/get-stylesheet-byname.html create mode 100644 LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-2-expected.txt create mode 100644 LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-2.html create mode 100644 LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-expected.txt create mode 100644 LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime.html create mode 100644 LayoutTests/fast/dom/StyleSheet/script-tests/TEMPLATE.html create mode 100644 LayoutTests/fast/dom/StyleSheet/script-tests/css-medialist-item.js create mode 100644 LayoutTests/fast/dom/StyleSheet/script-tests/get-stylesheet-byname.js create mode 100644 LayoutTests/fast/dom/Text/replaceWholeText-expected.txt create mode 100644 LayoutTests/fast/dom/Text/replaceWholeText.html create mode 100644 LayoutTests/fast/dom/Text/script-tests/TEMPLATE.html create mode 100644 LayoutTests/fast/dom/Text/script-tests/replaceWholeText.js create mode 100644 LayoutTests/fast/dom/TreeWalker/TreeWalker-currentNode-expected.txt create mode 100644 LayoutTests/fast/dom/TreeWalker/TreeWalker-currentNode.html create mode 100644 LayoutTests/fast/dom/TreeWalker/acceptNode-filter-expected.txt create mode 100644 LayoutTests/fast/dom/TreeWalker/acceptNode-filter.html create mode 100644 LayoutTests/fast/dom/TreeWalker/filter-throw-expected.txt create mode 100644 LayoutTests/fast/dom/TreeWalker/filter-throw.html create mode 100644 LayoutTests/fast/dom/TreeWalker/previousNodeLastChildReject-expected.txt create mode 100644 LayoutTests/fast/dom/TreeWalker/previousNodeLastChildReject.html create mode 100644 LayoutTests/fast/dom/TreeWalker/previousSiblingLastChildSkip-expected.txt create mode 100644 LayoutTests/fast/dom/TreeWalker/previousSiblingLastChildSkip.html create mode 100644 LayoutTests/fast/dom/TreeWalker/resources/TreeWalker-currentNode.js create mode 100644 LayoutTests/fast/dom/TreeWalker/script-tests/TEMPLATE.html create mode 100644 LayoutTests/fast/dom/TreeWalker/script-tests/acceptNode-filter.js create mode 100644 LayoutTests/fast/dom/TreeWalker/script-tests/filter-throw.js create mode 100644 LayoutTests/fast/dom/TreeWalker/script-tests/previousNodeLastChildReject.js create mode 100644 LayoutTests/fast/dom/TreeWalker/script-tests/previousSiblingLastChildSkip.js create mode 100644 LayoutTests/fast/dom/TreeWalker/script-tests/traversal-reject.js create mode 100644 LayoutTests/fast/dom/TreeWalker/script-tests/traversal-skip-most.js create mode 100644 LayoutTests/fast/dom/TreeWalker/script-tests/traversal-skip.js create mode 100644 LayoutTests/fast/dom/TreeWalker/traversal-reject-expected.txt create mode 100644 LayoutTests/fast/dom/TreeWalker/traversal-reject.html create mode 100644 LayoutTests/fast/dom/TreeWalker/traversal-skip-expected.txt create mode 100644 LayoutTests/fast/dom/TreeWalker/traversal-skip-most-expected.txt create mode 100644 LayoutTests/fast/dom/TreeWalker/traversal-skip-most.html create mode 100644 LayoutTests/fast/dom/TreeWalker/traversal-skip.html create mode 100644 LayoutTests/fast/dom/beforeload/flash-before-load-expected.txt create mode 100644 LayoutTests/fast/dom/beforeload/flash-before-load.html create mode 100644 LayoutTests/fast/dom/beforeload/frame-before-load-expected.txt create mode 100644 LayoutTests/fast/dom/beforeload/frame-before-load.html create mode 100644 LayoutTests/fast/dom/beforeload/image-before-load-expected.txt create mode 100644 LayoutTests/fast/dom/beforeload/image-before-load-innerHTML-expected.txt create mode 100644 LayoutTests/fast/dom/beforeload/image-before-load-innerHTML.html create mode 100644 LayoutTests/fast/dom/beforeload/image-before-load.html create mode 100644 LayoutTests/fast/dom/beforeload/image-object-before-load-expected.txt create mode 100644 LayoutTests/fast/dom/beforeload/image-object-before-load-innerHTML-expected.txt create mode 100644 LayoutTests/fast/dom/beforeload/image-object-before-load-innerHTML.html create mode 100644 LayoutTests/fast/dom/beforeload/image-object-before-load.html create mode 100644 LayoutTests/fast/dom/beforeload/link-before-load-expected.txt create mode 100644 LayoutTests/fast/dom/beforeload/link-before-load.html create mode 100644 LayoutTests/fast/dom/beforeload/pi-before-load-expected.txt create mode 100644 LayoutTests/fast/dom/beforeload/pi-before-load.xhtml create mode 100644 LayoutTests/fast/dom/beforeload/remove-bad-object-in-beforeload-listener-expected.txt create mode 100644 LayoutTests/fast/dom/beforeload/remove-bad-object-in-beforeload-listener.html create mode 100644 LayoutTests/fast/dom/beforeload/remove-flash-in-beforeload-listener-expected.txt create mode 100644 LayoutTests/fast/dom/beforeload/remove-flash-in-beforeload-listener.html create mode 100644 LayoutTests/fast/dom/beforeload/remove-frame-in-beforeload-listener-expected.txt create mode 100644 LayoutTests/fast/dom/beforeload/remove-frame-in-beforeload-listener.html create mode 100644 LayoutTests/fast/dom/beforeload/remove-image-in-beforeload-listener-expected.txt create mode 100644 LayoutTests/fast/dom/beforeload/remove-image-in-beforeload-listener.html create mode 100644 LayoutTests/fast/dom/beforeload/remove-link-in-beforeload-listener-expected.txt create mode 100644 LayoutTests/fast/dom/beforeload/remove-link-in-beforeload-listener.html create mode 100644 LayoutTests/fast/dom/beforeload/remove-script-in-beforeload-listener-expected.txt create mode 100644 LayoutTests/fast/dom/beforeload/remove-script-in-beforeload-listener.html create mode 100644 LayoutTests/fast/dom/beforeload/remove-video-in-beforeload-listener-expected.txt create mode 100644 LayoutTests/fast/dom/beforeload/remove-video-in-beforeload-listener.html create mode 100644 LayoutTests/fast/dom/beforeload/resources/fail.css create mode 100644 LayoutTests/fast/dom/beforeload/resources/fail.js create mode 100644 LayoutTests/fast/dom/beforeload/resources/print.js create mode 100644 LayoutTests/fast/dom/beforeload/script-before-load-dynamic-expected.txt create mode 100644 LayoutTests/fast/dom/beforeload/script-before-load-dynamic.html create mode 100644 LayoutTests/fast/dom/beforeload/script-before-load-expected.txt create mode 100644 LayoutTests/fast/dom/beforeload/script-before-load-xhtml-expected.txt create mode 100644 LayoutTests/fast/dom/beforeload/script-before-load-xhtml.xhtml create mode 100644 LayoutTests/fast/dom/beforeload/script-before-load.html create mode 100644 LayoutTests/fast/dom/beforeload/video-before-load-expected.txt create mode 100644 LayoutTests/fast/dom/beforeload/video-before-load.html create mode 100644 LayoutTests/fast/dom/getElementsByClassName/001-expected.txt create mode 100644 LayoutTests/fast/dom/getElementsByClassName/001.html create mode 100644 LayoutTests/fast/dom/getElementsByClassName/002-expected.txt create mode 100644 LayoutTests/fast/dom/getElementsByClassName/002.html create mode 100644 LayoutTests/fast/dom/getElementsByClassName/003-expected.txt create mode 100644 LayoutTests/fast/dom/getElementsByClassName/003.html create mode 100644 LayoutTests/fast/dom/getElementsByClassName/004-expected.txt create mode 100644 LayoutTests/fast/dom/getElementsByClassName/004.html create mode 100644 LayoutTests/fast/dom/getElementsByClassName/005-expected.txt create mode 100644 LayoutTests/fast/dom/getElementsByClassName/005.html create mode 100644 LayoutTests/fast/dom/getElementsByClassName/006-expected.txt create mode 100644 LayoutTests/fast/dom/getElementsByClassName/006.html create mode 100644 LayoutTests/fast/dom/getElementsByClassName/007-expected.txt create mode 100644 LayoutTests/fast/dom/getElementsByClassName/007.html create mode 100644 LayoutTests/fast/dom/getElementsByClassName/008-expected.txt create mode 100644 LayoutTests/fast/dom/getElementsByClassName/008.html create mode 100644 LayoutTests/fast/dom/getElementsByClassName/009-expected.txt create mode 100644 LayoutTests/fast/dom/getElementsByClassName/009.html create mode 100644 LayoutTests/fast/dom/getElementsByClassName/010-expected.txt create mode 100644 LayoutTests/fast/dom/getElementsByClassName/010.xml create mode 100644 LayoutTests/fast/dom/getElementsByClassName/011-expected.txt create mode 100644 LayoutTests/fast/dom/getElementsByClassName/011.xml create mode 100644 LayoutTests/fast/dom/getElementsByClassName/012-expected.txt create mode 100644 LayoutTests/fast/dom/getElementsByClassName/012.html create mode 100644 LayoutTests/fast/dom/getElementsByClassName/013-expected.txt create mode 100644 LayoutTests/fast/dom/getElementsByClassName/013.html create mode 100644 LayoutTests/fast/dom/getElementsByClassName/014-expected.txt create mode 100644 LayoutTests/fast/dom/getElementsByClassName/014.html create mode 100644 LayoutTests/fast/dom/getElementsByClassName/015-expected.txt create mode 100644 LayoutTests/fast/dom/getElementsByClassName/015.html create mode 100644 LayoutTests/fast/dom/getElementsByClassName/array/001-expected.txt create mode 100644 LayoutTests/fast/dom/getElementsByClassName/array/001.html create mode 100644 LayoutTests/fast/dom/getElementsByClassName/array/002-expected.txt create mode 100644 LayoutTests/fast/dom/getElementsByClassName/array/002.html create mode 100644 LayoutTests/fast/dom/getElementsByClassName/array/003-expected.txt create mode 100644 LayoutTests/fast/dom/getElementsByClassName/array/003.html create mode 100644 LayoutTests/fast/dom/getElementsByClassName/array/004-expected.txt create mode 100644 LayoutTests/fast/dom/getElementsByClassName/array/004.html create mode 100644 LayoutTests/fast/dom/getElementsByClassName/dumpNodeList-expected.txt create mode 100644 LayoutTests/fast/dom/getElementsByClassName/dumpNodeList.html create mode 100644 LayoutTests/fast/dom/getElementsByClassName/resources/common.js create mode 100644 LayoutTests/fast/leaks/001-expected.txt create mode 100644 LayoutTests/fast/leaks/001.html create mode 100644 LayoutTests/fast/leaks/002-expected.txt create mode 100644 LayoutTests/fast/leaks/002.html create mode 100644 LayoutTests/fast/leaks/003-expected.txt create mode 100644 LayoutTests/fast/leaks/003.html-disabled (limited to 'LayoutTests') diff --git a/LayoutTests/fast/constructors/constructor-as-function-crash-expected.txt b/LayoutTests/fast/constructors/constructor-as-function-crash-expected.txt new file mode 100644 index 0000000..cf56e2e --- /dev/null +++ b/LayoutTests/fast/constructors/constructor-as-function-crash-expected.txt @@ -0,0 +1,13 @@ +Calling bindings constructors as function should throw an exception and not cause a crash. + +PASS: EventSource +PASS: MessageChannel +PASS: SharedWorker +PASS: WebGLArrayBuffer +PASS: WebKitCSSMatrix +PASS: WebKitPoint +PASS: WebSocket +PASS: Worker +PASS: XMLHttpRequest +PASS: XSLTProcessor + diff --git a/LayoutTests/fast/constructors/constructor-as-function-crash.html b/LayoutTests/fast/constructors/constructor-as-function-crash.html new file mode 100644 index 0000000..29e20d3 --- /dev/null +++ b/LayoutTests/fast/constructors/constructor-as-function-crash.html @@ -0,0 +1,32 @@ + + + Calling bindings constructors as function should not cause a crash + + + +

Calling bindings constructors as function should throw an exception and not cause a crash.

+
+ + diff --git a/LayoutTests/fast/cookies/local-file-can-set-cookies-expected.txt b/LayoutTests/fast/cookies/local-file-can-set-cookies-expected.txt new file mode 100644 index 0000000..0886317 --- /dev/null +++ b/LayoutTests/fast/cookies/local-file-can-set-cookies-expected.txt @@ -0,0 +1,11 @@ +This test checks that a local file can set cookies. See: rdar://problem/5379090 REGRESSION: Cannot set cookies for local files + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS document.cookie.indexOf('ppkcookie1=testcookie') is -1 +PASS document.cookie.indexOf('ppkcookie1=testcookie') >= 0 is true +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/cookies/local-file-can-set-cookies.html b/LayoutTests/fast/cookies/local-file-can-set-cookies.html new file mode 100644 index 0000000..10468ae --- /dev/null +++ b/LayoutTests/fast/cookies/local-file-can-set-cookies.html @@ -0,0 +1,23 @@ + + +Local File Can Set Cookies + + + + + +

+
+ + + + + diff --git a/LayoutTests/fast/dom/Attr/access-after-element-destruction-expected.txt b/LayoutTests/fast/dom/Attr/access-after-element-destruction-expected.txt new file mode 100644 index 0000000..8c09132 --- /dev/null +++ b/LayoutTests/fast/dom/Attr/access-after-element-destruction-expected.txt @@ -0,0 +1,25 @@ +Tests that accessing Attr after its Element has been destroyed works without crashing. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS attributes.length is 1 +PASS attributes[0] is attributes.item(0) +PASS attributes.getNamedItem('a') is attributes.item(0) +PASS attributes.item(0).name is 'a' +PASS attributes.item(0).specified is true +PASS attributes.item(0).value is 'b' +PASS attributes.item(0).ownerElement.tagName is 'P' +PASS attributes.item(0).style is null +PASS attributes.item(0).value is 'c' +PASS attributes.length is 0 +PASS attr.name is 'a' +PASS attr.specified is true +PASS attr.value is 'b' +PASS attr.ownerElement.tagName is 'P' +PASS attr.style is null +PASS attr.value is 'c' +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/Attr/access-after-element-destruction.html b/LayoutTests/fast/dom/Attr/access-after-element-destruction.html new file mode 100644 index 0000000..39e014d --- /dev/null +++ b/LayoutTests/fast/dom/Attr/access-after-element-destruction.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/Attr/child-nodes-cache-expected.txt b/LayoutTests/fast/dom/Attr/child-nodes-cache-expected.txt new file mode 100644 index 0000000..9976b12 --- /dev/null +++ b/LayoutTests/fast/dom/Attr/child-nodes-cache-expected.txt @@ -0,0 +1,3 @@ +PASS + + diff --git a/LayoutTests/fast/dom/Attr/child-nodes-cache.html b/LayoutTests/fast/dom/Attr/child-nodes-cache.html new file mode 100644 index 0000000..7805946 --- /dev/null +++ b/LayoutTests/fast/dom/Attr/child-nodes-cache.html @@ -0,0 +1,38 @@ + +

Running test...

+ + diff --git a/LayoutTests/fast/dom/Attr/child-nodes-length-cache-expected.txt b/LayoutTests/fast/dom/Attr/child-nodes-length-cache-expected.txt new file mode 100644 index 0000000..b253fa1 --- /dev/null +++ b/LayoutTests/fast/dom/Attr/child-nodes-length-cache-expected.txt @@ -0,0 +1,3 @@ +Test for bug 19759: ChildNodeList for an attribute node is not properly invalidated after appending a child. + +Passed!! diff --git a/LayoutTests/fast/dom/Attr/child-nodes-length-cache.html b/LayoutTests/fast/dom/Attr/child-nodes-length-cache.html new file mode 100644 index 0000000..5c09794 --- /dev/null +++ b/LayoutTests/fast/dom/Attr/child-nodes-length-cache.html @@ -0,0 +1,38 @@ + + + + + +

Test for bug 19759: +ChildNodeList for an attribute node is not properly invalidated after appending a child.

+
Hello
+
Testing...
+ + diff --git a/LayoutTests/fast/dom/Attr/script-tests/TEMPLATE.html b/LayoutTests/fast/dom/Attr/script-tests/TEMPLATE.html new file mode 100644 index 0000000..1951c43 --- /dev/null +++ b/LayoutTests/fast/dom/Attr/script-tests/TEMPLATE.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/Attr/script-tests/access-after-element-destruction.js b/LayoutTests/fast/dom/Attr/script-tests/access-after-element-destruction.js new file mode 100644 index 0000000..91588a3 --- /dev/null +++ b/LayoutTests/fast/dom/Attr/script-tests/access-after-element-destruction.js @@ -0,0 +1,55 @@ +description("Tests that accessing Attr after its Element has been destroyed works without crashing."); + +function gc() +{ + if (window.GCController) + return GCController.collect(); + + // Trigger garbage collection indirectly. + for (var i = 0; i < 100000; i++) + new String(i); +} + +var element = document.createElement("p"); +element.setAttribute("a", "b"); +var attributes = element.attributes; +element = null; + +gc(); + +shouldBe("attributes.length", "1"); +shouldBe("attributes[0]", "attributes.item(0)"); +shouldBe("attributes.getNamedItem('a')", "attributes.item(0)"); + +shouldBe("attributes.item(0).name", "'a'"); +shouldBe("attributes.item(0).specified", "true"); +shouldBe("attributes.item(0).value", "'b'"); +shouldBe("attributes.item(0).ownerElement.tagName", "'P'"); +shouldBe("attributes.item(0).style", "null"); + +attributes.item(0).value = 'c'; + +shouldBe("attributes.item(0).value", "'c'"); + +attributes.removeNamedItem('a'); + +shouldBe("attributes.length", "0"); + +element = document.createElement("p"); +element.setAttribute("a", "b"); +var attr = element.attributes.item(0); +element = null; + +gc(); + +shouldBe("attr.name", "'a'"); +shouldBe("attr.specified", "true"); +shouldBe("attr.value", "'b'"); +shouldBe("attr.ownerElement.tagName", "'P'"); +shouldBe("attr.style", "null"); + +attr.value = 'c'; + +shouldBe("attr.value", "'c'"); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/CSSStyleDeclaration/css-computed-style-item-expected.txt b/LayoutTests/fast/dom/CSSStyleDeclaration/css-computed-style-item-expected.txt new file mode 100644 index 0000000..b425aab --- /dev/null +++ b/LayoutTests/fast/dom/CSSStyleDeclaration/css-computed-style-item-expected.txt @@ -0,0 +1,12 @@ +This tests indexing outside the range of the computed style object. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS typeof computedStyle.length is "number" +PASS computedStyle[computedStyle.length] is "" +PASS computedStyle[-1] is undefined. +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/CSSStyleDeclaration/css-computed-style-item.html b/LayoutTests/fast/dom/CSSStyleDeclaration/css-computed-style-item.html new file mode 100644 index 0000000..155c672 --- /dev/null +++ b/LayoutTests/fast/dom/CSSStyleDeclaration/css-computed-style-item.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/CSSStyleDeclaration/css-properties-case-sensitive-expected.txt b/LayoutTests/fast/dom/CSSStyleDeclaration/css-properties-case-sensitive-expected.txt new file mode 100644 index 0000000..a56522b --- /dev/null +++ b/LayoutTests/fast/dom/CSSStyleDeclaration/css-properties-case-sensitive-expected.txt @@ -0,0 +1,34 @@ +This test checks that access to CSS properties via JavaScript properties on DOM elements is case sensitive. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +normal cases + +PASS element.style.zIndex is '1' +PASS element.style.ZIndex is undefined. + +"css" prefix + +PASS element.style.cssZIndex is '1' +PASS element.style.CssZIndex is '1' +PASS element.style.CsszIndex is undefined. +PASS element.style.csszIndex is undefined. + +"pixel" prefix + +PASS element.style.pixelZIndex is 1 +PASS element.style.PixelZIndex is 1 +PASS element.style.pixelzIndex is undefined. +PASS element.style.PixelzIndex is undefined. + +"pos" prefix + +PASS element.style.posZIndex is 1 +PASS element.style.PosZIndex is 1 +PASS element.style.poszIndex is undefined. +PASS element.style.PoszIndex is undefined. +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/CSSStyleDeclaration/css-properties-case-sensitive.html b/LayoutTests/fast/dom/CSSStyleDeclaration/css-properties-case-sensitive.html new file mode 100644 index 0000000..9a17597 --- /dev/null +++ b/LayoutTests/fast/dom/CSSStyleDeclaration/css-properties-case-sensitive.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/CSSStyleDeclaration/css-style-item-expected.txt b/LayoutTests/fast/dom/CSSStyleDeclaration/css-style-item-expected.txt new file mode 100644 index 0000000..5b57e49 --- /dev/null +++ b/LayoutTests/fast/dom/CSSStyleDeclaration/css-style-item-expected.txt @@ -0,0 +1,13 @@ +This tests indexing outside the range of the style object. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS style.length is 1 +PASS style[0] is "color" +PASS style[1] is "" +PASS style[-1] is undefined. +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/CSSStyleDeclaration/css-style-item.html b/LayoutTests/fast/dom/CSSStyleDeclaration/css-style-item.html new file mode 100644 index 0000000..b0858cc --- /dev/null +++ b/LayoutTests/fast/dom/CSSStyleDeclaration/css-style-item.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/CSSStyleDeclaration/empty-string-property-expected.txt b/LayoutTests/fast/dom/CSSStyleDeclaration/empty-string-property-expected.txt new file mode 100644 index 0000000..f5c31f9 --- /dev/null +++ b/LayoutTests/fast/dom/CSSStyleDeclaration/empty-string-property-expected.txt @@ -0,0 +1,5 @@ +Regression test for http://bugs.webkit.org/show_bug.cgi?id=15169 Freeze on Google maps using the "Dig a hole" tool. + +This tests that the empty string property of a CSSStyleDeclaration is undefined and that retrieving it does not cause a hang. + +PASS diff --git a/LayoutTests/fast/dom/CSSStyleDeclaration/empty-string-property.html b/LayoutTests/fast/dom/CSSStyleDeclaration/empty-string-property.html new file mode 100644 index 0000000..5f28965 --- /dev/null +++ b/LayoutTests/fast/dom/CSSStyleDeclaration/empty-string-property.html @@ -0,0 +1,18 @@ + +

+ Regression test for http://bugs.webkit.org/show_bug.cgi?id=15169 + Freeze on Google maps using the "Dig a hole" tool. +

+

+ This tests that the empty string property of a CSSStyleDeclaration is + undefined and that retrieving it does not cause a hang. +

+

FAIL (timed out or did not finish)

+ + diff --git a/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/TEMPLATE.html b/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/TEMPLATE.html new file mode 100644 index 0000000..1951c43 --- /dev/null +++ b/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/TEMPLATE.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-computed-style-item.js b/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-computed-style-item.js new file mode 100644 index 0000000..8522f65 --- /dev/null +++ b/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-computed-style-item.js @@ -0,0 +1,14 @@ +description("This tests indexing outside the range of the computed style object."); + +var element = document.createElement('div'); +element.style.color = 'rgb(120, 120, 120)'; +document.documentElement.appendChild(element); +var computedStyle = window.getComputedStyle(element, null); + +shouldBeEqualToString('typeof computedStyle.length', 'number'); +shouldBeEqualToString('computedStyle[computedStyle.length]', ''); +shouldBeUndefined('computedStyle[-1]') + +document.documentElement.removeChild(element); + +successfullyParsed = true; diff --git a/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-properties-case-sensitive.js b/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-properties-case-sensitive.js new file mode 100644 index 0000000..15949a2 --- /dev/null +++ b/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-properties-case-sensitive.js @@ -0,0 +1,41 @@ +description( +'This test checks that access to CSS properties via JavaScript properties on DOM elements is case sensitive.' +); + +var element = document.createElement('a'); +element.style.zIndex = 1; + +debug('normal cases'); +debug(''); + +shouldBe("element.style.zIndex", "'1'"); +shouldBeUndefined("element.style.ZIndex"); + +debug(''); +debug('"css" prefix'); +debug(''); + +shouldBe("element.style.cssZIndex", "'1'"); +shouldBe("element.style.CssZIndex", "'1'"); +shouldBeUndefined("element.style.CsszIndex"); +shouldBeUndefined("element.style.csszIndex"); + +debug(''); +debug('"pixel" prefix'); +debug(''); + +shouldBe("element.style.pixelZIndex", "1"); +shouldBe("element.style.PixelZIndex", "1"); +shouldBeUndefined("element.style.pixelzIndex"); +shouldBeUndefined("element.style.PixelzIndex"); + +debug(''); +debug('"pos" prefix'); +debug(''); + +shouldBe("element.style.posZIndex", "1"); +shouldBe("element.style.PosZIndex", "1"); +shouldBeUndefined("element.style.poszIndex"); +shouldBeUndefined("element.style.PoszIndex"); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-style-item.js b/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-style-item.js new file mode 100644 index 0000000..ad85fb9 --- /dev/null +++ b/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-style-item.js @@ -0,0 +1,15 @@ +description("This tests indexing outside the range of the style object."); + +var element = document.createElement('div'); +element.style.color = 'red'; +document.documentElement.appendChild(element); +var style = element.style; + +shouldEvaluateTo('style.length', 1); +shouldBeEqualToString('style[0]', 'color'); +shouldBeEqualToString('style[1]', ''); +shouldBeUndefined('style[-1]') + +document.documentElement.removeChild(element); + +successfullyParsed = true; diff --git a/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/transition-property-names.js b/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/transition-property-names.js new file mode 100644 index 0000000..4fbfc43 --- /dev/null +++ b/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/transition-property-names.js @@ -0,0 +1,13 @@ +description( +'This test checks that CSS property names work round trip in the transition property.' +); + +var element = document.createElement('a'); + +element.style.webkitTransitionProperty = "height"; +shouldBe("element.style.webkitTransitionProperty", "'height'"); + +element.style.webkitTransitionProperty = "opacity"; +shouldBe("element.style.webkitTransitionProperty", "'opacity'"); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/CSSStyleDeclaration/transition-property-names-expected.txt b/LayoutTests/fast/dom/CSSStyleDeclaration/transition-property-names-expected.txt new file mode 100644 index 0000000..fe7940f --- /dev/null +++ b/LayoutTests/fast/dom/CSSStyleDeclaration/transition-property-names-expected.txt @@ -0,0 +1,11 @@ +This test checks that CSS property names work round trip in the transition property. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS element.style.webkitTransitionProperty is 'height' +PASS element.style.webkitTransitionProperty is 'opacity' +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/CSSStyleDeclaration/transition-property-names.html b/LayoutTests/fast/dom/CSSStyleDeclaration/transition-property-names.html new file mode 100644 index 0000000..55f87e0 --- /dev/null +++ b/LayoutTests/fast/dom/CSSStyleDeclaration/transition-property-names.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err-expected.txt b/LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err-expected.txt new file mode 100644 index 0000000..09d4bdc --- /dev/null +++ b/LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err-expected.txt @@ -0,0 +1,51 @@ +createDocument tests modeled after createElementNS tests from mozilla which were attached to webkit bug 16833 + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS document.implementation.createDocument().toString() is "[object Document]" +PASS document.implementation.createDocument("http://www.example.com").toString() is "[object Document]" +PASS createDocument(, , null) +PASS createDocument(null, , null) +FAIL createDocument(, null, null) +FAIL createDocument(null, null, null) +FAIL createDocument(null, "", null) +FAIL createDocument("", null, null) +FAIL createDocument("", "", null) +PASS createDocument(null, "
", null); threw INVALID_CHARACTER_ERR +PASS createDocument(null, "0div", null); threw INVALID_CHARACTER_ERR +PASS createDocument(null, "di v", null); threw INVALID_CHARACTER_ERR +PASS createDocument(null, "di", null); threw INVALID_CHARACTER_ERR +PASS createDocument("http://example.com/", "0div", null); threw INVALID_CHARACTER_ERR +PASS createDocument("http://example.com/", "di + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/DOMImplementation/createDocument-with-used-doctype-expected.txt b/LayoutTests/fast/dom/DOMImplementation/createDocument-with-used-doctype-expected.txt new file mode 100644 index 0000000..7ef22e9 --- /dev/null +++ b/LayoutTests/fast/dom/DOMImplementation/createDocument-with-used-doctype-expected.txt @@ -0,0 +1 @@ +PASS diff --git a/LayoutTests/fast/dom/DOMImplementation/createDocument-with-used-doctype.html b/LayoutTests/fast/dom/DOMImplementation/createDocument-with-used-doctype.html new file mode 100644 index 0000000..ae4a7ae --- /dev/null +++ b/LayoutTests/fast/dom/DOMImplementation/createDocument-with-used-doctype.html @@ -0,0 +1,32 @@ + + + + diff --git a/LayoutTests/fast/dom/DOMImplementation/createDocumentType-err-expected.txt b/LayoutTests/fast/dom/DOMImplementation/createDocumentType-err-expected.txt new file mode 100644 index 0000000..a398870 --- /dev/null +++ b/LayoutTests/fast/dom/DOMImplementation/createDocumentType-err-expected.txt @@ -0,0 +1,31 @@ +createDocument tests modeled after mozilla's testing + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS document.implementation.createDocumentType('foo').toString() is "[object DocumentType]" +PASS document.implementation.createDocumentType('foo', null).toString() is "[object DocumentType]" +PASS createDocumentType(, ); threw INVALID_CHARACTER_ERR +PASS createDocumentType(null, ); threw INVALID_CHARACTER_ERR +PASS createDocumentType(, null); threw INVALID_CHARACTER_ERR +PASS createDocumentType(, , null); threw INVALID_CHARACTER_ERR +PASS createDocumentType(null, null); threw INVALID_CHARACTER_ERR +PASS createDocumentType(null, null, null); threw INVALID_CHARACTER_ERR +PASS createDocumentType(null, ""); threw INVALID_CHARACTER_ERR +PASS createDocumentType("", null); threw INVALID_CHARACTER_ERR +PASS createDocumentType("", ""); threw INVALID_CHARACTER_ERR +PASS createDocumentType("a:", null, null); threw NAMESPACE_ERR +PASS createDocumentType(":foo", null, null); threw NAMESPACE_ERR +PASS createDocumentType(":", null, null); threw NAMESPACE_ERR +PASS createDocumentType("foo", null, null) +PASS createDocumentType("foo:bar", null, null) +PASS createDocumentType("foo::bar", null, null); threw NAMESPACE_ERR +PASS createDocumentType(" :bar", null, null); threw INVALID_CHARACTER_ERR +PASS createDocumentType("foo: ", null, null); threw INVALID_CHARACTER_ERR +PASS createDocumentType("foo :bar", null, null); threw INVALID_CHARACTER_ERR +PASS createDocumentType("foo: bar", null, null); threw INVALID_CHARACTER_ERR +PASS createDocumentType("a:b:c", null, null); valid XML name, invalid QName; threw NAMESPACE_ERR +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/DOMImplementation/createDocumentType-err.html b/LayoutTests/fast/dom/DOMImplementation/createDocumentType-err.html new file mode 100644 index 0000000..516e991 --- /dev/null +++ b/LayoutTests/fast/dom/DOMImplementation/createDocumentType-err.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/DOMImplementation/createHTMLDocument-title-expected.txt b/LayoutTests/fast/dom/DOMImplementation/createHTMLDocument-title-expected.txt new file mode 100644 index 0000000..712f2f1 --- /dev/null +++ b/LayoutTests/fast/dom/DOMImplementation/createHTMLDocument-title-expected.txt @@ -0,0 +1,5 @@ +Test for a bug 30982: createHTMLDocument doesn't escape ampersand and less-than in title. + +Should say PASS: + +PASS diff --git a/LayoutTests/fast/dom/DOMImplementation/createHTMLDocument-title.html b/LayoutTests/fast/dom/DOMImplementation/createHTMLDocument-title.html new file mode 100644 index 0000000..5e4a153 --- /dev/null +++ b/LayoutTests/fast/dom/DOMImplementation/createHTMLDocument-title.html @@ -0,0 +1,9 @@ +

Test for a bug 30982: createHTMLDocument doesn't escape ampersand and less-than in title.

+

Should say PASS:

+ diff --git a/LayoutTests/fast/dom/DOMImplementation/detached-doctype-expected.txt b/LayoutTests/fast/dom/DOMImplementation/detached-doctype-expected.txt new file mode 100644 index 0000000..38b8bbc --- /dev/null +++ b/LayoutTests/fast/dom/DOMImplementation/detached-doctype-expected.txt @@ -0,0 +1,5 @@ +Test for bug 26402: Crashes when using a detached DocumentType node. + +PASS if no crash. + +DONE diff --git a/LayoutTests/fast/dom/DOMImplementation/detached-doctype.html b/LayoutTests/fast/dom/DOMImplementation/detached-doctype.html new file mode 100644 index 0000000..a508f82 --- /dev/null +++ b/LayoutTests/fast/dom/DOMImplementation/detached-doctype.html @@ -0,0 +1,29 @@ +

Test for bug 26402: Crashes when using a detached DocumentType node.

+

PASS if no crash.

+ diff --git a/LayoutTests/fast/dom/DOMImplementation/resources/createDocument-with-used-doctype-frame.html b/LayoutTests/fast/dom/DOMImplementation/resources/createDocument-with-used-doctype-frame.html new file mode 100644 index 0000000..e0e7e67 --- /dev/null +++ b/LayoutTests/fast/dom/DOMImplementation/resources/createDocument-with-used-doctype-frame.html @@ -0,0 +1,17 @@ + +document.implementation.createDocument with current document's DOCTYPE + +FAIL (Script did not run); + diff --git a/LayoutTests/fast/dom/DOMImplementation/script-tests/TEMPLATE.html b/LayoutTests/fast/dom/DOMImplementation/script-tests/TEMPLATE.html new file mode 100644 index 0000000..1951c43 --- /dev/null +++ b/LayoutTests/fast/dom/DOMImplementation/script-tests/TEMPLATE.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocument-namespace-err.js b/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocument-namespace-err.js new file mode 100644 index 0000000..6683f8b --- /dev/null +++ b/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocument-namespace-err.js @@ -0,0 +1,146 @@ +description("createDocument tests modeled after createElementNS tests from mozilla which were attached to webkit bug 16833"); + +// document.implementation.createDocument() should throw the same set of errors +// as document.createElementNS() +// http://www.w3.org/TR/DOM-Level-3-Core/core.html#Level-2-Core-DOM-createDocument +// Thus we copied these test cases from: +// LayoutTests/fast/dom/Document/resources/createDocument-namespace-err.js + +function assert(c, m) +{ + if (!c) + testFailed(m); + else + testPassed(m); +} + +function stringForExceptionCode(c) +{ + var exceptionName; + switch(c) { + case DOMException.INVALID_CHARACTER_ERR: + exceptionName = "INVALID_CHARACTER_ERR"; + break; + case DOMException.NAMESPACE_ERR: + exceptionName = "NAMESPACE_ERR"; + } + if (exceptionName) + return exceptionName; // + "(" + c + ")"; + return c; +} + +function assertEquals(actual, expect, m) +{ + if (actual !== expect) { + m += "; expected " + stringForExceptionCode(expect) + ", threw " + stringForExceptionCode(actual); + testFailed(m); + } else { + m += "; threw " + stringForExceptionCode(actual);; + testPassed(m); + } +} + +var allNSTests = [ + { args: [undefined, undefined] }, + { args: [null, undefined] }, + { args: [undefined, null], code: 5 }, + { args: [null, null], code: 5 }, + { args: [null, ""], code: 5 }, + { args: ["", null], code: 5 }, + { args: ["", ""], code: 5 }, + { args: [null, "
"], code: 5 }, + { args: [null, "0div"], code: 5 }, + { args: [null, "di v"], code: 5 }, + { args: [null, "di"], code: 5 }, + { args: ["http://example.com/", "0div"], code: 5 }, + { args: ["http://example.com/", "di + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/DeviceMotion/optional-event-properties-expected.txt b/LayoutTests/fast/dom/DeviceMotion/optional-event-properties-expected.txt new file mode 100644 index 0000000..0eabe35 --- /dev/null +++ b/LayoutTests/fast/dom/DeviceMotion/optional-event-properties-expected.txt @@ -0,0 +1,65 @@ +Tests the optional properties of DeviceMotionEvent. Each property should be null if not set, or set to null or undefined. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +event = document.createEvent('DeviceMotionEvent') +PASS event.xAcceleration == null is true +PASS event.yAcceleration == null is true +PASS event.zAcceleration == null is true +PASS event.xRotationRate == null is true +PASS event.yRotationRate == null is true +PASS event.zRotationRate == null is true +PASS event.interval == null is true +event.initDeviceMotionEvent('', false, false, 0, 1, 2, 3, 4, 5, 6) +PASS event.xAcceleration == 0 is true +PASS event.yAcceleration == 1 is true +PASS event.zAcceleration == 2 is true +PASS event.xRotationRate == 3 is true +PASS event.yRotationRate == 4 is true +PASS event.zRotationRate == 5 is true +PASS event.interval == 6 is true +event.initDeviceMotionEvent() +PASS event.xAcceleration == null is true +PASS event.yAcceleration == null is true +PASS event.zAcceleration == null is true +PASS event.xRotationRate == null is true +PASS event.yRotationRate == null is true +PASS event.zRotationRate == null is true +PASS event.interval == null is true +event.initDeviceMotionEvent('', false, false, [], [], [], [], [], [], []) +PASS event.xAcceleration == 0 is true +PASS event.yAcceleration == 0 is true +PASS event.zAcceleration == 0 is true +PASS event.xRotationRate == 0 is true +PASS event.yRotationRate == 0 is true +PASS event.zRotationRate == 0 is true +PASS event.interval == 0 is true +event.initDeviceMotionEvent('', false, false, undefined, undefined, undefined, undefined, undefined, undefined, undefined) +PASS event.xAcceleration == null is true +PASS event.yAcceleration == null is true +PASS event.zAcceleration == null is true +PASS event.xRotationRate == null is true +PASS event.yRotationRate == null is true +PASS event.zRotationRate == null is true +PASS event.interval == null is true +event.initDeviceMotionEvent('', false, false, '', '', '', '', '', '', '') +PASS event.xAcceleration == 0 is true +PASS event.yAcceleration == 0 is true +PASS event.zAcceleration == 0 is true +PASS event.xRotationRate == 0 is true +PASS event.yRotationRate == 0 is true +PASS event.zRotationRate == 0 is true +PASS event.interval == 0 is true +event.initDeviceMotionEvent('', false, false, null, null, null, null, null, null, null) +PASS event.xAcceleration == null is true +PASS event.yAcceleration == null is true +PASS event.zAcceleration == null is true +PASS event.xRotationRate == null is true +PASS event.yRotationRate == null is true +PASS event.zRotationRate == null is true +PASS event.interval == null is true +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/DeviceMotion/optional-event-properties.html b/LayoutTests/fast/dom/DeviceMotion/optional-event-properties.html new file mode 100644 index 0000000..212669f --- /dev/null +++ b/LayoutTests/fast/dom/DeviceMotion/optional-event-properties.html @@ -0,0 +1,12 @@ + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/DeviceMotion/script-tests/TEMPLATE.html b/LayoutTests/fast/dom/DeviceMotion/script-tests/TEMPLATE.html new file mode 100644 index 0000000..b31963d --- /dev/null +++ b/LayoutTests/fast/dom/DeviceMotion/script-tests/TEMPLATE.html @@ -0,0 +1,12 @@ + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/DeviceMotion/script-tests/create-event.js b/LayoutTests/fast/dom/DeviceMotion/script-tests/create-event.js new file mode 100644 index 0000000..167329d --- /dev/null +++ b/LayoutTests/fast/dom/DeviceMotion/script-tests/create-event.js @@ -0,0 +1,29 @@ +description("Tests that document.createEvent() works with DeviceMotinEvent."); + +var event = document.createEvent('DeviceMotionEvent'); + +shouldBeTrue("typeof event == 'object'"); + +shouldBeTrue("'type' in event"); +shouldBeTrue("'bubbles' in event"); +shouldBeTrue("'cancelable' in event"); +shouldBeTrue("'xAcceleration' in event"); +shouldBeTrue("'yAcceleration' in event"); +shouldBeTrue("'zAcceleration' in event"); +shouldBeTrue("'xRotationRate' in event"); +shouldBeTrue("'yRotationRate' in event"); +shouldBeTrue("'zRotationRate' in event"); +shouldBeTrue("'interval' in event"); + +shouldBeTrue("typeof event.type == 'string'"); +shouldBeTrue("typeof event.bubbles == 'boolean'"); +shouldBeTrue("typeof event.cancelable == 'boolean'"); +shouldBeTrue("typeof event.xAcceleration == 'object'"); +shouldBeTrue("typeof event.yAcceleration == 'object'"); +shouldBeTrue("typeof event.zAcceleration == 'object'"); +shouldBeTrue("typeof event.xRotationRate == 'object'"); +shouldBeTrue("typeof event.yRotationRate == 'object'"); +shouldBeTrue("typeof event.zRotationRate == 'object'"); +shouldBeTrue("typeof event.interval == 'object'"); + +window.successfullyParsed = true; diff --git a/LayoutTests/fast/dom/DeviceMotion/script-tests/optional-event-properties.js b/LayoutTests/fast/dom/DeviceMotion/script-tests/optional-event-properties.js new file mode 100644 index 0000000..ab9b53b --- /dev/null +++ b/LayoutTests/fast/dom/DeviceMotion/script-tests/optional-event-properties.js @@ -0,0 +1,68 @@ +description("Tests the optional properties of DeviceMotionEvent. Each property should be null if not set, or set to null or undefined."); + +var event; + +evalAndLog("event = document.createEvent('DeviceMotionEvent')"); +shouldBeTrue("event.xAcceleration == null"); +shouldBeTrue("event.yAcceleration == null"); +shouldBeTrue("event.zAcceleration == null"); +shouldBeTrue("event.xRotationRate == null"); +shouldBeTrue("event.yRotationRate == null"); +shouldBeTrue("event.zRotationRate == null"); +shouldBeTrue("event.interval == null"); + +evalAndLog("event.initDeviceMotionEvent('', false, false, 0, 1, 2, 3, 4, 5, 6)"); +shouldBeTrue("event.xAcceleration == 0"); +shouldBeTrue("event.yAcceleration == 1"); +shouldBeTrue("event.zAcceleration == 2"); +shouldBeTrue("event.xRotationRate == 3"); +shouldBeTrue("event.yRotationRate == 4"); +shouldBeTrue("event.zRotationRate == 5"); +shouldBeTrue("event.interval == 6"); + +evalAndLog("event.initDeviceMotionEvent()"); +shouldBeTrue("event.xAcceleration == null"); +shouldBeTrue("event.yAcceleration == null"); +shouldBeTrue("event.zAcceleration == null"); +shouldBeTrue("event.xRotationRate == null"); +shouldBeTrue("event.yRotationRate == null"); +shouldBeTrue("event.zRotationRate == null"); +shouldBeTrue("event.interval == null"); + +evalAndLog("event.initDeviceMotionEvent('', false, false, [], [], [], [], [], [], [])"); +shouldBeTrue("event.xAcceleration == 0"); +shouldBeTrue("event.yAcceleration == 0"); +shouldBeTrue("event.zAcceleration == 0"); +shouldBeTrue("event.xRotationRate == 0"); +shouldBeTrue("event.yRotationRate == 0"); +shouldBeTrue("event.zRotationRate == 0"); +shouldBeTrue("event.interval == 0"); + +evalAndLog("event.initDeviceMotionEvent('', false, false, undefined, undefined, undefined, undefined, undefined, undefined, undefined)"); +shouldBeTrue("event.xAcceleration == null"); +shouldBeTrue("event.yAcceleration == null"); +shouldBeTrue("event.zAcceleration == null"); +shouldBeTrue("event.xRotationRate == null"); +shouldBeTrue("event.yRotationRate == null"); +shouldBeTrue("event.zRotationRate == null"); +shouldBeTrue("event.interval == null"); + +evalAndLog("event.initDeviceMotionEvent('', false, false, '', '', '', '', '', '', '')"); +shouldBeTrue("event.xAcceleration == 0"); +shouldBeTrue("event.yAcceleration == 0"); +shouldBeTrue("event.zAcceleration == 0"); +shouldBeTrue("event.xRotationRate == 0"); +shouldBeTrue("event.yRotationRate == 0"); +shouldBeTrue("event.zRotationRate == 0"); +shouldBeTrue("event.interval == 0"); + +evalAndLog("event.initDeviceMotionEvent('', false, false, null, null, null, null, null, null, null)"); +shouldBeTrue("event.xAcceleration == null"); +shouldBeTrue("event.yAcceleration == null"); +shouldBeTrue("event.zAcceleration == null"); +shouldBeTrue("event.xRotationRate == null"); +shouldBeTrue("event.yRotationRate == null"); +shouldBeTrue("event.zRotationRate == null"); +shouldBeTrue("event.interval == null"); + +window.successfullyParsed = true; diff --git a/LayoutTests/fast/dom/DeviceMotion/script-tests/window-property.js b/LayoutTests/fast/dom/DeviceMotion/script-tests/window-property.js new file mode 100644 index 0000000..3d22ba8 --- /dev/null +++ b/LayoutTests/fast/dom/DeviceMotion/script-tests/window-property.js @@ -0,0 +1,32 @@ +description("Tests that the window.DeviceMotionEvent and window.ondevicemotion properties are present."); + +function hasDeviceMotionEventProperty() +{ + for (var property in window) { + if (property == "DeviceMotionEvent") + return true; + } + return false; +} + +shouldBeTrue("typeof window.DeviceMotionEvent == 'object'"); +shouldBeFalse("typeof window.DeviceMotionEvent == 'function'"); +shouldBeTrue("hasDeviceMotionEventProperty()"); +shouldBeTrue("'DeviceMotionEvent' in window"); +shouldBeTrue("window.hasOwnProperty('DeviceMotionEvent')"); + +function hasOnDeviceMotionProperty() +{ + for (var property in window) { + if (property == "ondevicemotion") + return true; + } + return false; +} + +shouldBeTrue("typeof window.ondevicemotion == 'object'"); +shouldBeTrue("hasOnDeviceMotionProperty()"); +shouldBeTrue("'ondevicemotion' in window"); +shouldBeTrue("window.hasOwnProperty('ondevicemotion')"); + +window.successfullyParsed = true; diff --git a/LayoutTests/fast/dom/DeviceMotion/window-property-expected.txt b/LayoutTests/fast/dom/DeviceMotion/window-property-expected.txt new file mode 100644 index 0000000..391677a --- /dev/null +++ b/LayoutTests/fast/dom/DeviceMotion/window-property-expected.txt @@ -0,0 +1,18 @@ +Tests that the window.DeviceMotionEvent and window.ondevicemotion properties are present. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS typeof window.DeviceMotionEvent == 'object' is true +PASS typeof window.DeviceMotionEvent == 'function' is false +PASS hasDeviceMotionEventProperty() is true +PASS 'DeviceMotionEvent' in window is true +PASS window.hasOwnProperty('DeviceMotionEvent') is true +PASS typeof window.ondevicemotion == 'object' is true +PASS hasOnDeviceMotionProperty() is true +PASS 'ondevicemotion' in window is true +PASS window.hasOwnProperty('ondevicemotion') is true +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/DeviceMotion/window-property.html b/LayoutTests/fast/dom/DeviceMotion/window-property.html new file mode 100644 index 0000000..e122033 --- /dev/null +++ b/LayoutTests/fast/dom/DeviceMotion/window-property.html @@ -0,0 +1,12 @@ + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/EntityReference/readonly-exceptions-expected.txt b/LayoutTests/fast/dom/EntityReference/readonly-exceptions-expected.txt new file mode 100644 index 0000000..41cb36d --- /dev/null +++ b/LayoutTests/fast/dom/EntityReference/readonly-exceptions-expected.txt @@ -0,0 +1,23 @@ +Test to make sure EntityReference nodes are always treated readonly + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS xmlDoc2.adoptNode(entityReference) threw exception Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7. +PASS entityReference.ownerDocument is xmlDoc +PASS entityReference.nodeValue = 'foo' threw exception Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7. +PASS entityReference.nodeValue is null +PASS entityReference.prefix = 'foo' threw exception Error: NAMESPACE_ERR: DOM Exception 14. +PASS entityReference.prefix is null +PASS entityReference.textContent = 'foo' threw exception Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7. +FAIL entityReference.textContent should be >. Was . +FAIL childrenBeforeFailedAppend should be 1. Was 0. +PASS entityReference.appendChild(text) threw exception Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7. +PASS entityReference.childNodes.length is childrenBeforeFailedAppend +FAIL childrenBeforeFailedAppend should be 1. Was 0. +PASS entityReference.insertBefore(text, entityReference.firstChild) threw exception Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7. +PASS entityReference.childNodes.length is childrenBeforeFailedAppend +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/EntityReference/readonly-exceptions.html b/LayoutTests/fast/dom/EntityReference/readonly-exceptions.html new file mode 100644 index 0000000..0de1858 --- /dev/null +++ b/LayoutTests/fast/dom/EntityReference/readonly-exceptions.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/EntityReference/script-tests/TEMPLATE.html b/LayoutTests/fast/dom/EntityReference/script-tests/TEMPLATE.html new file mode 100644 index 0000000..1951c43 --- /dev/null +++ b/LayoutTests/fast/dom/EntityReference/script-tests/TEMPLATE.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/EntityReference/script-tests/readonly-exceptions.js b/LayoutTests/fast/dom/EntityReference/script-tests/readonly-exceptions.js new file mode 100644 index 0000000..e978728 --- /dev/null +++ b/LayoutTests/fast/dom/EntityReference/script-tests/readonly-exceptions.js @@ -0,0 +1,33 @@ +description("Test to make sure EntityReference nodes are always treated readonly") + +var xmlDoc = document.implementation.createDocument("http://www.w3.org/1999/xhtml", "html", null); +var xmlDoc2 = document.implementation.createDocument("http://www.w3.org/1999/xhtml", "html", null); +var entityReference = xmlDoc.createEntityReference("gt"); + +shouldThrow("xmlDoc2.adoptNode(entityReference)"); +shouldBe("entityReference.ownerDocument", "xmlDoc") + +// nodeValue is defined to be null for Entity Reference nodes, and thus should silently fail to modify +// Spec is ambigious as to if we should throw here or not. I've requested clarification: +// http://lists.w3.org/Archives/Public/www-dom/2008JanMar/0009.html +shouldThrow("entityReference.nodeValue = 'foo'"); +shouldBe("entityReference.nodeValue", "null"); + +shouldThrow("entityReference.prefix = 'foo'"); +shouldBe("entityReference.prefix", "null"); + +shouldThrow("entityReference.textContent = 'foo'"); +shouldBe("entityReference.textContent", "'>'"); + +var childrenBeforeFailedAppend = entityReference.childNodes.length; +shouldBe("childrenBeforeFailedAppend", "1"); +var text = document.createTextNode("FAIL"); +shouldThrow("entityReference.appendChild(text)"); +shouldBe("entityReference.childNodes.length", "childrenBeforeFailedAppend"); + +childrenBeforeFailedAppend = entityReference.childNodes.length; +shouldBe("childrenBeforeFailedAppend", "1"); +shouldThrow("entityReference.insertBefore(text, entityReference.firstChild)"); +shouldBe("entityReference.childNodes.length", "childrenBeforeFailedAppend"); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/TEMPLATE.html b/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/TEMPLATE.html new file mode 100644 index 0000000..1951c43 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/TEMPLATE.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-hash.js b/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-hash.js new file mode 100644 index 0000000..5cce834 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-hash.js @@ -0,0 +1,70 @@ +description('Test setting the hash attribute of the URL in HTMLAnchorElement.'); + +var a = document.createElement('a'); + +debug("Hash value does not start with '#'"); +a.href = "https://www.mydomain.com:8080/path/testurl.html#middle"; +a.hash = "hash-value"; +shouldBe("a.href", "'https://www.mydomain.com:8080/path/testurl.html#hash-value'"); + +debug("Hash value starts with '#'"); +a.href = "file:///path/testurl.html#middle"; +a.hash = "#hash_value"; +shouldBe("a.href", "'file:///path/testurl.html#hash_value'"); + +debug("'?' in hash value"); +a.href = "http://www.mydomain.com/path/testurl.html#middle"; +a.hash = "#hash?value"; +shouldBe("a.href", "'http://www.mydomain.com/path/testurl.html#hash?value'"); + +// The expected behavior should change when character table is updated. +// IE8 and Firefox3.5.2 don't consider these characters as illegal. +debug("'#' in hash value, and illegal characters in hostname"); +a.href = "https://www.my\"d(){}|~om?ain#com/path/testurl.html#middle"; +a.hash = "#hash#value"; +shouldBe("a.href", "'https://www.my\"d(){}|~om?ain#com/path/testurl.html#middle'"); + +// IE8 converts null to "null", which is not the right thing to do. +// Firefox 3.5.2 removes the '#' at the end, and it should per +// http://dev.w3.org/html5/spec/infrastructure.html#url-decomposition-idl-attributes . +debug("Set hash to null"); +a.href = "https://www.mydomain.com/path/testurl.html#middle"; +a.hash = null; +shouldBe("a.href", "'https://www.mydomain.com/path/testurl.html#'"); + +// Firefox 3.5.2 removes the '#' at the end, and it should per +// http://dev.w3.org/html5/spec/infrastructure.html#url-decomposition-idl-attributes . +debug("Set hash to empty string"); +a.href = "https://www.mydomain.com/path/testurl.html#middle"; +a.hash = ""; +shouldBe("a.href", "'https://www.mydomain.com/path/testurl.html#'"); + +// Firefox 3.5.2 does not allow setting hash to mailto: scheme, and it should. +debug("Add hash to mailto: protocol"); +a.href = "mailto:e-mail_address@goes_here"; +a.hash = "hash-value"; +shouldBe("a.href", "'mailto:e-mail_address@goes_here#hash-value'"); + +// IE8 does not percent-encode spaces in the hash component, but it does that +// in the path component. +debug("Add hash to file: protocol"); +a.href = "file:///some path"; +a.hash = "hash value"; +shouldBe("a.href", "'file:///some%20path#hash%20value'"); + +debug("Set hash to '#'"); +a.href = "http://mydomain.com#middle"; +a.hash = "#"; +shouldBe("a.href", "'http://mydomain.com/#'"); + +// Firefox 3.5.2 does not allow setting hash to foo: scheme, and it should. +debug("Add hash to non-standard protocol"); +try { +a.href = "foo:bar"; +a.hash = "#hash"; +shouldBe("a.href", "'foo:bar#hash'"); +} catch(e) { +debug("Exception: " + e.description); +} + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-host.js b/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-host.js new file mode 100644 index 0000000..313cf0f --- /dev/null +++ b/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-host.js @@ -0,0 +1,115 @@ +description('Test setting the host attribute of the URL in HTMLAnchorElement.'); + +var a = document.createElement('a'); + +debug("Basic test"); +a.href = "https://www.mydomain.com:8080/path/"; +a.host = "www.otherdomain.com:0"; +shouldBe("a.href", "'https://www.otherdomain.com:0/path/'"); + +// IE8 throws "The URL is invalid" exception. +debug("Set host with '?' in it"); +try { +a.href = "https://www.mydomain.com:8080/path/?key=value"; +a.host = "www.other?domain.com:8080"; +shouldBe("a.href", "'https://www.other/?domain.com:8080/path/?key=value'"); +} catch(e) { +debug("Exception: " + e.description); +} + +debug("Set default port for another protocol"); +a.href = "https://www.mydomain.com:8080/path/"; +a.host = "www.otherdomain.com:80"; +shouldBe("a.href", "'https://www.otherdomain.com:80/path/'"); + +debug("Set default port"); +a.href = "https://www.mydomain.com:8080/path/"; +a.host = "www.otherdomain.com:443"; +shouldBe("a.href", "'https://www.otherdomain.com/path/'"); + +// Firefox 3.5.2 rejects a port that contains non-digits. +debug("Set host with letters in port number"); +a.href = "https://www.mydomain.com:8080/path/"; +a.host = "www.otherdomain.com:44a5"; +shouldBe("a.href", "'https://www.otherdomain.com:44/path/'"); + +// Firefox 3.5.2 ignores the leading space in the port, but errs on reparsing the port. +debug("Leading space in port number"); +a.href = "https://www.mydomain.com:8080/path/"; +a.host = "www.otherdomain.com: 443"; +shouldBe("a.href", "'https://www.otherdomain.com:0/path/'"); + +// Firefox 3.5.2 removed the port, clearly against the spec . +debug("Colon without port number"); +a.href = "https://www.mydomain.com:8080/path/"; +a.host = "www.otherdomain.com:"; +shouldBe("a.href", "'https://www.otherdomain.com:0/path/'"); + +// IE8 converts null to "null", which is not the right thing to do. +// Firefox 3.5.2 allows setting the host to null, which it shouldn't per +// http://dev.w3.org/html5/spec/infrastructure.html#url-decomposition-idl-attributes . +debug("Set host to null"); +a.href = "https://www.mydomain.com:8080/path/"; +a.host = null; +shouldBe("a.href", "'https://www.mydomain.com:8080/path/'"); + +// Both IE8 and Firefox 3.5.2 allow setting the host to empty string, which they shouldn't, per +// http://dev.w3.org/html5/spec/infrastructure.html#url-decomposition-idl-attributes . +// Since both do that in a buggy way, WebKit does not follow either one of them. +debug("Set host to empty string"); +a.href = "https://www.mydomain.com:8080/path/"; +a.host = ""; +shouldBe("a.href", "'https://www.mydomain.com:8080/path/'"); + +// Firefox 3.5.2 does not `set the host for file: . +debug("Set host to URL with file: protocol"); +a.href = "file:///path/"; +a.host = "mydomain.com"; +shouldBe("a.href", "'file://mydomain.com/path/'"); + +// IE8 throws if the host contains '/' +debug("Set host containing slashes in it"); +try { +a.href = "https://www.mydomain.com:8080/path/"; +a.host = "www.other\dom/ain.com"; +shouldBe("a.href", "'https://www.otherdom/ain.com/path/'"); +} catch(e) { +debug("Exception: " + e.description); +} + +// Firefox 3.5.2 add the missing '/' thus gets a different result than IE8 and Webkit. +debug("Set host to a malformed URL"); +a.href = "https:/\rww.my@domain.com:8080/path/"; +a.host = "www.other!domain.com:15"; +shouldBe("a.href", "'https://www.other!domain.com:15/ww.my@domain.com:8080/path/'"); + +// IE8 throws an "Object Error" exception. +// Firefox 3.5.2 accepts this but throws an exception later +// WebKit should just reject +debug("Set host that starts with ':'"); +try { +a.href = "https://domain.com:8080/path/"; +a.host = ":www.otherdomain.com:15"; +shouldBe("a.href", "'https://domain.com:8080/path/'"); +} catch(e) { +debug("Exception: " + e.description); +} + +// IE8 throws a security exception if the host contains '@' +debug("Set host to URL containing username and .."); +try { +a.href = "https://rwwmy@domain.com:8080/pa..th/"; +a.host = "www.other!domain.com:25"; +shouldBe("a.href", "'https://rwwmy@www.other!domain.com:25/pa..th/'"); +} catch(e) { +debug("Exception: " + e.description); +} + +// Both IE8 and Firefox append the hosts, instead of rejecting, per +// http://dev.w3.org/html5/spec/infrastructure.html#url-decomposition-idl-attributes . +debug("Set host to a URL with tel: protocol"); +a.href = "tel:+1-816-555-1212"; +a.host = "+1-800-555-1212"; +shouldBe("a.href", "'tel:+1-816-555-1212'"); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-hostname.js b/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-hostname.js new file mode 100644 index 0000000..0f4438f --- /dev/null +++ b/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-hostname.js @@ -0,0 +1,72 @@ +description('Test setting the hostname attribute of the URL in HTMLAnchorElement.'); + +var a = document.createElement('a'); + +debug("Basic test"); +a.href = "https://www.mydomain.com:8080/path/"; +a.hostname = "www.otherdomain.com"; +shouldBe("a.href", "'https://www.otherdomain.com:8080/path/'"); + +// IE8 throws an exception "The URL is invalid". +try { +debug("Extra slashes before hostname"); +a.href = "https://www.mydomain.com:8080/path/"; +a.hostname = "//www.otherdomain.com"; +shouldBe("a.href", "'https://www.otherdomain.com:8080/path/'"); +} catch(e) { +debug("Exception: " + e.description); +} + +// Firefox 3.5.2 does not allow setting the host to foo: protocol +debug("Set hostname to URL with foo: protocol"); +a.href = "foo://www.mydomain.com/path/"; +a.hostname = "www.otherdomain.com"; +shouldBe("a.href", "'foo://www.otherdomain.com/path/'"); + +// IE8 converts null to "null", which is not the right thing to do. +// Firefox 3.5.2 allows setting the hostname to null, which is wrong per +// http://dev.w3.org/html5/spec/infrastructure.html#url-decomposition-idl-attributes . +debug("Set hostname to null"); +a.href = "https://www.mydomain.com:8080/path/"; +a.hostname = null; +shouldBe("a.href", "'https://www.mydomain.com:8080/path/'"); + +// Both IE8 and Firefox 3.5.2 allow setting the host to empty string, against the spec at +// http://dev.w3.org/html5/spec/infrastructure.html#url-decomposition-idl-attributes . +// Since both do that in a buggy way, WebKit should not follow either one of them. +debug("Set hostname to empty string"); +a.href = "https://www.mydomain.com:8080/path/"; +a.hostname = ""; +shouldBe("a.href", "'https://www.mydomain.com:8080/path/'"); + +// IE8 fails to process really: protocol. +debug("Set hostname to URL with 2 colons"); +a.href = "really:bad:url"; +a.hostname = "mydomain.com"; +shouldBe("a.href", "'really:bad:url'"); + +// The expected behavior should change when the character table is updated. +// IE8 encodes the space in the hostname. +// Firefox3.5.2 and WebKit consider space as illegal character and would not set +// the new hostname. +debug("Set a hostname that contains space in it"); +a.href = "http://www.my domain.com/path/"; +a.hostname = "www.other domain.com"; +shouldBe("a.href", "'http://www.my domain.com/path/'"); + +// IE8 throws an exception "The URL is invalid". +try { +debug("Set hostname on a local file"); +a.href = "c:/path/testurl.html"; +a.hostname= "a"; +shouldBe("a.href", "'c:/path/testurl.html'"); +} catch(e) { +debug("Exception: " + e.description); +} + +debug("Set hostname to undefined"); +a.href = "https://www.mydomain.com:8080/path/"; +a.hostname = undefined; +shouldBe("a.href", "'https://undefined:8080/path/'"); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-pathname.js b/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-pathname.js new file mode 100644 index 0000000..cc6a8e7 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-pathname.js @@ -0,0 +1,71 @@ +description('Test setting the pathname attribute of the URL in HTMLAnchorElement.'); + +var a = document.createElement('a'); + +debug("Set pathname that starts with slash"); +a.href = "https://www.mydomain.com/path/testurl.html?key=value"; +a.pathname = "/path name"; +shouldBe("a.href", "'https://www.mydomain.com/path%20name?key=value'"); + +// IE8 throws an "Invalid URL" exception. +try { +debug("Set pathname that does not start with slash and contains '?'"); +a.href = "https://www.mydomain.com/path/testurl.html?key=value"; +a.pathname = "pa?th"; +shouldBe("a.href", "'https://www.mydomain.com/pa%3Fth?key=value'"); +} catch(e) { +debug("Exception: " + e.description); +} + +// IE8 throws an "Invalid URL" exception. +try { +debug("Set pathname that starts with double slash and contains '#'"); +a.href = "https://www.mydomain.com/path?key=value"; +a.pathname = "//path#name"; +shouldBe("a.href", "'https://www.mydomain.com//path%23name?key=value'"); +} catch(e) { +debug("Exception: " + e.description); +} + +debug("Set a pathname containing .. in it"); +a.href = "https://www.mydomain.com/path/testurl.html?key=value"; +a.pathname = "/it/../path"; +shouldBe("a.href", "'https://www.mydomain.com/path?key=value'"); + +// IE8 converts null to "null", which is not the right thing to do. +debug("Set pathname to null"); +a.href = "https://www.mydomain.com/path/testurl.html?key=value"; +a.pathname = null; +shouldBe("a.href", "'https://www.mydomain.com/?key=value'"); + +debug("Set pathname to empty string"); +a.href = "https://www.mydomain.com/?key=value"; +a.pathname = ""; +shouldBe("a.href", "'https://www.mydomain.com/?key=value'"); + +// The expected behavior should change when the character table is updated. +// IE8 considers this URL as valid. +debug("Set pathname that includes illegal characters to URL that contains illegal characters."); +a.href = "https://www.my|d[]()omain.com/path/testurl.html?key=value"; +a.pathname = "p$a|th"; +shouldBe("a.href", "'https://www.my|d[]()omain.com/path/testurl.html?key=value'"); + +// IE8 throws a security exception. +try { +debug("Set pathname to URL that contains '@' in host"); +a.href = "http://w@#ww"; +a.pathname = "path"; +shouldBe("a.href", "'http://w@/path#ww'"); +} catch(e) { +debug("Exception: " + e.description); +} + +// IE8 allows setting the pathname, for non-hierarchial URL. +// It is not supposed to allow that per +// http://dev.w3.org/html5/spec/infrastructure.html#url-decomposition-idl-attributes . +debug("Set pathname to a URL with non-hierarchical protocol"); +a.href = "tel:+1800-555-1212"; +a.pathname = "the-path"; +shouldBe("a.href", "'tel:+1800-555-1212'"); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-port.js b/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-port.js new file mode 100644 index 0000000..9bc1112 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-port.js @@ -0,0 +1,49 @@ +description('Test setting the port attribute of the URL in HTMLAnchorElement.'); + +var a = document.createElement('a'); + +debug("Default port as number"); +a.href = "https://www.mydomain.com:8080/path/testurl.html?key=value"; +a.port = 443; +shouldBe("a.href", "'https://www.mydomain.com/path/testurl.html?key=value'"); + +debug("Default port as string"); +a.href = "https://www.mydomain.com:8080/path/testurl.html?key=value"; +a.port = "443"; +shouldBe("a.href", "'https://www.mydomain.com/path/testurl.html?key=value'"); + +debug("Set port to 0"); +a.href = "https://www.mydomain.com:8080/path/testurl.html?key=value"; +a.port = "0"; +shouldBe("a.href", "'https://www.mydomain.com:0/path/testurl.html?key=value'"); + +// Firefox 3.5.2 does not accept the port if any character is not a digit. +debug("Set port to non-number"); +a.href = "https://www.mydomain.com:8080/path/testurl.html?key=value"; +a.port = "4a"; +shouldBe("a.href", "'https://www.mydomain.com:4/path/testurl.html?key=value'"); + +// Firefox 3.5.2 does not accept the port if it is null. +debug("Set port to null"); +a.href = "https://www.mydomain.com:8080/path/testurl.html?key=value"; +a.port = null; +shouldBe("a.href", "'https://www.mydomain.com:0/path/testurl.html?key=value'"); + +// Firefox 3.5.2 does not accept the port if it is null. +debug("Set port to empty string"); +a.href = "https://www.mydomain.com:8080/path/testurl.html?key=value"; +a.port = ""; +shouldBe("a.href", "'https://www.mydomain.com:0/path/testurl.html?key=value'"); + +debug("Set port to undefined"); +a.href = "https://www.mydomain.com:8080/path/testurl.html?key=value"; +a.port = undefined; +shouldBe("a.href", "'https://www.mydomain.com:0/path/testurl.html?key=value'"); + +// Firefox 3.5.2 does not allow setting the port on a URL with protocol foo: . +debug("Set port to URL with foo: protocol"); +a.href = "foo://bar/"; +a.port = 50; +shouldBe("a.href", "'foo://bar:50/'"); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-protocol.js b/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-protocol.js new file mode 100644 index 0000000..b296dea --- /dev/null +++ b/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-protocol.js @@ -0,0 +1,80 @@ +description('Test setting the protocol attribute of the URL in HTMLAnchorElement .'); + +var a = document.createElement('a'); + +debug("Basic test"); +a.href = "https://www.mydomain.com/path/"; +a.protocol = "http-foo"; +shouldBe("a.href", "'http-foo://www.mydomain.com/path/'"); + +// IE8 throws "Invalid argument" exception. +debug("Set a protocol that contains ':'"); +try { +a.href = "https://www.mydomain.com/path/"; +a.protocol = "http:foo"; +shouldBe("a.href", "'http://www.mydomain.com/path/'"); +} catch(e) { +debug("Exception: " + e.description); +} + +// IE8 throws "Invalid argument" exception. +debug("Set a protocol that contains invalid characters"); +try { +a.href = "https://www.mydomain.com/path/"; +a.protocol = "http^foo"; +shouldBe("a.href", "'https://www.mydomain.com/path/'"); +} catch(e) { +debug("Exception: " + e.description); +} + +// The expected behavior should change when the character table is updated. +// IE8 encodes '^' in the host. +debug("Set a protocol to a URL with invalid host name"); +a.href = "h:^^"; +a.protocol = "foo"; +shouldBe("a.href", "'foo:^^'"); + +// IE8 throws "Invalid argument" exception. +try { +debug("Set a protocol that starts with ':'"); +a.href = "https://www.mydomain.com/path/"; +a.protocol = ":http"; +shouldBe("a.href", "'https://www.mydomain.com/path/'"); +} catch(e) { +debug("Exception: " + e.description); +} + +// IE8 converts null to "null", which is not the right thing to do. +debug("Set protocol to null"); +a.href = "https://www.mydomain.com/path/"; +a.protocol = null; +shouldBe("a.href", "'https://www.mydomain.com/path/'"); + +// IE8 throws "Invalid argument" exception. +try { +debug("Set protocol to empty string"); +a.href = "https://www.mydomain.com/path/"; +a.protocol = ""; +shouldBe("a.href", "'https://www.mydomain.com/path/'"); +} catch(e) { +debug("Exception: " + e.description); +} + +// Firefox 3.5.2 tries to build a hierarchical URL. +debug("Set protocol to http on malformed URL"); +a.href = "foo:??bar"; +a.protocol = "http"; +shouldBe("a.href", "'http:??bar'"); + +// IE8 keeps the protocol if it is 'c:'. +debug("Set protocol to a URL which points to a local file"); +a.href = "c:\path"; +a.protocol = "f-oo"; +shouldBe("a.href", "'f-oo:path'"); + +debug("Set protocol to undefined"); +a.href = "https://www.mydomain.com/path/"; +a.protocol = undefined; +shouldBe("a.href", "'undefined://www.mydomain.com/path/'"); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-search.js b/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-search.js new file mode 100644 index 0000000..5b90a04 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-search.js @@ -0,0 +1,49 @@ +description('Test setting the search attribute of the URL in HTMLAnchorElement .'); + +var a = document.createElement('a'); + +debug("Set search without '?'"); +a.href = "https://www.mydomain.com/path/?key=value"; +a.search = "value=key"; +shouldBe("a.href", "'https://www.mydomain.com/path/?value=key'"); + +// IE8 does not encode spaces in search string +debug("Set search that starts with '?' and contains spaces"); +a.href = "https://www.mydomain.com/path/?key=value"; +a.search = "?val ue= key?"; +shouldBe("a.href", "'https://www.mydomain.com/path/?val%20ue=%20key?'"); + +debug("Set search to a malformed URL"); +a.href = "s:www.mydomain.com/path/"; +a.search = "%"; +shouldBe("a.href", "'s:www.mydomain.com/path/?%'"); + +// IE8 throws "The URL is invalid" exception. +debug("Set search containing '#'"); +try { +a.href = "https://www.mydomain.com/path/?key=value#hash"; +a.search = "?value#key"; +shouldBe("a.href", "'https://www.mydomain.com/path/?value%23key#hash'"); +} catch(e) { +debug("Exception: " + e.description); +} + +debug("Set search to a malformed URL"); +a.href = "bad:/|/url"; +a.search = "?value=key"; +shouldBe("a.href", "'bad:/|/url?value=key'"); + +// IE8 converts null to "null", which is not the right thing to do. +debug("Set search to null"); +a.href = "https://www.mydomain.com/path/?key=value"; +a.search = null; +shouldBe("a.href", "'https://www.mydomain.com/path/'"); + +// Firefox 3.5.2 Removes the '?', and it shouldn't, per +// http://dev.w3.org/html5/spec/infrastructure.html#url-decomposition-idl-attributes . +debug("Set search to empty string"); +a.href = "https://www.mydomain.com/path/?key=value"; +a.search = ""; +shouldBe("a.href", "'https://www.mydomain.com/path/?'"); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-whitespace.js b/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-whitespace.js new file mode 100644 index 0000000..8be6232 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-whitespace.js @@ -0,0 +1,49 @@ +description('Test setting the href attribute of an HTMLAnchorElement to a URL with leading and trailing whitespace.'); + +var a = document.createElement('a'); + +debug("Set href that starts with a space"); +a.href = " https://www.mydomain.com/path/testurl.html?key=value"; +shouldBe("a.hostname", "'www.mydomain.com'"); + +debug("Set href that starts with a newline"); +a.href = "\nhttps://www.mydomain.com/path/testurl.html?key=value"; +shouldBe("a.hostname", "'www.mydomain.com'"); + +debug("Set href that starts with a tab"); +a.href = "\thttps://www.mydomain.com/path/testurl.html?key=value"; +shouldBe("a.hostname", "'www.mydomain.com'"); + +debug("Set href that starts with a carriage return"); +a.href = "\rhttps://www.mydomain.com/path/testurl.html?key=value"; +shouldBe("a.hostname", "'www.mydomain.com'"); + +debug("Set href that starts with a combination of newlines, spaces and tabs"); +a.href = "\n \t\r \nhttps://www.mydomain.com/path/testurl.html?key=value"; +shouldBe("a.hostname", "'www.mydomain.com'"); + +debug("Set href that ends with a space"); +a.href = "https://www.mydomain.com/path/testurl.html?key=value "; +shouldBe("a.hostname", "'www.mydomain.com'"); + +debug("Set href that ends with a newline"); +a.href = "https://www.mydomain.com/path/testurl.html?key=value\n"; +shouldBe("a.hostname", "'www.mydomain.com'"); + +debug("Set href that ends with a tab"); +a.href = "https://www.mydomain.com/path/testurl.html?key=value\t"; +shouldBe("a.hostname", "'www.mydomain.com'"); + +debug("Set href that ends with a carriage return"); +a.href = "https://www.mydomain.com/path/testurl.html?key=value\r"; +shouldBe("a.hostname", "'www.mydomain.com'"); + +debug("Set href that ends with a combination of newlines, spaces and tabs"); +a.href = "https://www.mydomain.com/path/testurl.html?key=value\n \t\r \n"; +shouldBe("a.hostname", "'www.mydomain.com'"); + +debug("Set href that starts and ends with a combination of newlines, spaces and tabs"); +a.href = "\n \t\r \nhttps://www.mydomain.com/path/testurl.html?key=value\n \t\r \n"; +shouldBe("a.hostname", "'www.mydomain.com'"); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hash-expected.txt b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hash-expected.txt new file mode 100644 index 0000000..6515820 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hash-expected.txt @@ -0,0 +1,29 @@ +Test setting the hash attribute of the URL in HTMLAnchorElement. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +Hash value does not start with '#' +PASS a.href is 'https://www.mydomain.com:8080/path/testurl.html#hash-value' +Hash value starts with '#' +PASS a.href is 'file:///path/testurl.html#hash_value' +'?' in hash value +PASS a.href is 'http://www.mydomain.com/path/testurl.html#hash?value' +'#' in hash value, and illegal characters in hostname +PASS a.href is 'https://www.my"d(){}|~om?ain#com/path/testurl.html#middle' +Set hash to null +PASS a.href is 'https://www.mydomain.com/path/testurl.html#' +Set hash to empty string +PASS a.href is 'https://www.mydomain.com/path/testurl.html#' +Add hash to mailto: protocol +PASS a.href is 'mailto:e-mail_address@goes_here#hash-value' +Add hash to file: protocol +PASS a.href is 'file:///some%20path#hash%20value' +Set hash to '#' +PASS a.href is 'http://mydomain.com/#' +Add hash to non-standard protocol +PASS a.href is 'foo:bar#hash' +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hash.html b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hash.html new file mode 100644 index 0000000..44ed1fc --- /dev/null +++ b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hash.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host-expected.txt b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host-expected.txt new file mode 100644 index 0000000..6c457a4 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host-expected.txt @@ -0,0 +1,39 @@ +Test setting the host attribute of the URL in HTMLAnchorElement. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +Basic test +PASS a.href is 'https://www.otherdomain.com:0/path/' +Set host with '?' in it +PASS a.href is 'https://www.other/?domain.com:8080/path/?key=value' +Set default port for another protocol +PASS a.href is 'https://www.otherdomain.com:80/path/' +Set default port +PASS a.href is 'https://www.otherdomain.com/path/' +Set host with letters in port number +PASS a.href is 'https://www.otherdomain.com:44/path/' +Leading space in port number +PASS a.href is 'https://www.otherdomain.com:0/path/' +Colon without port number +PASS a.href is 'https://www.otherdomain.com:0/path/' +Set host to null +PASS a.href is 'https://www.mydomain.com:8080/path/' +Set host to empty string +PASS a.href is 'https://www.mydomain.com:8080/path/' +Set host to URL with file: protocol +PASS a.href is 'file://mydomain.com/path/' +Set host containing slashes in it +PASS a.href is 'https://www.otherdom/ain.com/path/' +Set host to a malformed URL +PASS a.href is 'https://www.other!domain.com:15/ww.my@domain.com:8080/path/' +Set host that starts with ':' +PASS a.href is 'https://domain.com:8080/path/' +Set host to URL containing username and .. +PASS a.href is 'https://rwwmy@www.other!domain.com:25/pa..th/' +Set host to a URL with tel: protocol +PASS a.href is 'tel:+1-816-555-1212' +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host.html b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host.html new file mode 100644 index 0000000..602f3d2 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hostname-expected.txt b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hostname-expected.txt new file mode 100644 index 0000000..d0b284d --- /dev/null +++ b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hostname-expected.txt @@ -0,0 +1,27 @@ +Test setting the hostname attribute of the URL in HTMLAnchorElement. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +Basic test +PASS a.href is 'https://www.otherdomain.com:8080/path/' +Extra slashes before hostname +PASS a.href is 'https://www.otherdomain.com:8080/path/' +Set hostname to URL with foo: protocol +PASS a.href is 'foo://www.otherdomain.com/path/' +Set hostname to null +PASS a.href is 'https://www.mydomain.com:8080/path/' +Set hostname to empty string +PASS a.href is 'https://www.mydomain.com:8080/path/' +Set hostname to URL with 2 colons +PASS a.href is 'really:bad:url' +Set a hostname that contains space in it +PASS a.href is 'http://www.my domain.com/path/' +Set hostname on a local file +FAIL a.href should be c:/path/testurl.html. Was c://a/path/testurl.html. +Set hostname to undefined +PASS a.href is 'https://undefined:8080/path/' +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hostname.html b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hostname.html new file mode 100644 index 0000000..f08b433 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hostname.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-pathname-expected.txt b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-pathname-expected.txt new file mode 100644 index 0000000..5b2d8ae --- /dev/null +++ b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-pathname-expected.txt @@ -0,0 +1,27 @@ +Test setting the pathname attribute of the URL in HTMLAnchorElement. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +Set pathname that starts with slash +PASS a.href is 'https://www.mydomain.com/path%20name?key=value' +Set pathname that does not start with slash and contains '?' +PASS a.href is 'https://www.mydomain.com/pa%3Fth?key=value' +Set pathname that starts with double slash and contains '#' +PASS a.href is 'https://www.mydomain.com//path%23name?key=value' +Set a pathname containing .. in it +PASS a.href is 'https://www.mydomain.com/path?key=value' +Set pathname to null +PASS a.href is 'https://www.mydomain.com/?key=value' +Set pathname to empty string +PASS a.href is 'https://www.mydomain.com/?key=value' +Set pathname that includes illegal characters to URL that contains illegal characters. +PASS a.href is 'https://www.my|d[]()omain.com/path/testurl.html?key=value' +Set pathname to URL that contains '@' in host +PASS a.href is 'http://w@/path#ww' +Set pathname to a URL with non-hierarchical protocol +PASS a.href is 'tel:+1800-555-1212' +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-pathname.html b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-pathname.html new file mode 100644 index 0000000..93d70b0 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-pathname.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-port-expected.txt b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-port-expected.txt new file mode 100644 index 0000000..93678c4 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-port-expected.txt @@ -0,0 +1,25 @@ +Test setting the port attribute of the URL in HTMLAnchorElement. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +Default port as number +PASS a.href is 'https://www.mydomain.com/path/testurl.html?key=value' +Default port as string +PASS a.href is 'https://www.mydomain.com/path/testurl.html?key=value' +Set port to 0 +PASS a.href is 'https://www.mydomain.com:0/path/testurl.html?key=value' +Set port to non-number +PASS a.href is 'https://www.mydomain.com:4/path/testurl.html?key=value' +Set port to null +PASS a.href is 'https://www.mydomain.com:0/path/testurl.html?key=value' +Set port to empty string +PASS a.href is 'https://www.mydomain.com:0/path/testurl.html?key=value' +Set port to undefined +PASS a.href is 'https://www.mydomain.com:0/path/testurl.html?key=value' +Set port to URL with foo: protocol +PASS a.href is 'foo://bar:50/' +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-port.html b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-port.html new file mode 100644 index 0000000..f5cc94e --- /dev/null +++ b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-port.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol-expected.txt b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol-expected.txt new file mode 100644 index 0000000..bd801ab --- /dev/null +++ b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol-expected.txt @@ -0,0 +1,29 @@ +Test setting the protocol attribute of the URL in HTMLAnchorElement . + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +Basic test +PASS a.href is 'http-foo://www.mydomain.com/path/' +Set a protocol that contains ':' +PASS a.href is 'http://www.mydomain.com/path/' +Set a protocol that contains invalid characters +PASS a.href is 'https://www.mydomain.com/path/' +Set a protocol to a URL with invalid host name +PASS a.href is 'foo:^^' +Set a protocol that starts with ':' +PASS a.href is 'https://www.mydomain.com/path/' +Set protocol to null +PASS a.href is 'https://www.mydomain.com/path/' +Set protocol to empty string +PASS a.href is 'https://www.mydomain.com/path/' +Set protocol to http on malformed URL +PASS a.href is 'http:??bar' +Set protocol to a URL which points to a local file +PASS a.href is 'f-oo:path' +Set protocol to undefined +PASS a.href is 'undefined://www.mydomain.com/path/' +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol.html b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol.html new file mode 100644 index 0000000..8f6ec8f --- /dev/null +++ b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-search-expected.txt b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-search-expected.txt new file mode 100644 index 0000000..d034e2b --- /dev/null +++ b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-search-expected.txt @@ -0,0 +1,23 @@ +Test setting the search attribute of the URL in HTMLAnchorElement . + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +Set search without '?' +PASS a.href is 'https://www.mydomain.com/path/?value=key' +Set search that starts with '?' and contains spaces +PASS a.href is 'https://www.mydomain.com/path/?val%20ue=%20key?' +Set search to a malformed URL +PASS a.href is 's:www.mydomain.com/path/?%' +Set search containing '#' +PASS a.href is 'https://www.mydomain.com/path/?value%23key#hash' +Set search to a malformed URL +PASS a.href is 'bad:/|/url?value=key' +Set search to null +PASS a.href is 'https://www.mydomain.com/path/' +Set search to empty string +PASS a.href is 'https://www.mydomain.com/path/?' +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-search.html b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-search.html new file mode 100644 index 0000000..58695cb --- /dev/null +++ b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-search.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-whitespace-expected.txt b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-whitespace-expected.txt new file mode 100644 index 0000000..f7dfc61 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-whitespace-expected.txt @@ -0,0 +1,31 @@ +Test setting the href attribute of an HTMLAnchorElement to a URL with leading and trailing whitespace. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +Set href that starts with a space +PASS a.hostname is 'www.mydomain.com' +Set href that starts with a newline +PASS a.hostname is 'www.mydomain.com' +Set href that starts with a tab +PASS a.hostname is 'www.mydomain.com' +Set href that starts with a carriage return +PASS a.hostname is 'www.mydomain.com' +Set href that starts with a combination of newlines, spaces and tabs +PASS a.hostname is 'www.mydomain.com' +Set href that ends with a space +PASS a.hostname is 'www.mydomain.com' +Set href that ends with a newline +PASS a.hostname is 'www.mydomain.com' +Set href that ends with a tab +PASS a.hostname is 'www.mydomain.com' +Set href that ends with a carriage return +PASS a.hostname is 'www.mydomain.com' +Set href that ends with a combination of newlines, spaces and tabs +PASS a.hostname is 'www.mydomain.com' +Set href that starts and ends with a combination of newlines, spaces and tabs +PASS a.hostname is 'www.mydomain.com' +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-whitespace.html b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-whitespace.html new file mode 100644 index 0000000..7f86293 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-whitespace.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/HTMLButtonElement/value/getset-expected.txt b/LayoutTests/fast/dom/HTMLButtonElement/value/getset-expected.txt new file mode 100644 index 0000000..1c5d6a3 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLButtonElement/value/getset-expected.txt @@ -0,0 +1,5 @@ +Tests: HTMLButtonElement::value + +This test changes the value of the button. The original value is "Fail"; the new value should be "Success" + + Button value is: Success diff --git a/LayoutTests/fast/dom/HTMLButtonElement/value/getset.html b/LayoutTests/fast/dom/HTMLButtonElement/value/getset.html new file mode 100644 index 0000000..cb0f4d4 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLButtonElement/value/getset.html @@ -0,0 +1,27 @@ + + + + + +

Tests: HTMLButtonElement::value

+ +

+This test changes the value of the button. The original value is "Fail"; the new value should be "Success" +

+ +
+ + + + + + diff --git a/LayoutTests/fast/dom/HTMLFontElement/script-tests/TEMPLATE.html b/LayoutTests/fast/dom/HTMLFontElement/script-tests/TEMPLATE.html new file mode 100644 index 0000000..1951c43 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFontElement/script-tests/TEMPLATE.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/HTMLFontElement/script-tests/size-attribute.js b/LayoutTests/fast/dom/HTMLFontElement/script-tests/size-attribute.js new file mode 100644 index 0000000..3e090b1 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFontElement/script-tests/size-attribute.js @@ -0,0 +1,58 @@ +description("HTMLFontElement size attribute test"); + +function fontSizeAttributeEffect(value) +{ + var element = document.createElement("font"); + element.setAttribute("size", value); + var outerElement = document.createElement("p"); + outerElement.setAttribute("style", "font-size: 100px"); + document.body.appendChild(outerElement); + outerElement.appendChild(element); + var computedStyle = getComputedStyle(element, ""); + var result = computedStyle.fontSize; + document.body.removeChild(outerElement); + return result === "100px" ? null : result; +} + +shouldBe('fontSizeAttributeEffect("")', 'null'); + +shouldBe('fontSizeAttributeEffect("1")', '"10px"'); +shouldBe('fontSizeAttributeEffect("2")', '"13px"'); +shouldBe('fontSizeAttributeEffect("3")', '"16px"'); +shouldBe('fontSizeAttributeEffect("4")', '"18px"'); +shouldBe('fontSizeAttributeEffect("5")', '"24px"'); +shouldBe('fontSizeAttributeEffect("6")', '"32px"'); +shouldBe('fontSizeAttributeEffect("7")', '"48px"'); + +shouldBe('fontSizeAttributeEffect("0")', '"16px"'); // Gecko and WebKit do not agree on this result. Which matches IE? + +shouldBe('fontSizeAttributeEffect("-1")', '"13px"'); +shouldBe('fontSizeAttributeEffect("-2")', '"10px"'); +shouldBe('fontSizeAttributeEffect("-3")', '"10px"'); +shouldBe('fontSizeAttributeEffect("-4")', '"10px"'); +shouldBe('fontSizeAttributeEffect("-5")', '"10px"'); +shouldBe('fontSizeAttributeEffect("-6")', '"10px"'); +shouldBe('fontSizeAttributeEffect("-7")', '"10px"'); +shouldBe('fontSizeAttributeEffect("-8")', '"10px"'); +shouldBe('fontSizeAttributeEffect("-9")', '"10px"'); +shouldBe('fontSizeAttributeEffect("-10")', '"10px"'); + +shouldBe('fontSizeAttributeEffect("8")', '"48px"'); +shouldBe('fontSizeAttributeEffect("9")', '"48px"'); +shouldBe('fontSizeAttributeEffect("10")', '"48px"'); +shouldBe('fontSizeAttributeEffect("100")', '"48px"'); +shouldBe('fontSizeAttributeEffect("1000")', '"48px"'); + +shouldBe('fontSizeAttributeEffect("1x")', '"10px"'); +shouldBe('fontSizeAttributeEffect("1.")', '"10px"'); +shouldBe('fontSizeAttributeEffect("1.9")', '"10px"'); +shouldBe('fontSizeAttributeEffect("2x")', '"13px"'); +shouldBe('fontSizeAttributeEffect("2.")', '"13px"'); +shouldBe('fontSizeAttributeEffect("2.9")', '"13px"'); + +shouldBe('fontSizeAttributeEffect("a")', 'null'); + +var arabicIndicDigitOne = String.fromCharCode(0x661); +shouldBe('fontSizeAttributeEffect(arabicIndicDigitOne)', 'null'); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/HTMLFontElement/size-attribute-expected.txt b/LayoutTests/fast/dom/HTMLFontElement/size-attribute-expected.txt new file mode 100644 index 0000000..28d44af --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFontElement/size-attribute-expected.txt @@ -0,0 +1,41 @@ +HTMLFontElement size attribute test + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS fontSizeAttributeEffect("") is null +PASS fontSizeAttributeEffect("1") is "10px" +PASS fontSizeAttributeEffect("2") is "13px" +PASS fontSizeAttributeEffect("3") is "16px" +PASS fontSizeAttributeEffect("4") is "18px" +PASS fontSizeAttributeEffect("5") is "24px" +PASS fontSizeAttributeEffect("6") is "32px" +PASS fontSizeAttributeEffect("7") is "48px" +PASS fontSizeAttributeEffect("0") is "16px" +PASS fontSizeAttributeEffect("-1") is "13px" +PASS fontSizeAttributeEffect("-2") is "10px" +PASS fontSizeAttributeEffect("-3") is "10px" +PASS fontSizeAttributeEffect("-4") is "10px" +PASS fontSizeAttributeEffect("-5") is "10px" +PASS fontSizeAttributeEffect("-6") is "10px" +PASS fontSizeAttributeEffect("-7") is "10px" +PASS fontSizeAttributeEffect("-8") is "10px" +PASS fontSizeAttributeEffect("-9") is "10px" +PASS fontSizeAttributeEffect("-10") is "10px" +PASS fontSizeAttributeEffect("8") is "48px" +PASS fontSizeAttributeEffect("9") is "48px" +PASS fontSizeAttributeEffect("10") is "48px" +PASS fontSizeAttributeEffect("100") is "48px" +PASS fontSizeAttributeEffect("1000") is "48px" +PASS fontSizeAttributeEffect("1x") is "10px" +PASS fontSizeAttributeEffect("1.") is "10px" +PASS fontSizeAttributeEffect("1.9") is "10px" +PASS fontSizeAttributeEffect("2x") is "13px" +PASS fontSizeAttributeEffect("2.") is "13px" +PASS fontSizeAttributeEffect("2.9") is "13px" +PASS fontSizeAttributeEffect("a") is null +PASS fontSizeAttributeEffect(arabicIndicDigitOne) is null +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/HTMLFontElement/size-attribute.html b/LayoutTests/fast/dom/HTMLFontElement/size-attribute.html new file mode 100644 index 0000000..4361dba --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFontElement/size-attribute.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/HTMLFormElement/adopt-assertion-expected.txt b/LayoutTests/fast/dom/HTMLFormElement/adopt-assertion-expected.txt new file mode 100644 index 0000000..e602f6f --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFormElement/adopt-assertion-expected.txt @@ -0,0 +1,3 @@ +Test for https://bugs.webkit.org/attachment.cgi?id=30159 Assertion failure in Node::setDocument() (willMoveToNewOwnerDocumentWasCalled) when adopting a
element. + +The test passed if the assertion did not fail. diff --git a/LayoutTests/fast/dom/HTMLFormElement/adopt-assertion.html b/LayoutTests/fast/dom/HTMLFormElement/adopt-assertion.html new file mode 100644 index 0000000..80a99d5 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFormElement/adopt-assertion.html @@ -0,0 +1,16 @@ +

+ Test for https://bugs.webkit.org/attachment.cgi?id=30159 + Assertion failure in Node::setDocument() + (willMoveToNewOwnerDocumentWasCalled) when adopting a <form> element. +

+

+ The test passed if the assertion did not fail. +

+
+ diff --git a/LayoutTests/fast/dom/HTMLFormElement/document-deactivation-callback-crash-expected.txt b/LayoutTests/fast/dom/HTMLFormElement/document-deactivation-callback-crash-expected.txt new file mode 100644 index 0000000..637c653 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFormElement/document-deactivation-callback-crash-expected.txt @@ -0,0 +1,5 @@ +Test for a crash when deactivating a document that had adopted a
element. + +The test passed if it did not crash. + + diff --git a/LayoutTests/fast/dom/HTMLFormElement/document-deactivation-callback-crash.html b/LayoutTests/fast/dom/HTMLFormElement/document-deactivation-callback-crash.html new file mode 100644 index 0000000..d8b535e --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFormElement/document-deactivation-callback-crash.html @@ -0,0 +1,41 @@ +

+ Test for a crash when deactivating a document that had adopted a <form> + element. +

+

+ The test passed if it did not crash. +

+ + diff --git a/LayoutTests/fast/dom/HTMLFormElement/elements-not-in-document-expected.txt b/LayoutTests/fast/dom/HTMLFormElement/elements-not-in-document-expected.txt new file mode 100644 index 0000000..54dbd7d --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFormElement/elements-not-in-document-expected.txt @@ -0,0 +1,27 @@ +Test the elements collection when the form is not a descendant of the document. This test case failed in an early version of Acid3. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS i.getAttribute('name') is 'first' +PASS i.name is 'first' +PASS i.getAttribute('type') is 'text' +PASS i.type is 'text' +PASS i.value is 'test' +PASS f.elements.length is 1 +PASS f.elements[0] is i +PASS f.elements.first is i +PASS f.elements.second is i +PASS i.getAttribute('name') is 'second' +PASS i.name is 'second' +PASS i.getAttribute('type') is 'password' +PASS i.type is 'password' +PASS i.value is 'TEST' +PASS f.elements.length is 1 +PASS f.elements[0] is i +PASS f.elements.first is undefined +PASS f.elements.second is i +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/HTMLFormElement/elements-not-in-document.html b/LayoutTests/fast/dom/HTMLFormElement/elements-not-in-document.html new file mode 100644 index 0000000..09b6f36 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFormElement/elements-not-in-document.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/HTMLFormElement/htmlformelement-indexed-getter-expected.txt b/LayoutTests/fast/dom/HTMLFormElement/htmlformelement-indexed-getter-expected.txt new file mode 100644 index 0000000..db8ff58 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFormElement/htmlformelement-indexed-getter-expected.txt @@ -0,0 +1,10 @@ +This test verifies that elements can be fetched by index from HTMLFormElements. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS form[0] is my_input +PASS successfullyParsed is true + +TEST COMPLETE +HTMLInputElement diff --git a/LayoutTests/fast/dom/HTMLFormElement/htmlformelement-indexed-getter.html b/LayoutTests/fast/dom/HTMLFormElement/htmlformelement-indexed-getter.html new file mode 100644 index 0000000..b45c35f --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFormElement/htmlformelement-indexed-getter.html @@ -0,0 +1,24 @@ + + + + + + +

+
+ + + HTMLInputElement +
+ + + + + diff --git a/LayoutTests/fast/dom/HTMLFormElement/script-tests/TEMPLATE.html b/LayoutTests/fast/dom/HTMLFormElement/script-tests/TEMPLATE.html new file mode 100644 index 0000000..1951c43 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFormElement/script-tests/TEMPLATE.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/HTMLFormElement/script-tests/elements-not-in-document.js b/LayoutTests/fast/dom/HTMLFormElement/script-tests/elements-not-in-document.js new file mode 100644 index 0000000..da1ea80 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFormElement/script-tests/elements-not-in-document.js @@ -0,0 +1,37 @@ +description('Test the elements collection when the form is not a descendant of the document. This test case failed in an early version of Acid3.'); + +var f = document.createElement('form'); +var i = document.createElement('input'); +i.name = 'first'; +i.type = 'text'; +i.value = 'test'; +f.appendChild(i); + +shouldBe("i.getAttribute('name')", "'first'"); +shouldBe("i.name", "'first'"); +shouldBe("i.getAttribute('type')", "'text'"); +shouldBe("i.type", "'text'"); +shouldBe("i.value", "'test'"); +shouldBe("f.elements.length", "1"); +shouldBe("f.elements[0]", "i"); +shouldBe("f.elements.first", "i"); + +f.elements.second; +i.name = 'second'; +i.type = 'password'; +i.value = 'TEST'; + +// This has to be the first expression tested, because reporting the result will fix the bug. +shouldBe("f.elements.second", "i"); + +shouldBe("i.getAttribute('name')", "'second'"); +shouldBe("i.name", "'second'"); +shouldBe("i.getAttribute('type')", "'password'"); +shouldBe("i.type", "'password'"); +shouldBe("i.value", "'TEST'"); +shouldBe("f.elements.length", "1"); +shouldBe("f.elements[0]", "i"); +shouldBe("f.elements.first", "undefined"); +shouldBe("f.elements.second", "i"); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/HTMLHtmlElement/duplicate-html-element-crash-expected.txt b/LayoutTests/fast/dom/HTMLHtmlElement/duplicate-html-element-crash-expected.txt new file mode 100644 index 0000000..335df63 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLHtmlElement/duplicate-html-element-crash-expected.txt @@ -0,0 +1,2 @@ +This tests that we won't crash when creating a new html element when the document does not have a document element. +SUCCESS - Did not crash! diff --git a/LayoutTests/fast/dom/HTMLHtmlElement/duplicate-html-element-crash.html b/LayoutTests/fast/dom/HTMLHtmlElement/duplicate-html-element-crash.html new file mode 100644 index 0000000..216f1a9 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLHtmlElement/duplicate-html-element-crash.html @@ -0,0 +1,17 @@ + + + diff --git a/LayoutTests/fast/dom/HTMLHtmlElement/set-version-expected.txt b/LayoutTests/fast/dom/HTMLHtmlElement/set-version-expected.txt new file mode 100644 index 0000000..782fe8f --- /dev/null +++ b/LayoutTests/fast/dom/HTMLHtmlElement/set-version-expected.txt @@ -0,0 +1,6 @@ +This tests to make sure that HTMLHtmlElement::version settable. + +You should see 2 lines with "SUCCESS" below: +SUCCESS (value: "1") + +SUCCESS (value: "2") diff --git a/LayoutTests/fast/dom/HTMLHtmlElement/set-version.html b/LayoutTests/fast/dom/HTMLHtmlElement/set-version.html new file mode 100644 index 0000000..2e45aad --- /dev/null +++ b/LayoutTests/fast/dom/HTMLHtmlElement/set-version.html @@ -0,0 +1,24 @@ + + +

+This tests to make sure that HTMLHtmlElement::version settable.

+You should see 2 lines with "SUCCESS" below: + + + \ No newline at end of file diff --git a/LayoutTests/fast/dom/HTMLKeygenElement/keygen-option-select-expected.txt b/LayoutTests/fast/dom/HTMLKeygenElement/keygen-option-select-expected.txt new file mode 100644 index 0000000..a6f14fb --- /dev/null +++ b/LayoutTests/fast/dom/HTMLKeygenElement/keygen-option-select-expected.txt @@ -0,0 +1,6 @@ + +This test verifies that list-box-style select form control for keygen works properly when selecting from option element. + +You should see the word "SUCCESS" below + +SUCCESS diff --git a/LayoutTests/fast/dom/HTMLKeygenElement/keygen-option-select.html b/LayoutTests/fast/dom/HTMLKeygenElement/keygen-option-select.html new file mode 100644 index 0000000..2667715 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLKeygenElement/keygen-option-select.html @@ -0,0 +1,40 @@ + + + + +

This test verifies that list-box-style select form control for keygen works properly when selecting from option element. +

You should see the word "SUCCESS" below

+ +
FAILED
+ + + + + diff --git a/LayoutTests/fast/dom/HTMLLabelElement/click-label-expected.txt b/LayoutTests/fast/dom/HTMLLabelElement/click-label-expected.txt new file mode 100644 index 0000000..442e91c --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLabelElement/click-label-expected.txt @@ -0,0 +1,5 @@ +This tests that the correct form control element is clicked when clicking on a label. If the test is successful, the text "SUCCESS" should show below. +label1inc +label2inc + +SUCCESS diff --git a/LayoutTests/fast/dom/HTMLLabelElement/click-label.html b/LayoutTests/fast/dom/HTMLLabelElement/click-label.html new file mode 100644 index 0000000..b8dbfbd --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLabelElement/click-label.html @@ -0,0 +1,43 @@ + + + + + +This tests that the correct form control element is clicked when clicking on a label. +If the test is successful, the text "SUCCESS" should show below.
+
+
+
FAILURE
+ + + + diff --git a/LayoutTests/fast/dom/HTMLLabelElement/focus-label-expected.txt b/LayoutTests/fast/dom/HTMLLabelElement/focus-label-expected.txt new file mode 100644 index 0000000..ff90b5d --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLabelElement/focus-label-expected.txt @@ -0,0 +1,5 @@ +This tests that the correct form control element is activated when clicking on a label. If the test is successful, the text "SUCCESS" should show below. +label1 +label2 + +SUCCESS diff --git a/LayoutTests/fast/dom/HTMLLabelElement/focus-label.html b/LayoutTests/fast/dom/HTMLLabelElement/focus-label.html new file mode 100644 index 0000000..b1f697d --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLabelElement/focus-label.html @@ -0,0 +1,32 @@ + + + + + +This tests that the correct form control element is activated when clicking on a label. +If the test is successful, the text "SUCCESS" should show below.
+
+
+
FAILURE
+ + + + diff --git a/LayoutTests/fast/dom/HTMLLabelElement/form/test1-expected.txt b/LayoutTests/fast/dom/HTMLLabelElement/form/test1-expected.txt new file mode 100644 index 0000000..e374b37 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLabelElement/form/test1-expected.txt @@ -0,0 +1,7 @@ +This test attempts to access an HTMLLabelElement's form property. The first test accesses the form property of an label which is inside of a form. The second test accesses the form property of an label which is not inside of a form + +Passed + +Passed + + diff --git a/LayoutTests/fast/dom/HTMLLabelElement/form/test1.html b/LayoutTests/fast/dom/HTMLLabelElement/form/test1.html new file mode 100644 index 0000000..6a30bd0 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLabelElement/form/test1.html @@ -0,0 +1,46 @@ + + + + + + +

This test attempts to access an HTMLLabelElement's form property. The first test accesses the form property of an label which is inside of a form. The second test accesses the form property of an label which is not inside of a form

+ +
+ +
+ +
+ + + + diff --git a/LayoutTests/fast/dom/HTMLLabelElement/label-control-expected.txt b/LayoutTests/fast/dom/HTMLLabelElement/label-control-expected.txt new file mode 100644 index 0000000..bb127c6 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLabelElement/label-control-expected.txt @@ -0,0 +1,51 @@ +Test that label.control references the correct form control, or null if there is no associated control. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +Find a control that is the first descendent in a label +PASS document.getElementById('test1').control.id is 'inputId1' +Find a control based on a label with valid 'for' attribute +PASS document.getElementById('test2').htmlFor is 'inputId2' +PASS document.getElementById('test2').control.type is 'number' +Find a control in p element in label +PASS document.getElementById('test3').control.id is 'inputId3' +Find a control in fieldset in label. +Note that filedset is a form control that is not labelable. +PASS document.getElementById('test4').control.id is 'inputId4' +Find a control in legend in label. +Note that legend is a form control that is not labelable. +PASS document.getElementById('test5').control.id is 'inputId5' +Find a control in optgroup in label. +Note that optgroup is a form control that is not labelable. +PASS document.getElementById('test6').control.id is 'inputId6' +Find a control in option in label. +Note that option is a form control that is not labelable. +PASS document.getElementById('test7').control.id is 'inputId7' +Test label with 'for' attribute which is not a valid element id +PASS document.getElementById('test8').control is null +Test label with 'for' attribute which is not a form control +PASS document.getElementById('test9').htmlFor is 'divId' +PASS document.getElementById('test9').control is null +Test label with 'for' attribute which is not a labelable form control - fieldset +PASS document.getElementById('test10').htmlFor is 'fsId' +PASS document.getElementById('test10').control is null +Test label with 'for' attribute which is not a labelable form control - legend +PASS document.getElementById('test11').htmlFor is 'legendId' +PASS document.getElementById('test11').control is null +Test label with 'for' attribute which is not a labelable form control - optgroup +PASS document.getElementById('test12').htmlFor is 'optgroupId' +PASS document.getElementById('test12').control is null +Test label with 'for' attribute which is not a labelable form control - option +PASS document.getElementById('test13').htmlFor is 'optionId' +PASS document.getElementById('test13').control is null +PASS successfullyParsed is true + +TEST COMPLETE + + + + + + + diff --git a/LayoutTests/fast/dom/HTMLLabelElement/label-control.html b/LayoutTests/fast/dom/HTMLLabelElement/label-control.html new file mode 100644 index 0000000..cd0691f --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLabelElement/label-control.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/HTMLLabelElement/script-tests/TEMPLATE.html b/LayoutTests/fast/dom/HTMLLabelElement/script-tests/TEMPLATE.html new file mode 100644 index 0000000..1951c43 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLabelElement/script-tests/TEMPLATE.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/HTMLLabelElement/script-tests/label-control.js b/LayoutTests/fast/dom/HTMLLabelElement/script-tests/label-control.js new file mode 100644 index 0000000..7a93c12 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLabelElement/script-tests/label-control.js @@ -0,0 +1,65 @@ +description('Test that label.control references the correct form control, or null if there is no associated control.'); + +debug("Find a control that is the first descendent in a label"); +document.write(""); +shouldBe("document.getElementById('test1').control.id", "'inputId1'"); + +debug("Find a control based on a label with valid 'for' attribute"); +document.write(""); +shouldBe("document.getElementById('test2').htmlFor", "'inputId2'"); +shouldBe("document.getElementById('test2').control.type", "'number'"); + +debug("Find a control in p element in label"); +document.write(""); +shouldBe("document.getElementById('test3').control.id", "'inputId3'"); + +debug("Find a control in fieldset in label."); +debug("Note that filedset is a form control that is not labelable."); +document.write(""); +shouldBe("document.getElementById('test4').control.id", "'inputId4'"); + +debug("Find a control in legend in label."); +debug("Note that legend is a form control that is not labelable."); +document.write(""); +shouldBe("document.getElementById('test5').control.id", "'inputId5'"); + +debug("Find a control in optgroup in label."); +debug("Note that optgroup is a form control that is not labelable."); +document.write(""); +shouldBe("document.getElementById('test6').control.id", "'inputId6'"); + +debug("Find a control in option in label."); +debug("Note that option is a form control that is not labelable."); +document.write(""); +shouldBe("document.getElementById('test7').control.id", "'inputId7'"); + +debug("Test label with 'for' attribute which is not a valid element id"); +document.write(""); +shouldBe("document.getElementById('test8').control", "null"); + +debug("Test label with 'for' attribute which is not a form control"); +document.write("
"); +shouldBe("document.getElementById('test9').htmlFor", "'divId'"); +shouldBe("document.getElementById('test9').control", "null"); + +debug("Test label with 'for' attribute which is not a labelable form control - fieldset"); +document.write("
"); +shouldBe("document.getElementById('test10').htmlFor", "'fsId'"); +shouldBe("document.getElementById('test10').control", "null"); + +debug("Test label with 'for' attribute which is not a labelable form control - legend"); +document.write(""); +shouldBe("document.getElementById('test11').htmlFor", "'legendId'"); +shouldBe("document.getElementById('test11').control", "null"); + +debug("Test label with 'for' attribute which is not a labelable form control - optgroup"); +document.write(""); +shouldBe("document.getElementById('test12').htmlFor", "'optgroupId'"); +shouldBe("document.getElementById('test12').control", "null"); + +debug("Test label with 'for' attribute which is not a labelable form control - option"); +document.write(""); +shouldBe("document.getElementById('test13').htmlFor", "'optionId'"); +shouldBe("document.getElementById('test13').control", "null"); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/HTMLMetaElement/meta-attributes-expected.txt b/LayoutTests/fast/dom/HTMLMetaElement/meta-attributes-expected.txt new file mode 100644 index 0000000..77e76d1 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLMetaElement/meta-attributes-expected.txt @@ -0,0 +1,10 @@ +You should see 5 lines with "SUCCESS" below: +SUCCESS (value: "[object HTMLMetaElement]") + +SUCCESS (value: "foo") + +SUCCESS (value: "bar") + +SUCCESS (value: "content-type") + +SUCCESS (value: "text/html; charset=UTF-8") diff --git a/LayoutTests/fast/dom/HTMLMetaElement/meta-attributes.html b/LayoutTests/fast/dom/HTMLMetaElement/meta-attributes.html new file mode 100644 index 0000000..181565c --- /dev/null +++ b/LayoutTests/fast/dom/HTMLMetaElement/meta-attributes.html @@ -0,0 +1,28 @@ + + + + + +You should see 5 lines with "SUCCESS" below: + + + + diff --git a/LayoutTests/fast/dom/HTMLTableRowElement/cells-expected.txt b/LayoutTests/fast/dom/HTMLTableRowElement/cells-expected.txt new file mode 100644 index 0000000..162ed69 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLTableRowElement/cells-expected.txt @@ -0,0 +1,37 @@ +Test behavior of the HTMLTableRowElement cells attribute in cases where there is unusual nesting. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS checkCellNesting("col") is 0 +PASS checkCellNesting("colgroup") is 0 +PASS checkCellNesting("div") is 0 +PASS checkCellNesting("form") is 0 +PASS checkCellNesting("script") is 0 +PASS checkCellNesting("table") is 0 +PASS checkCellNesting("tbody") is 0 +PASS checkCellNesting("tfoot") is 0 +PASS checkCellNesting("thead") is 0 +PASS checkCellNesting("tr") is 0 + +PASS checkCellNesting("td") is 1 +PASS checkCellNesting("th") is 1 + +PASS checkHeaderCellNesting("col") is 0 +PASS checkHeaderCellNesting("colgroup") is 0 +PASS checkHeaderCellNesting("div") is 0 +PASS checkHeaderCellNesting("form") is 0 +PASS checkHeaderCellNesting("script") is 0 +PASS checkHeaderCellNesting("table") is 0 +PASS checkHeaderCellNesting("tbody") is 0 +PASS checkHeaderCellNesting("tfoot") is 0 +PASS checkHeaderCellNesting("thead") is 0 +PASS checkHeaderCellNesting("tr") is 0 + +PASS checkHeaderCellNesting("td") is 1 +PASS checkHeaderCellNesting("th") is 1 + +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/HTMLTableRowElement/cells.html b/LayoutTests/fast/dom/HTMLTableRowElement/cells.html new file mode 100644 index 0000000..9a6a573 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLTableRowElement/cells.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/HTMLTableRowElement/insertCell-expected.txt b/LayoutTests/fast/dom/HTMLTableRowElement/insertCell-expected.txt new file mode 100644 index 0000000..114f982 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLTableRowElement/insertCell-expected.txt @@ -0,0 +1,5 @@ +This tests a particular case of insertCell that was crashing on ebay at the time the test was written. + +cell inside table inside cell 0 cell inside table inside cell 1 + +If there was no crash, and you can see text above mentioning cell 1 as well as cell 0, the test passed. diff --git a/LayoutTests/fast/dom/HTMLTableRowElement/insertCell.html b/LayoutTests/fast/dom/HTMLTableRowElement/insertCell.html new file mode 100644 index 0000000..04b79a5 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLTableRowElement/insertCell.html @@ -0,0 +1,28 @@ + + + + + + + + +

This tests a particular case of insertCell that was crashing on ebay at the time the test was written.

+ +

+ +

If there was no crash, and you can see text above mentioning cell 1 as well as cell 0, the test passed.

+ + + + diff --git a/LayoutTests/fast/dom/HTMLTableRowElement/script-tests/TEMPLATE.html b/LayoutTests/fast/dom/HTMLTableRowElement/script-tests/TEMPLATE.html new file mode 100644 index 0000000..1951c43 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLTableRowElement/script-tests/TEMPLATE.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/HTMLTableRowElement/script-tests/cells.js b/LayoutTests/fast/dom/HTMLTableRowElement/script-tests/cells.js new file mode 100644 index 0000000..eb8f7c8 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLTableRowElement/script-tests/cells.js @@ -0,0 +1,56 @@ +description('Test behavior of the HTMLTableRowElement cells attribute in cases where there is unusual nesting.'); + +function checkCellNesting(tag) +{ + var row = document.createElement("tr"); + var container = document.createElement(tag); + var cell = document.createElement("td"); + row.appendChild(container); + container.appendChild(cell); + return row.cells.length; +} + +function checkHeaderCellNesting(tag) +{ + var row = document.createElement("tr"); + var container = document.createElement(tag); + var cell = document.createElement("th"); + row.appendChild(container); + container.appendChild(cell); + return row.cells.length; +} + +var tags = [ + "col", + "colgroup", + "div", + "form", + "script", + "table", + "tbody", + "tfoot", + "thead", + "tr", +]; + +for (i = 0; i < tags.length; ++i) + shouldBe('checkCellNesting("' + tags[i] + '")', '0'); + +debug(''); + +shouldBe('checkCellNesting("td")', '1'); +shouldBe('checkCellNesting("th")', '1'); + +debug(''); + +for (i = 0; i < tags.length; ++i) + shouldBe('checkHeaderCellNesting("' + tags[i] + '")', '0'); + +debug(''); + +shouldBe('checkHeaderCellNesting("td")', '1'); +shouldBe('checkHeaderCellNesting("th")', '1'); + +debug(''); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/HTMLTableSectionElement/rows-expected.txt b/LayoutTests/fast/dom/HTMLTableSectionElement/rows-expected.txt new file mode 100644 index 0000000..41ce7ab --- /dev/null +++ b/LayoutTests/fast/dom/HTMLTableSectionElement/rows-expected.txt @@ -0,0 +1,24 @@ +Test behavior of the HTMLTableSectionElement rows attribute in cases where there is unusual nesting. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS checkRowNesting("col") is 0 +PASS checkRowNesting("colgroup") is 0 +PASS checkRowNesting("div") is 0 +PASS checkRowNesting("form") is 0 +PASS checkRowNesting("script") is 0 +PASS checkRowNesting("table") is 0 +PASS checkRowNesting("td") is 0 +PASS checkRowNesting("th") is 0 + +PASS checkRowNesting("tbody") is 0 +PASS checkRowNesting("tfoot") is 0 +PASS checkRowNesting("thead") is 0 + +PASS checkRowNesting("tr") is 1 + +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/HTMLTableSectionElement/rows.html b/LayoutTests/fast/dom/HTMLTableSectionElement/rows.html new file mode 100644 index 0000000..163e235 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLTableSectionElement/rows.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/HTMLTableSectionElement/script-tests/TEMPLATE.html b/LayoutTests/fast/dom/HTMLTableSectionElement/script-tests/TEMPLATE.html new file mode 100644 index 0000000..1951c43 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLTableSectionElement/script-tests/TEMPLATE.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/HTMLTableSectionElement/script-tests/rows.js b/LayoutTests/fast/dom/HTMLTableSectionElement/script-tests/rows.js new file mode 100644 index 0000000..80ac6a3 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLTableSectionElement/script-tests/rows.js @@ -0,0 +1,44 @@ +description('Test behavior of the HTMLTableSectionElement rows attribute in cases where there is unusual nesting.'); + +function checkRowNesting(tag) +{ + var body = document.createElement("tbody"); + var container = document.createElement(tag); + var row = document.createElement("tr"); + body.appendChild(container); + container.appendChild(row); + return body.rows.length; +} + +var sectionTags = [ + "tbody", + "tfoot", + "thead", +]; + +var otherTags = [ + "col", + "colgroup", + "div", + "form", + "script", + "table", + "td", + "th", +]; + +for (i = 0; i < otherTags.length; ++i) + shouldBe('checkRowNesting("' + otherTags[i] + '")', '0'); + +debug(''); + +for (i = 0; i < sectionTags.length; ++i) + shouldBe('checkRowNesting("' + sectionTags[i] + '")', '0'); + +debug(''); + +shouldBe('checkRowNesting("tr")', '1'); + +debug(''); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/Node/DOMNodeRemovedEvent-expected.txt b/LayoutTests/fast/dom/Node/DOMNodeRemovedEvent-expected.txt new file mode 100644 index 0000000..1ccc099 --- /dev/null +++ b/LayoutTests/fast/dom/Node/DOMNodeRemovedEvent-expected.txt @@ -0,0 +1,10 @@ +This test checks that DOMNodeRemovedEvent is emitted once (and only once). + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS count is 1 +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/Node/DOMNodeRemovedEvent.html b/LayoutTests/fast/dom/Node/DOMNodeRemovedEvent.html new file mode 100644 index 0000000..4b1cd04 --- /dev/null +++ b/LayoutTests/fast/dom/Node/DOMNodeRemovedEvent.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/Node/default-namespace-empty-argument-expected.txt b/LayoutTests/fast/dom/Node/default-namespace-empty-argument-expected.txt new file mode 100644 index 0000000..ef7b411 --- /dev/null +++ b/LayoutTests/fast/dom/Node/default-namespace-empty-argument-expected.txt @@ -0,0 +1,5 @@ +Test for a bug 30992: Node.isDefaultNamespace doesn't convert empty strings to null. + +Should say PASS: + +PASS diff --git a/LayoutTests/fast/dom/Node/default-namespace-empty-argument.html b/LayoutTests/fast/dom/Node/default-namespace-empty-argument.html new file mode 100644 index 0000000..da915c1 --- /dev/null +++ b/LayoutTests/fast/dom/Node/default-namespace-empty-argument.html @@ -0,0 +1,8 @@ +

Test for a bug 30992: Node.isDefaultNamespace doesn't convert empty strings to null.

+

Should say PASS:

+ diff --git a/LayoutTests/fast/dom/Node/fragment-mutation-expected.txt b/LayoutTests/fast/dom/Node/fragment-mutation-expected.txt new file mode 100644 index 0000000..41e8fa4 --- /dev/null +++ b/LayoutTests/fast/dom/Node/fragment-mutation-expected.txt @@ -0,0 +1,17 @@ +This test creates a fragment containing three elements: "B", "U", and "P", attempts to appendChild this fragment and studies effects of mutation events on the fragment. + +Inserting an element in front of the next item in fragment should not affect the result: PASS +Removing next item should not abort iteration: PASS +Appending an element at the end of the fragment should not affect the result: PASS +Continually re-appending removed element to the fragment should eventually throw NOT_FOUND_ERR: PASS +Moving next item to become previous sibling of the re-parentee should not result in stack exhaustion: PASS + +This test creates a fragment containing three elements: "B", "U", and "P", attempts to insertBefore this fragment and studies effects of mutation events on the fragment. + +Inserting an element in front of the next item in fragment should not affect the result: PASS +Removing next item should not abort iteration: PASS +Appending an element at the end of the fragment should not affect the result: PASS +Continually re-appending removed element to the fragment should eventually throw NOT_FOUND_ERR: PASS +Moving next item to become previous sibling of the re-parentee should not result in stack exhaustion: PASS + + diff --git a/LayoutTests/fast/dom/Node/fragment-mutation.html b/LayoutTests/fast/dom/Node/fragment-mutation.html new file mode 100644 index 0000000..037e17b --- /dev/null +++ b/LayoutTests/fast/dom/Node/fragment-mutation.html @@ -0,0 +1,148 @@ + + +Fragment Mutation Tests + + + + + \ No newline at end of file diff --git a/LayoutTests/fast/dom/Node/initial-values-expected.txt b/LayoutTests/fast/dom/Node/initial-values-expected.txt new file mode 100644 index 0000000..48d2895 --- /dev/null +++ b/LayoutTests/fast/dom/Node/initial-values-expected.txt @@ -0,0 +1,151 @@ +Test creation of each type of Node and check intial values + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +Attribute creation using createElement on an HTML doc: +PASS attr.nodeName is 'foo' +PASS attr.name is 'foo' +FAIL attr.localName should be null (of type object). Was foo (of type string). +PASS attr.namespaceURI is null +PASS attr.prefix is null +PASS attr.nodeValue is '' +PASS attr.value is '' +PASS attr.attributes is null +Attribute creation using createElementNS on an HTML doc: +PASS attr.nodeName is 'example:foo' +PASS attr.name is 'example:foo' +PASS attr.localName is 'foo' +PASS attr.namespaceURI is 'http://www.example.com' +PASS attr.prefix is 'example' +PASS attr.nodeValue is '' +PASS attr.value is '' +PASS attr.attributes is null +Attribute creation using createElement on an XHTML doc: +PASS attr.nodeName is 'foo' +PASS attr.name is 'foo' +FAIL attr.localName should be null (of type object). Was foo (of type string). +PASS attr.namespaceURI is null +PASS attr.prefix is null +PASS attr.nodeValue is '' +PASS attr.value is '' +PASS attr.attributes is null +Attribute creation using createElementNS on an XHTML doc: +PASS attr.nodeName is 'example:foo' +PASS attr.name is 'example:foo' +PASS attr.localName is 'foo' +PASS attr.namespaceURI is 'http://www.example.com' +PASS attr.prefix is 'example' +PASS attr.nodeValue is '' +PASS attr.value is '' +PASS attr.attributes is null +PASS comment.nodeName is '#comment' +PASS comment.localName is null +PASS comment.namespaceURI is null +PASS comment.prefix is null +PASS comment.nodeValue is 'foo' +PASS comment.data is 'foo' +PASS comment.attributes is null +PASS document.createCDATASection('foo') threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9. +PASS cdata.nodeName is '#cdata-section' +PASS cdata.localName is null +PASS cdata.namespaceURI is null +PASS cdata.prefix is null +PASS cdata.nodeValue is 'foo' +PASS cdata.data is 'foo' +PASS cdata.attributes is null +PASS fragment.nodeName is '#document-fragment' +PASS fragment.localName is null +PASS fragment.namespaceURI is null +PASS fragment.prefix is null +PASS fragment.nodeValue is null +PASS fragment.attributes is null +PASS doc.nodeName is '#document' +PASS doc.localName is null +FAIL doc.namespaceURI should be http://www.w3.org/1999/xhtml (of type string). Was null (of type object). +PASS doc.prefix is null +PASS doc.nodeValue is null +PASS doc.attributes is null +PASS doctype.nodeName is 'svg' +PASS doctype.name is 'svg' +PASS doctype.localName is null +PASS doctype.namespaceURI is null +PASS doctype.prefix is null +PASS doctype.nodeValue is null +PASS doctype.attributes is null +Element creation using createElement on an HTML doc: +PASS element.nodeName is 'PRE' +FAIL element.localName should be null (of type object). Was pre (of type string). +FAIL element.namespaceURI should be null (of type object). Was http://www.w3.org/1999/xhtml (of type string). +PASS element.prefix is null +PASS element.nodeValue is null +PASS element.attributes.toString() is '[object NamedNodeMap]' +Prefixed element creation using createElementNS on an HTML doc: +PASS element.nodeName is 'html:pre' +PASS element.localName is 'pre' +PASS element.namespaceURI is 'http://www.w3.org/1999/xhtml' +PASS element.prefix is 'html' +PASS element.nodeValue is null +PASS element.attributes.toString() is '[object NamedNodeMap]' +SVG Element creation using createElementNS on an HTML doc: +PASS element.nodeName is 'svg' +PASS element.localName is 'svg' +PASS element.namespaceURI is 'http://www.w3.org/2000/svg' +PASS element.prefix is null +PASS element.nodeValue is null +PASS element.attributes.toString() is '[object NamedNodeMap]' +Unknown Element creation using createElementNS on an HTML doc: +PASS element.nodeName is 'foo:svg' +PASS element.localName is 'svg' +PASS element.namespaceURI is 'http://www.webkit.org' +PASS element.prefix is 'foo' +PASS element.nodeValue is null +PASS element.attributes.toString() is '[object NamedNodeMap]' +Element creation using createElementNS on an HTML doc: +FAIL element.nodeName should be pre. Was PRE. +PASS element.localName is 'pre' +PASS element.namespaceURI is 'http://www.w3.org/1999/xhtml' +PASS element.prefix is null +PASS element.nodeValue is null +PASS element.attributes.toString() is '[object NamedNodeMap]' +Element creation using createElement on an XHTML doc: +PASS element.nodeName is 'pre' +FAIL element.localName should be null (of type object). Was pre (of type string). +FAIL element.namespaceURI should be null (of type object). Was http://www.w3.org/1999/xhtml (of type string). +PASS element.prefix is null +PASS element.nodeValue is null +PASS element.attributes.toString() is '[object NamedNodeMap]' +Element creation using createElementNS on an XHTML doc: +PASS element.nodeName is 'html:pre' +PASS element.localName is 'pre' +PASS element.namespaceURI is 'http://www.w3.org/1999/xhtml' +PASS element.prefix is 'html' +PASS element.nodeValue is null +PASS element.attributes.toString() is '[object NamedNodeMap]' +PASS document.createEntityReference('gt') threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9. +PASS entityReference.nodeName is 'gt' +PASS entityReference.localName is null +PASS entityReference.namespaceURI is null +PASS entityReference.prefix is null +PASS entityReference.nodeValue is null +PASS entityReference.attributes is null +PASS document.createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="missing.xsl"') threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9. +PASS processingInstruction.nodeName is 'xml-stylesheet' +PASS processingInstruction.localName is null +PASS processingInstruction.namespaceURI is null +PASS processingInstruction.prefix is null +PASS processingInstruction.nodeValue is 'type="text/xsl" href="missing.xsl"' +PASS processingInstruction.attributes is null +PASS processingInstruction.target is 'xml-stylesheet' +PASS processingInstruction.data is 'type="text/xsl" href="missing.xsl"' +PASS text.nodeName is '#text' +PASS text.localName is null +PASS text.namespaceURI is null +PASS text.prefix is null +PASS text.nodeValue is 'foo' +PASS text.data is 'foo' +PASS text.attributes is null +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/Node/initial-values.html b/LayoutTests/fast/dom/Node/initial-values.html new file mode 100644 index 0000000..19b634b --- /dev/null +++ b/LayoutTests/fast/dom/Node/initial-values.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/Node/isEqualNode-expected.txt b/LayoutTests/fast/dom/Node/isEqualNode-expected.txt new file mode 100644 index 0000000..1877d20 --- /dev/null +++ b/LayoutTests/fast/dom/Node/isEqualNode-expected.txt @@ -0,0 +1,13 @@ +Test the isEqualNode API. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +Test isEqualNode for DocumentType nodes. +PASS docTypeAllSet.isEqualNode(docTypeAllSet2) is true +PASS docTypeAllSet.isEqualNode(docTypeDifferentPublicID) is false +PASS docTypeAllSet.isEqualNode(docTypeDifferentSystemID) is false +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/Node/isEqualNode.html b/LayoutTests/fast/dom/Node/isEqualNode.html new file mode 100644 index 0000000..0222e70 --- /dev/null +++ b/LayoutTests/fast/dom/Node/isEqualNode.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/Node/mutation-blur-expected.txt b/LayoutTests/fast/dom/Node/mutation-blur-expected.txt new file mode 100644 index 0000000..d33e8bf --- /dev/null +++ b/LayoutTests/fast/dom/Node/mutation-blur-expected.txt @@ -0,0 +1,4 @@ +Tests for proper handling of DOM changes during a blur event. If the test doesn't crash, it passed. + + + diff --git a/LayoutTests/fast/dom/Node/mutation-blur.html b/LayoutTests/fast/dom/Node/mutation-blur.html new file mode 100644 index 0000000..173409e --- /dev/null +++ b/LayoutTests/fast/dom/Node/mutation-blur.html @@ -0,0 +1,73 @@ + + + + + +

Tests for proper handling of DOM changes during a blur event. If the test doesn't crash, it passed. +

+ +
+ + +
+
+ + + diff --git a/LayoutTests/fast/dom/Node/normalize-expected.txt b/LayoutTests/fast/dom/Node/normalize-expected.txt new file mode 100644 index 0000000..31f1ff9 --- /dev/null +++ b/LayoutTests/fast/dom/Node/normalize-expected.txt @@ -0,0 +1,12 @@ +Several tests of the DOM normalize() function. +test1 (two non-empty text nodes): PASSED +test2 (three non-empty text nodes): PASSED +test3 (non-empty text nodes mixed with elements): PASSED +test4 (single empty text node): PASSED +test5 (empty text node between elements): PASSED +test6 (empty text nodes before non-empty node): PASSED +test7 (empty text nodes after non-empty node): PASSED +test8 (empty text nodes between non-empty nodes): PASSED +test9 (empty and non-empty text nodes mixed with elements): PASSED +test10 (mixed cases including deeper nested text nodes): PASSED + diff --git a/LayoutTests/fast/dom/Node/normalize-with-cdata-expected.txt b/LayoutTests/fast/dom/Node/normalize-with-cdata-expected.txt new file mode 100644 index 0000000..f8291ef --- /dev/null +++ b/LayoutTests/fast/dom/Node/normalize-with-cdata-expected.txt @@ -0,0 +1,15 @@ +Test of normalize on an XML document with CDATA. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +Before normalize +PASS serializer.serializeToString(xmlChunk) is "This is some text before the CDATAmarkup inside of a CDATA]]>This is some text after the CDATA" +PASS xmlChunk.documentElement.childNodes.length is 3 +After normalize +PASS serializer.serializeToString(xmlChunk) is "This is some text before the CDATAmarkup inside of a CDATA]]>This is some text after the CDATA" +PASS xmlChunk.documentElement.childNodes.length is 3 +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/Node/normalize-with-cdata.html b/LayoutTests/fast/dom/Node/normalize-with-cdata.html new file mode 100644 index 0000000..a74ec70 --- /dev/null +++ b/LayoutTests/fast/dom/Node/normalize-with-cdata.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/Node/normalize.html b/LayoutTests/fast/dom/Node/normalize.html new file mode 100644 index 0000000..a8b61cb --- /dev/null +++ b/LayoutTests/fast/dom/Node/normalize.html @@ -0,0 +1,213 @@ + + + + +Test of DOM Node.normalize() + + + + + + + +
Several tests of the DOM normalize() function.
+ + + +
+ + + + diff --git a/LayoutTests/fast/dom/Node/script-tests/DOMNodeRemovedEvent.js b/LayoutTests/fast/dom/Node/script-tests/DOMNodeRemovedEvent.js new file mode 100644 index 0000000..a149c1d --- /dev/null +++ b/LayoutTests/fast/dom/Node/script-tests/DOMNodeRemovedEvent.js @@ -0,0 +1,12 @@ +description("This test checks that DOMNodeRemovedEvent is emitted once (and only once)."); + +var div = document.createElement("div"); +document.body.appendChild(div); + +var count = 0; +document.body.addEventListener("DOMNodeRemoved", function () { count++; }, false); +document.body.removeChild(div); + +shouldBe("count", "1"); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/Node/script-tests/TEMPLATE.html b/LayoutTests/fast/dom/Node/script-tests/TEMPLATE.html new file mode 100644 index 0000000..1951c43 --- /dev/null +++ b/LayoutTests/fast/dom/Node/script-tests/TEMPLATE.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/Node/script-tests/initial-values.js b/LayoutTests/fast/dom/Node/script-tests/initial-values.js new file mode 100644 index 0000000..4dfc376 --- /dev/null +++ b/LayoutTests/fast/dom/Node/script-tests/initial-values.js @@ -0,0 +1,205 @@ +description("Test creation of each type of Node and check intial values") + +var xmlDoc = document.implementation.createDocument("http://www.w3.org/1999/xhtml", "html", null); + +debug("Attribute creation using createElement on an HTML doc:") +var attr = document.createAttribute("foo"); +shouldBe("attr.nodeName", "'foo'"); +shouldBe("attr.name", "'foo'"); +// Spec: http://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createAttribute +// Both FF and WebKit return "foo" for Attribute.localName, even though the spec says null +shouldBe("attr.localName", "null"); +shouldBe("attr.namespaceURI", "null"); +shouldBe("attr.prefix", "null"); +shouldBe("attr.nodeValue", "''"); +shouldBe("attr.value", "''"); +shouldBe("attr.attributes", "null"); + +debug("Attribute creation using createElementNS on an HTML doc:") +attr = document.createAttributeNS("http://www.example.com", "example:foo"); +shouldBe("attr.nodeName", "'example:foo'"); +shouldBe("attr.name", "'example:foo'"); +shouldBe("attr.localName", "'foo'"); +shouldBe("attr.namespaceURI", "'http://www.example.com'"); +shouldBe("attr.prefix", "'example'"); +shouldBe("attr.nodeValue", "''"); +shouldBe("attr.value", "''"); +shouldBe("attr.attributes", "null"); + +debug("Attribute creation using createElement on an XHTML doc:") +attr = xmlDoc.createAttribute("foo"); +shouldBe("attr.nodeName", "'foo'"); +shouldBe("attr.name", "'foo'"); +// Spec: http://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createAttribute +// Both FF and WebKit return "foo" for Attribute.localName, even though the spec says null +shouldBe("attr.localName", "null"); +shouldBe("attr.namespaceURI", "null"); +shouldBe("attr.prefix", "null"); +shouldBe("attr.nodeValue", "''"); +shouldBe("attr.value", "''"); +shouldBe("attr.attributes", "null"); + +debug("Attribute creation using createElementNS on an XHTML doc:") +attr = xmlDoc.createAttributeNS("http://www.example.com", "example:foo"); +shouldBe("attr.nodeName", "'example:foo'"); +shouldBe("attr.name", "'example:foo'"); +shouldBe("attr.localName", "'foo'"); +shouldBe("attr.namespaceURI", "'http://www.example.com'"); +shouldBe("attr.prefix", "'example'"); +shouldBe("attr.nodeValue", "''"); +shouldBe("attr.value", "''"); +shouldBe("attr.attributes", "null"); + +var comment = document.createComment("foo"); +shouldBe("comment.nodeName", "'#comment'"); +shouldBe("comment.localName", "null"); +shouldBe("comment.namespaceURI", "null"); +shouldBe("comment.prefix", "null"); +shouldBe("comment.nodeValue", "'foo'"); +shouldBe("comment.data", "'foo'"); +shouldBe("comment.attributes", "null"); + +shouldThrow("document.createCDATASection('foo')"); +var cdata = xmlDoc.createCDATASection("foo"); +shouldBe("cdata.nodeName", "'#cdata-section'"); +shouldBe("cdata.localName", "null"); +shouldBe("cdata.namespaceURI", "null"); +shouldBe("cdata.prefix", "null"); +shouldBe("cdata.nodeValue", "'foo'"); +shouldBe("cdata.data", "'foo'"); +shouldBe("cdata.attributes", "null"); + +var fragment = document.createDocumentFragment(); +shouldBe("fragment.nodeName", "'#document-fragment'"); +shouldBe("fragment.localName", "null"); +shouldBe("fragment.namespaceURI", "null"); +shouldBe("fragment.prefix", "null"); +shouldBe("fragment.nodeValue", "null"); +shouldBe("fragment.attributes", "null"); + +var doc = document.implementation.createDocument("http://www.w3.org/1999/xhtml", "html", null); +shouldBe("doc.nodeName", "'#document'"); +shouldBe("doc.localName", "null"); +// Spec: http://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocument +// Currently both FF and WebKit return null here, disagreeing with the spec +shouldBe("doc.namespaceURI", "'http://www.w3.org/1999/xhtml'"); +shouldBe("doc.prefix", "null"); +shouldBe("doc.nodeValue", "null"); +shouldBe("doc.attributes", "null"); + +var doctype = document.implementation.createDocumentType("svg", "-//W3C//DTD SVG 1.1//EN", "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"); +shouldBe("doctype.nodeName", "'svg'"); +shouldBe("doctype.name", "'svg'"); +shouldBe("doctype.localName", "null"); +shouldBe("doctype.namespaceURI", "null"); +shouldBe("doctype.prefix", "null"); +shouldBe("doctype.nodeValue", "null"); +shouldBe("doctype.attributes", "null"); + +debug("Element creation using createElement on an HTML doc:") +var element = document.createElement("pre"); +shouldBe("element.nodeName", "'PRE'"); +// Spec: http://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createElement +// FF returns "PRE" for localName, WebKit returns "pre", the spec says we should return null +shouldBe("element.localName", "null"); +// FF returns null for namespaceURI, WebKit returns http://www.w3.org/1999/xhtml, the spec says we should return null +shouldBe("element.namespaceURI", "null"); +shouldBe("element.prefix", "null"); +shouldBe("element.nodeValue", "null"); +shouldBe("element.attributes.toString()", "'[object NamedNodeMap]'"); + +debug("Prefixed element creation using createElementNS on an HTML doc:") +element = document.createElementNS("http://www.w3.org/1999/xhtml", "html:pre"); +shouldBe("element.nodeName", "'html:pre'"); +shouldBe("element.localName", "'pre'"); +shouldBe("element.namespaceURI", "'http://www.w3.org/1999/xhtml'"); +shouldBe("element.prefix", "'html'"); +shouldBe("element.nodeValue", "null"); +shouldBe("element.attributes.toString()", "'[object NamedNodeMap]'"); + +debug("SVG Element creation using createElementNS on an HTML doc:") +element = document.createElementNS("http://www.w3.org/2000/svg", "svg"); +shouldBe("element.nodeName", "'svg'"); +shouldBe("element.localName", "'svg'"); +shouldBe("element.namespaceURI", "'http://www.w3.org/2000/svg'"); +shouldBe("element.prefix", "null"); +shouldBe("element.nodeValue", "null"); +shouldBe("element.attributes.toString()", "'[object NamedNodeMap]'"); + +debug("Unknown Element creation using createElementNS on an HTML doc:") +element = document.createElementNS("http://www.webkit.org", "foo:svg"); +shouldBe("element.nodeName", "'foo:svg'"); +shouldBe("element.localName", "'svg'"); +shouldBe("element.namespaceURI", "'http://www.webkit.org'"); +shouldBe("element.prefix", "'foo'"); +shouldBe("element.nodeValue", "null"); +shouldBe("element.attributes.toString()", "'[object NamedNodeMap]'"); + +debug("Element creation using createElementNS on an HTML doc:") +element = document.createElementNS("http://www.w3.org/1999/xhtml", "pre"); +// Spec: http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-104682815 (element.tagName) +// FF and Opera returns "pre" for nodeName as it is an XHTML element, WebKit returns "PRE". +shouldBe("element.nodeName", "'pre'"); +shouldBe("element.localName", "'pre'"); +shouldBe("element.namespaceURI", "'http://www.w3.org/1999/xhtml'"); +shouldBe("element.prefix", "null"); +shouldBe("element.nodeValue", "null"); +shouldBe("element.attributes.toString()", "'[object NamedNodeMap]'"); + +debug("Element creation using createElement on an XHTML doc:") +element = xmlDoc.createElement("pre"); +shouldBe("element.nodeName", "'pre'"); +shouldBe("element.localName", "null"); +// FF returns null for namespaceURI, WebKit returns http://www.w3.org/1999/xhtml, the spec says we should return null +shouldBe("element.namespaceURI", "null"); +shouldBe("element.prefix", "null"); +shouldBe("element.nodeValue", "null"); +shouldBe("element.attributes.toString()", "'[object NamedNodeMap]'"); + +debug("Element creation using createElementNS on an XHTML doc:") +element = xmlDoc.createElementNS("http://www.w3.org/1999/xhtml", "html:pre"); +shouldBe("element.nodeName", "'html:pre'"); +shouldBe("element.localName", "'pre'"); +shouldBe("element.namespaceURI", "'http://www.w3.org/1999/xhtml'"); +shouldBe("element.prefix", "'html'"); +shouldBe("element.nodeValue", "null"); +shouldBe("element.attributes.toString()", "'[object NamedNodeMap]'"); + +// Not possible to create Entity nodes via the DOM, WebKit doesn't create them from parsing + +shouldThrow("document.createEntityReference('gt')"); +var entityReference = xmlDoc.createEntityReference("gt"); +shouldBe("entityReference.nodeName", "'gt'"); +shouldBe("entityReference.localName", "null"); +shouldBe("entityReference.namespaceURI", "null"); +shouldBe("entityReference.prefix", "null"); +shouldBe("entityReference.nodeValue", "null"); +shouldBe("entityReference.attributes", "null"); + +// Not possible to create Notation nodes via the DOM, WebKit doesn't create them from parsing + +shouldThrow("document.createProcessingInstruction('xml-stylesheet', 'type=\"text/xsl\" href=\"missing.xsl\"')"); +var processingInstruction = xmlDoc.createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="missing.xsl"'); +shouldBe("processingInstruction.nodeName", "'xml-stylesheet'"); +shouldBe("processingInstruction.localName", "null"); +shouldBe("processingInstruction.namespaceURI", "null"); +shouldBe("processingInstruction.prefix", "null"); +// DOM Core Level 2 and DOM Core Level 3 disagree on ProcessingInstruction.nodeValue +// L2: entire content excluding the target +// L3: same as ProcessingInstruction.data +// We're following Level 3 +shouldBe("processingInstruction.nodeValue", "'type=\"text/xsl\" href=\"missing.xsl\"'"); +shouldBe("processingInstruction.attributes", "null"); +shouldBe("processingInstruction.target", "'xml-stylesheet'"); +shouldBe("processingInstruction.data", "'type=\"text/xsl\" href=\"missing.xsl\"'"); + +var text = document.createTextNode("foo"); +shouldBe("text.nodeName", "'#text'"); +shouldBe("text.localName", "null"); +shouldBe("text.namespaceURI", "null"); +shouldBe("text.prefix", "null"); +shouldBe("text.nodeValue", "'foo'"); +shouldBe("text.data", "'foo'"); +shouldBe("text.attributes", "null"); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/Node/script-tests/isEqualNode.js b/LayoutTests/fast/dom/Node/script-tests/isEqualNode.js new file mode 100644 index 0000000..c56199b --- /dev/null +++ b/LayoutTests/fast/dom/Node/script-tests/isEqualNode.js @@ -0,0 +1,13 @@ +description("Test the isEqualNode API."); + +debug("Test isEqualNode for DocumentType nodes."); +var docTypeAllSet = document.implementation.createDocumentType('html', '-//W3C//DTD XHTML 1.0 Strict//EN', 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'); +var docTypeAllSet2 = document.implementation.createDocumentType('html', '-//W3C//DTD XHTML 1.0 Strict//EN', 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'); +var docTypeDifferentPublicID = document.implementation.createDocumentType('html', 'foo', 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'); +var docTypeDifferentSystemID = document.implementation.createDocumentType('html', '-//W3C//DTD XHTML 1.0 Strict//EN', 'bar'); + +shouldBeTrue("docTypeAllSet.isEqualNode(docTypeAllSet2)"); +shouldBeFalse("docTypeAllSet.isEqualNode(docTypeDifferentPublicID)"); +shouldBeFalse("docTypeAllSet.isEqualNode(docTypeDifferentSystemID)"); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/Node/script-tests/normalize-with-cdata.js b/LayoutTests/fast/dom/Node/script-tests/normalize-with-cdata.js new file mode 100644 index 0000000..d1e3efe --- /dev/null +++ b/LayoutTests/fast/dom/Node/script-tests/normalize-with-cdata.js @@ -0,0 +1,22 @@ +description('Test of normalize on an XML document with CDATA.'); + +var parser = new DOMParser(); +var serializer = new XMLSerializer(); + +var xmlChunk = parser.parseFromString( + '' + + 'This is some text before the CDATA' + + 'markup inside of a CDATA]]>' + + 'This is some text after the CDATA' + + '', + 'application/xml'); + +debug('Before normalize'); +shouldBe('serializer.serializeToString(xmlChunk)', '"This is some text before the CDATAmarkup inside of a CDATA]]>This is some text after the CDATA"'); +shouldBe('xmlChunk.documentElement.childNodes.length', '3'); +xmlChunk.documentElement.normalize(); +debug('After normalize'); +shouldBe('serializer.serializeToString(xmlChunk)', '"This is some text before the CDATAmarkup inside of a CDATA]]>This is some text after the CDATA"'); +shouldBe('xmlChunk.documentElement.childNodes.length', '3'); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/NodeList/5725058-crash-scenario-1-expected.txt b/LayoutTests/fast/dom/NodeList/5725058-crash-scenario-1-expected.txt new file mode 100644 index 0000000..c5b8ca4 --- /dev/null +++ b/LayoutTests/fast/dom/NodeList/5725058-crash-scenario-1-expected.txt @@ -0,0 +1,3 @@ +Test for (rdar://problem/5725058). If you see this text, then all is well and no crash has occurred. + + diff --git a/LayoutTests/fast/dom/NodeList/5725058-crash-scenario-1.html b/LayoutTests/fast/dom/NodeList/5725058-crash-scenario-1.html new file mode 100644 index 0000000..19d08d7 --- /dev/null +++ b/LayoutTests/fast/dom/NodeList/5725058-crash-scenario-1.html @@ -0,0 +1,25 @@ +

Test for (rdar://problem/5725058). If you see this text, then all is well and no crash has occurred.

+ + +
+
+ diff --git a/LayoutTests/fast/dom/NodeList/5725058-crash-scenario-2-expected.txt b/LayoutTests/fast/dom/NodeList/5725058-crash-scenario-2-expected.txt new file mode 100644 index 0000000..38de29a --- /dev/null +++ b/LayoutTests/fast/dom/NodeList/5725058-crash-scenario-2-expected.txt @@ -0,0 +1,3 @@ +Test for (rdar://problem/5725058). If you see this text, then all is well and no crash has occurred. + +paragraph b diff --git a/LayoutTests/fast/dom/NodeList/5725058-crash-scenario-2.html b/LayoutTests/fast/dom/NodeList/5725058-crash-scenario-2.html new file mode 100644 index 0000000..147b2df --- /dev/null +++ b/LayoutTests/fast/dom/NodeList/5725058-crash-scenario-2.html @@ -0,0 +1,42 @@ +

Test for (rdar://problem/5725058). If you see this text, then all is well and no crash has occurred.

+ +

paragraph a

+

paragraph b

+ diff --git a/LayoutTests/fast/dom/NodeList/5725058-crash-scenario-3-expected.txt b/LayoutTests/fast/dom/NodeList/5725058-crash-scenario-3-expected.txt new file mode 100644 index 0000000..c5b8ca4 --- /dev/null +++ b/LayoutTests/fast/dom/NodeList/5725058-crash-scenario-3-expected.txt @@ -0,0 +1,3 @@ +Test for (rdar://problem/5725058). If you see this text, then all is well and no crash has occurred. + + diff --git a/LayoutTests/fast/dom/NodeList/5725058-crash-scenario-3.html b/LayoutTests/fast/dom/NodeList/5725058-crash-scenario-3.html new file mode 100644 index 0000000..e3b8d61 --- /dev/null +++ b/LayoutTests/fast/dom/NodeList/5725058-crash-scenario-3.html @@ -0,0 +1,18 @@ +

Test for (rdar://problem/5725058). If you see this text, then all is well and no crash has occurred.

+ +

paragraph a

+ diff --git a/LayoutTests/fast/dom/NodeList/adoptNode-node-list-cache-expected.txt b/LayoutTests/fast/dom/NodeList/adoptNode-node-list-cache-expected.txt new file mode 100644 index 0000000..5818178 --- /dev/null +++ b/LayoutTests/fast/dom/NodeList/adoptNode-node-list-cache-expected.txt @@ -0,0 +1,2 @@ + +TEST PASSED - Unless an assertion or crash happens soon. diff --git a/LayoutTests/fast/dom/NodeList/adoptNode-node-list-cache.html b/LayoutTests/fast/dom/NodeList/adoptNode-node-list-cache.html new file mode 100644 index 0000000..376adb4 --- /dev/null +++ b/LayoutTests/fast/dom/NodeList/adoptNode-node-list-cache.html @@ -0,0 +1,56 @@ + + + + + +
TEST DID NOT RUN YET
+ diff --git a/LayoutTests/fast/dom/NodeList/childNodes-reset-cache-expected.txt b/LayoutTests/fast/dom/NodeList/childNodes-reset-cache-expected.txt new file mode 100644 index 0000000..df04fba --- /dev/null +++ b/LayoutTests/fast/dom/NodeList/childNodes-reset-cache-expected.txt @@ -0,0 +1,3 @@ +Test for bug 13514: REGRESSION (r20997-21003): Crash in WebCore::Node::Document. + +SUCCESS diff --git a/LayoutTests/fast/dom/NodeList/childNodes-reset-cache.html b/LayoutTests/fast/dom/NodeList/childNodes-reset-cache.html new file mode 100644 index 0000000..de47e39 --- /dev/null +++ b/LayoutTests/fast/dom/NodeList/childNodes-reset-cache.html @@ -0,0 +1,36 @@ + + +

Test for bug 13514: +REGRESSION (r20997-21003): Crash in WebCore::Node::Document.

+

+ + + + diff --git a/LayoutTests/fast/dom/NodeList/invalidate-node-lists-when-parsing-expected.txt b/LayoutTests/fast/dom/NodeList/invalidate-node-lists-when-parsing-expected.txt new file mode 100644 index 0000000..f1c8c04 --- /dev/null +++ b/LayoutTests/fast/dom/NodeList/invalidate-node-lists-when-parsing-expected.txt @@ -0,0 +1,10 @@ +This test checks to see if the DOM ContainerNode's NodeList cache is correctly invalidated when new content is parsed. + +If the test passes, you should see "before: not found", "after: found" and "onload: found". + +If the cache is not invalidated when the testElement is parsed, both before and after will be "not found", which is a failure. + +before: not found +after: found +onload: found + diff --git a/LayoutTests/fast/dom/NodeList/invalidate-node-lists-when-parsing.html b/LayoutTests/fast/dom/NodeList/invalidate-node-lists-when-parsing.html new file mode 100644 index 0000000..c4397dd --- /dev/null +++ b/LayoutTests/fast/dom/NodeList/invalidate-node-lists-when-parsing.html @@ -0,0 +1,77 @@ + + + + + 5360748 + + + + + +

This test checks to see if the DOM ContainerNode's NodeList cache is correctly invalidated when new content is parsed.

+

If the test passes, you should see "before: not found", "after: found" and "onload: found".

+

If the cache is not invalidated when the testElement is parsed, both before and after will be "not found", which is a failure.

+
+

    + + + +

    + + + +

    + + diff --git a/LayoutTests/fast/dom/NodeList/item-by-id-with-no-document-expected.txt b/LayoutTests/fast/dom/NodeList/item-by-id-with-no-document-expected.txt new file mode 100644 index 0000000..195a88f --- /dev/null +++ b/LayoutTests/fast/dom/NodeList/item-by-id-with-no-document-expected.txt @@ -0,0 +1 @@ +SUCCESS (you didn't crash) diff --git a/LayoutTests/fast/dom/NodeList/item-by-id-with-no-document.html b/LayoutTests/fast/dom/NodeList/item-by-id-with-no-document.html new file mode 100644 index 0000000..3b272af --- /dev/null +++ b/LayoutTests/fast/dom/NodeList/item-by-id-with-no-document.html @@ -0,0 +1,13 @@ +Test case for Radar 4411663 + +

    SUCCESS (you didn't crash)

    \ No newline at end of file diff --git a/LayoutTests/fast/dom/NodeList/nodelist-item-assignment-expected.txt b/LayoutTests/fast/dom/NodeList/nodelist-item-assignment-expected.txt new file mode 100644 index 0000000..814b456 --- /dev/null +++ b/LayoutTests/fast/dom/NodeList/nodelist-item-assignment-expected.txt @@ -0,0 +1,23 @@ +This tests that indexed assignments to items of a NodeList do not override original values. See http://code.google.com/p/chromium/issues/detail?id=27967 + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS first == null is false +PASS nodeList[0] is first +PASS nodeList[0] is first +PASS nodeList[0] is first +PASS nodeList[0] is first +PASS nodeList[0] is first +PASS nodeList[0] is first +PASS nodeList[0] is first +PASS nodeList[0] is first +PASS nodeList[0] is first +PASS nodeList[0] is first +PASS nodeList[0] is first +PASS nodeList[0] is first +PASS nodeList[0] is first +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/NodeList/nodelist-item-assignment.html b/LayoutTests/fast/dom/NodeList/nodelist-item-assignment.html new file mode 100644 index 0000000..5a5b971 --- /dev/null +++ b/LayoutTests/fast/dom/NodeList/nodelist-item-assignment.html @@ -0,0 +1,30 @@ + + + + + + +

    +
      + +
      + + + + + diff --git a/LayoutTests/fast/dom/NodeList/nodelist-item-call-as-function-expected.txt b/LayoutTests/fast/dom/NodeList/nodelist-item-call-as-function-expected.txt new file mode 100644 index 0000000..96549e8 --- /dev/null +++ b/LayoutTests/fast/dom/NodeList/nodelist-item-call-as-function-expected.txt @@ -0,0 +1,12 @@ +This tests that items in a NodeList can be retrieved directly by calling as a function with an integral index parameter, starting from 0. +It means NodeList[0] and NodeList(0) both work. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS nodeList[0] is nodeList(0) +PASS !nodeList[nodeList.length] is !nodeList(nodeList.length) +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/NodeList/nodelist-item-call-as-function.html b/LayoutTests/fast/dom/NodeList/nodelist-item-call-as-function.html new file mode 100644 index 0000000..ae1cf36 --- /dev/null +++ b/LayoutTests/fast/dom/NodeList/nodelist-item-call-as-function.html @@ -0,0 +1,13 @@ + + + + + + + +

      +
      + + + + diff --git a/LayoutTests/fast/dom/NodeList/nodelist-item-with-index-expected.txt b/LayoutTests/fast/dom/NodeList/nodelist-item-with-index-expected.txt new file mode 100644 index 0000000..1c4040d --- /dev/null +++ b/LayoutTests/fast/dom/NodeList/nodelist-item-with-index-expected.txt @@ -0,0 +1,18 @@ +This tests that items in a NodeList can be retrieved by index. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +text1 +text2 + +PASS div0 == div0s is true +PASS div0 == div0s_ is false +PASS div0 == div1 is false +PASS div0s == div0s_ is false +PASS div0s == div1 is false +PASS div0s_ == div1 is false +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/NodeList/nodelist-item-with-index.html b/LayoutTests/fast/dom/NodeList/nodelist-item-with-index.html new file mode 100644 index 0000000..369e021 --- /dev/null +++ b/LayoutTests/fast/dom/NodeList/nodelist-item-with-index.html @@ -0,0 +1,38 @@ + + + + + + +

      +
      text1
      +
      text2

      + +
      + + + + + diff --git a/LayoutTests/fast/dom/NodeList/nodelist-item-with-name-expected.txt b/LayoutTests/fast/dom/NodeList/nodelist-item-with-name-expected.txt new file mode 100644 index 0000000..32ff0a7 --- /dev/null +++ b/LayoutTests/fast/dom/NodeList/nodelist-item-with-name-expected.txt @@ -0,0 +1,16 @@ +This tests that items in a NodeList can be retrieved directly by name. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +text1 +text2 + +PASS div1 instanceof HTMLDivElement is true +PASS div2 instanceof HTMLDivElement is true +PASS div1.innerHTML is 'text1' +PASS div2.innerHTML is 'text2' +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/NodeList/nodelist-item-with-name.html b/LayoutTests/fast/dom/NodeList/nodelist-item-with-name.html new file mode 100644 index 0000000..a96b51c --- /dev/null +++ b/LayoutTests/fast/dom/NodeList/nodelist-item-with-name.html @@ -0,0 +1,30 @@ + + + + + + +

      +
      text1
      +
      text2

      + +
      + + + + + diff --git a/LayoutTests/fast/dom/NodeList/resources/adoptNode-node-list-cache-subframe.html b/LayoutTests/fast/dom/NodeList/resources/adoptNode-node-list-cache-subframe.html new file mode 100644 index 0000000..46d3447 --- /dev/null +++ b/LayoutTests/fast/dom/NodeList/resources/adoptNode-node-list-cache-subframe.html @@ -0,0 +1,12 @@ + +

      Close the document to see if there's an assertion failure.

      \ No newline at end of file diff --git a/LayoutTests/fast/dom/NodeList/script-tests/TEMPLATE.html b/LayoutTests/fast/dom/NodeList/script-tests/TEMPLATE.html new file mode 100644 index 0000000..1951c43 --- /dev/null +++ b/LayoutTests/fast/dom/NodeList/script-tests/TEMPLATE.html @@ -0,0 +1,13 @@ + + + + + + + +

      +
      + + + + diff --git a/LayoutTests/fast/dom/NodeList/script-tests/nodelist-item-call-as-function.js b/LayoutTests/fast/dom/NodeList/script-tests/nodelist-item-call-as-function.js new file mode 100644 index 0000000..a12a2c9 --- /dev/null +++ b/LayoutTests/fast/dom/NodeList/script-tests/nodelist-item-call-as-function.js @@ -0,0 +1,8 @@ +description('This tests that items in a NodeList can be retrieved directly by calling as a function with an integral index parameter, starting from 0.
      It means NodeList[0] and NodeList(0) both work.'); + +var nodeList = document.getElementsByTagName('div'); +shouldBe("nodeList[0]", "nodeList(0)"); +shouldBe("!nodeList[nodeList.length]", "!nodeList(nodeList.length)"); + +var successfullyParsed = true; + diff --git a/LayoutTests/fast/dom/Selection/getRangeAt-expected.txt b/LayoutTests/fast/dom/Selection/getRangeAt-expected.txt new file mode 100644 index 0000000..909034f --- /dev/null +++ b/LayoutTests/fast/dom/Selection/getRangeAt-expected.txt @@ -0,0 +1,10 @@ +Test to make sure that getRangeAt does not modify the range when returning it. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS range is correctly (text, 0) +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/Selection/getRangeAt.html b/LayoutTests/fast/dom/Selection/getRangeAt.html new file mode 100644 index 0000000..a4037a9 --- /dev/null +++ b/LayoutTests/fast/dom/Selection/getRangeAt.html @@ -0,0 +1,13 @@ + + + + + + + +

      +
      + + + + diff --git a/LayoutTests/fast/dom/Selection/script-tests/TEMPLATE.html b/LayoutTests/fast/dom/Selection/script-tests/TEMPLATE.html new file mode 100644 index 0000000..1951c43 --- /dev/null +++ b/LayoutTests/fast/dom/Selection/script-tests/TEMPLATE.html @@ -0,0 +1,13 @@ + + + + + + + +

      +
      + + + + diff --git a/LayoutTests/fast/dom/Selection/script-tests/getRangeAt.js b/LayoutTests/fast/dom/Selection/script-tests/getRangeAt.js new file mode 100644 index 0000000..e024a03 --- /dev/null +++ b/LayoutTests/fast/dom/Selection/script-tests/getRangeAt.js @@ -0,0 +1,33 @@ +description("Test to make sure that getRangeAt does not modify the range when returning it.") + +var div = document.createElement('div'); +document.body.appendChild(div); +var textNode = document.createTextNode("asd"); +div.appendChild(textNode); + +var sel = window.getSelection(); +sel.collapse(textNode, 0); +var range = sel.getRangeAt(0); + +var result = range.comparePoint(textNode, 0); +if (result == 0) { + testPassed("range is correctly (text, 0)"); +} else { + testFailed("range did not match (text, 0)"); + debug("window.getSelection():"); + debug("anchorNode: " + sel.anchorNode); + debug("anchorOffset: " + sel.anchorOffset); + debug("focusNode: " + sel.focusNode); + debug("focusOffset: " + sel.focusOffset); + + debug("window.getSelection().getRangeAt(0):"); + debug("startContainer: " + range.startContainer); + debug("startOffset: " + range.startOffset); + debug("endContainer: " + range.endContainer); + debug("endOffset: " + range.endOffset); +} + +// Clean up after ourselves +document.body.removeChild(div); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/StyleSheet/css-medialist-item-expected.txt b/LayoutTests/fast/dom/StyleSheet/css-medialist-item-expected.txt new file mode 100644 index 0000000..1468f1b --- /dev/null +++ b/LayoutTests/fast/dom/StyleSheet/css-medialist-item-expected.txt @@ -0,0 +1,14 @@ +This tests indexing outside the range of the media list object. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS mediaList.length is 2 +PASS mediaList[0] is "screen" +PASS mediaList[1] is "print" +PASS mediaList[2] is null +PASS mediaList[-1] is undefined. +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/StyleSheet/css-medialist-item.html b/LayoutTests/fast/dom/StyleSheet/css-medialist-item.html new file mode 100644 index 0000000..4d0c598 --- /dev/null +++ b/LayoutTests/fast/dom/StyleSheet/css-medialist-item.html @@ -0,0 +1,13 @@ + + + + + + + +

      +
      + + + + diff --git a/LayoutTests/fast/dom/StyleSheet/get-stylesheet-byname-expected.txt b/LayoutTests/fast/dom/StyleSheet/get-stylesheet-byname-expected.txt new file mode 100644 index 0000000..31fb4c8 --- /dev/null +++ b/LayoutTests/fast/dom/StyleSheet/get-stylesheet-byname-expected.txt @@ -0,0 +1,10 @@ +This test verifies that a StyleSheet object will be returned instead of a HTMLStyleElement when calling document.styleSheets named property getter. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS document.styleSheets["test"] is styleElement.sheet +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/StyleSheet/get-stylesheet-byname.html b/LayoutTests/fast/dom/StyleSheet/get-stylesheet-byname.html new file mode 100644 index 0000000..ed23080 --- /dev/null +++ b/LayoutTests/fast/dom/StyleSheet/get-stylesheet-byname.html @@ -0,0 +1,13 @@ + + + + + + + +

      +
      + + + + diff --git a/LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-2-expected.txt b/LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-2-expected.txt new file mode 100644 index 0000000..5e51726 --- /dev/null +++ b/LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-2-expected.txt @@ -0,0 +1,3 @@ +This test verifies that style sheet do not outlive their elements. Since you can get back to the element with the ownerNode attribute, it's important to keep the element alive. + +Test passed. diff --git a/LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-2.html b/LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-2.html new file mode 100644 index 0000000..ca6fa16 --- /dev/null +++ b/LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-2.html @@ -0,0 +1,37 @@ + + + + + +

      +This test verifies that style sheet do not outlive their elements. +Since you can get back to the element with the ownerNode attribute, +it's important to keep the element alive. +

      +

      TEST HAS NOT RUN YET.

      + + diff --git a/LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-expected.txt b/LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-expected.txt new file mode 100644 index 0000000..d92e2d7 --- /dev/null +++ b/LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-expected.txt @@ -0,0 +1,3 @@ +This test verifies that style sheets do not outlive their elements. Since you can get back to the element with the ownerNode attribute, it's important to keep the element alive. + +Test passed. diff --git a/LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime.html b/LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime.html new file mode 100644 index 0000000..54b1ac4 --- /dev/null +++ b/LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime.html @@ -0,0 +1,33 @@ + + + + +

      +This test verifies that style sheets do not outlive their elements. +Since you can get back to the element with the ownerNode attribute, +it's important to keep the element alive. +

      +

      TEST HAS NOT RUN YET.

      + diff --git a/LayoutTests/fast/dom/StyleSheet/script-tests/TEMPLATE.html b/LayoutTests/fast/dom/StyleSheet/script-tests/TEMPLATE.html new file mode 100644 index 0000000..1951c43 --- /dev/null +++ b/LayoutTests/fast/dom/StyleSheet/script-tests/TEMPLATE.html @@ -0,0 +1,13 @@ + + + + + + + +

      +
      + + + + diff --git a/LayoutTests/fast/dom/StyleSheet/script-tests/css-medialist-item.js b/LayoutTests/fast/dom/StyleSheet/script-tests/css-medialist-item.js new file mode 100644 index 0000000..22974e7 --- /dev/null +++ b/LayoutTests/fast/dom/StyleSheet/script-tests/css-medialist-item.js @@ -0,0 +1,16 @@ +description("This tests indexing outside the range of the media list object."); + +var styleElement = document.createElement('style'); +styleElement.setAttribute('media', 'screen, print'); +document.documentElement.appendChild(styleElement) +var mediaList = document.styleSheets[document.styleSheets.length - 1].media; + +shouldEvaluateTo('mediaList.length', 2); +shouldBeEqualToString('mediaList[0]', 'screen'); +shouldBeEqualToString('mediaList[1]', 'print'); +shouldBeNull('mediaList[2]'); +shouldBeUndefined('mediaList[-1]') + +document.documentElement.removeChild(styleElement); + +successfullyParsed = true; diff --git a/LayoutTests/fast/dom/StyleSheet/script-tests/get-stylesheet-byname.js b/LayoutTests/fast/dom/StyleSheet/script-tests/get-stylesheet-byname.js new file mode 100644 index 0000000..793ed65 --- /dev/null +++ b/LayoutTests/fast/dom/StyleSheet/script-tests/get-stylesheet-byname.js @@ -0,0 +1,8 @@ +description("This test verifies that a StyleSheet object will be returned instead of a HTMLStyleElement when calling document.styleSheets named property getter."); + +var styleElement = document.createElement("style"); +styleElement.setAttribute("id", "test"); +document.head.appendChild(styleElement); +shouldBe('document.styleSheets["test"]', 'styleElement.sheet'); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/Text/replaceWholeText-expected.txt b/LayoutTests/fast/dom/Text/replaceWholeText-expected.txt new file mode 100644 index 0000000..8301ec6 --- /dev/null +++ b/LayoutTests/fast/dom/Text/replaceWholeText-expected.txt @@ -0,0 +1,13 @@ +Test wholeText and replaceWholeText + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS textB.wholeText is 'AB' +PASS para.textContent is 'ABC' +PASS textB.wholeText is 'XYZ' +PASS para.textContent is 'XYZC' +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/Text/replaceWholeText.html b/LayoutTests/fast/dom/Text/replaceWholeText.html new file mode 100644 index 0000000..7ac41cf --- /dev/null +++ b/LayoutTests/fast/dom/Text/replaceWholeText.html @@ -0,0 +1,13 @@ + + + + + + + +

      +
      + + + + diff --git a/LayoutTests/fast/dom/Text/script-tests/TEMPLATE.html b/LayoutTests/fast/dom/Text/script-tests/TEMPLATE.html new file mode 100644 index 0000000..1951c43 --- /dev/null +++ b/LayoutTests/fast/dom/Text/script-tests/TEMPLATE.html @@ -0,0 +1,13 @@ + + + + + + + +

      +
      + + + + diff --git a/LayoutTests/fast/dom/Text/script-tests/replaceWholeText.js b/LayoutTests/fast/dom/Text/script-tests/replaceWholeText.js new file mode 100644 index 0000000..33b6dc8 --- /dev/null +++ b/LayoutTests/fast/dom/Text/script-tests/replaceWholeText.js @@ -0,0 +1,16 @@ +description("Test wholeText and replaceWholeText") + +var para = document.createElement('p'); +para.appendChild(document.createTextNode('A')); +var textB = document.createTextNode('B'); +para.appendChild(textB); +para.appendChild(document.createElement('p')); +para.appendChild(document.createTextNode('C')); + +shouldBe("textB.wholeText", "'AB'"); +shouldBe("para.textContent", "'ABC'"); +textB.replaceWholeText("XYZ"); +shouldBe("textB.wholeText", "'XYZ'"); +shouldBe("para.textContent", "'XYZC'"); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/TreeWalker/TreeWalker-currentNode-expected.txt b/LayoutTests/fast/dom/TreeWalker/TreeWalker-currentNode-expected.txt new file mode 100644 index 0000000..d9ea239 --- /dev/null +++ b/LayoutTests/fast/dom/TreeWalker/TreeWalker-currentNode-expected.txt @@ -0,0 +1,36 @@ +Tests the TreeWalker. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +Test that TreeWalker.parent() doesn't set the currentNode to a node not under the root. + +PASS w.currentNode is subTree +PASS w.parentNode() is null +PASS w.currentNode is subTree + +Test that we handle setting the currentNode to arbitrary nodes not under the root element. + +PASS w.parentNode() is null +PASS w.currentNode is document.documentElement +PASS w.nextNode() is document.documentElement.firstChild +PASS w.currentNode is document.documentElement.firstChild +PASS w.previousNode() is null +PASS w.currentNode is document.documentElement +PASS w.firstChild() is document.documentElement.firstChild +PASS w.currentNode is document.documentElement.firstChild +PASS w.lastChild() is document.documentElement.lastChild +PASS w.currentNode is document.documentElement.lastChild +PASS w.nextSibling() is null +PASS w.currentNode is document.documentElement +PASS w.previousSibling() is null +PASS w.currentNode is document.documentElement + +Test how we handle the case when the traversed to node within the root, but the currentElement is not. + +PASS w.nextNode() is subTree +PASS w.lastChild() is subTree +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/TreeWalker/TreeWalker-currentNode.html b/LayoutTests/fast/dom/TreeWalker/TreeWalker-currentNode.html new file mode 100644 index 0000000..fa8cad3 --- /dev/null +++ b/LayoutTests/fast/dom/TreeWalker/TreeWalker-currentNode.html @@ -0,0 +1,13 @@ + + + + + + + +

      +
      + + + + diff --git a/LayoutTests/fast/dom/TreeWalker/acceptNode-filter-expected.txt b/LayoutTests/fast/dom/TreeWalker/acceptNode-filter-expected.txt new file mode 100644 index 0000000..ca5da84 --- /dev/null +++ b/LayoutTests/fast/dom/TreeWalker/acceptNode-filter-expected.txt @@ -0,0 +1,53 @@ +Test JS objects as NodeFilters. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +Testing with raw function filter + filtering node A1 +PASS walker.firstChild(); walker.currentNode.id is 'A1' + filtering node B1 + filtering node B2 +PASS walker.nextNode(); walker.currentNode.id is 'B2' + +Testing with object filter + filtering node A1 +PASS walker.firstChild(); walker.currentNode.id is 'A1' + filtering node B1 + filtering node B2 +PASS walker.nextNode(); walker.currentNode.id is 'B2' + +Testing with null filter +PASS walker.firstChild(); walker.currentNode.id is 'A1' +PASS walker.nextNode(); walker.currentNode.id is 'B1' + +Testing with undefined filter +PASS walker.firstChild(); walker.currentNode.id is 'A1' +PASS walker.nextNode(); walker.currentNode.id is 'B1' + +Testing with object lacking acceptNode property +PASS walker.firstChild(); threw exception TypeError: NodeFilter object does not have an acceptNode function. +PASS walker.currentNode.id; is 'root' +PASS walker.nextNode(); threw exception TypeError: NodeFilter object does not have an acceptNode function. +PASS walker.currentNode.id; is 'root' + +Testing with object with non-function acceptNode property +PASS walker.firstChild(); threw exception TypeError: NodeFilter object does not have an acceptNode function. +PASS walker.currentNode.id; is 'root' +PASS walker.nextNode(); threw exception TypeError: NodeFilter object does not have an acceptNode function. +PASS walker.currentNode.id; is 'root' + +Testing with function having acceptNode function +PASS walker.firstChild(); walker.currentNode.id is 'A1' +PASS walker.nextNode(); walker.currentNode.id is 'B1' + +Testing acceptNode callee +Callee: function (node) { + debug('Callee: ' + arguments.callee); + return NodeFilter.FILTER_ACCEPT; + } +PASS walker.firstChild(); walker.currentNode.id is 'A1' +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/TreeWalker/acceptNode-filter.html b/LayoutTests/fast/dom/TreeWalker/acceptNode-filter.html new file mode 100644 index 0000000..a6398f9 --- /dev/null +++ b/LayoutTests/fast/dom/TreeWalker/acceptNode-filter.html @@ -0,0 +1,13 @@ + + + + + + + +

      +
      + + + + diff --git a/LayoutTests/fast/dom/TreeWalker/filter-throw-expected.txt b/LayoutTests/fast/dom/TreeWalker/filter-throw-expected.txt new file mode 100644 index 0000000..c7213aa --- /dev/null +++ b/LayoutTests/fast/dom/TreeWalker/filter-throw-expected.txt @@ -0,0 +1,21 @@ +Test JS objects as NodeFilters. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +Testing with object filter +Test with filter function +PASS walker.firstChild(); threw exception filter exception. +PASS walker.currentNode.id is 'root' +PASS walker.nextNode();walker.currentNode.id threw exception filter exception. +PASS walker.currentNode.id is 'root' + +Test with filter object +PASS walker.firstChild(); threw exception filter exception. +PASS walker.currentNode.id is 'root' +PASS walker.nextNode();walker.currentNode.id threw exception filter exception. +PASS walker.currentNode.id is 'root' +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/TreeWalker/filter-throw.html b/LayoutTests/fast/dom/TreeWalker/filter-throw.html new file mode 100644 index 0000000..e1ad777 --- /dev/null +++ b/LayoutTests/fast/dom/TreeWalker/filter-throw.html @@ -0,0 +1,13 @@ + + + + + + + +

      +
      + + + + diff --git a/LayoutTests/fast/dom/TreeWalker/previousNodeLastChildReject-expected.txt b/LayoutTests/fast/dom/TreeWalker/previousNodeLastChildReject-expected.txt new file mode 100644 index 0000000..0ba7bb4 --- /dev/null +++ b/LayoutTests/fast/dom/TreeWalker/previousNodeLastChildReject-expected.txt @@ -0,0 +1,14 @@ +Test for a specific problem with previousNode that failed in older versions of WebKit. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS walker.firstChild(); walker.currentNode.id is 'A1' +PASS walker.nextNode(); walker.currentNode.id is 'B1' +PASS walker.nextNode(); walker.currentNode.id is 'C1' +PASS walker.nextNode(); walker.currentNode.id is 'B2' +PASS walker.previousNode(); walker.currentNode.id is 'C1' +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/TreeWalker/previousNodeLastChildReject.html b/LayoutTests/fast/dom/TreeWalker/previousNodeLastChildReject.html new file mode 100644 index 0000000..9445675 --- /dev/null +++ b/LayoutTests/fast/dom/TreeWalker/previousNodeLastChildReject.html @@ -0,0 +1,13 @@ + + + + + + + +

      +
      + + + + diff --git a/LayoutTests/fast/dom/TreeWalker/previousSiblingLastChildSkip-expected.txt b/LayoutTests/fast/dom/TreeWalker/previousSiblingLastChildSkip-expected.txt new file mode 100644 index 0000000..4cc3b5e --- /dev/null +++ b/LayoutTests/fast/dom/TreeWalker/previousSiblingLastChildSkip-expected.txt @@ -0,0 +1,16 @@ +Test for a specific problem with previousSibling that failed in older versions of WebKit. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS walker.firstChild(); walker.currentNode.id is 'A1' +PASS walker.nextNode(); walker.currentNode.id is 'C1' +PASS walker.nextNode(); walker.currentNode.id is 'C2' +PASS walker.nextNode(); walker.currentNode.id is 'D1' +PASS walker.nextNode(); walker.currentNode.id is 'D2' +PASS walker.nextNode(); walker.currentNode.id is 'B2' +PASS walker.previousSibling(); walker.currentNode.id is 'C2' +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/TreeWalker/previousSiblingLastChildSkip.html b/LayoutTests/fast/dom/TreeWalker/previousSiblingLastChildSkip.html new file mode 100644 index 0000000..5f44a37 --- /dev/null +++ b/LayoutTests/fast/dom/TreeWalker/previousSiblingLastChildSkip.html @@ -0,0 +1,13 @@ + + + + + + + +

      +
      + + + + diff --git a/LayoutTests/fast/dom/TreeWalker/resources/TreeWalker-currentNode.js b/LayoutTests/fast/dom/TreeWalker/resources/TreeWalker-currentNode.js new file mode 100644 index 0000000..4a6768b --- /dev/null +++ b/LayoutTests/fast/dom/TreeWalker/resources/TreeWalker-currentNode.js @@ -0,0 +1,55 @@ +description("Tests the TreeWalker.") + +var subTree = document.createElement('div'); +subTree.innerHTML = "

      Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

      " +document.body.appendChild(subTree); + +var all = function(node) { return true; } +var w = document.createTreeWalker(subTree, 0x01 | 0x08 | 0x10 | 0x20, all, true); + +debug("Test that TreeWalker.parent() doesn't set the currentNode to a node not under the root."); +debug(""); + +shouldBe("w.currentNode", "subTree"); +shouldBeNull("w.parentNode()"); +shouldBe("w.currentNode", "subTree"); + +debug(""); +debug("Test that we handle setting the currentNode to arbitrary nodes not under the root element."); +debug(""); + +w.currentNode = document.documentElement; +shouldBeNull("w.parentNode()"); +shouldBe("w.currentNode", "document.documentElement"); +w.currentNode = document.documentElement; +shouldBe("w.nextNode()", "document.documentElement.firstChild"); +shouldBe("w.currentNode", "document.documentElement.firstChild"); +w.currentNode = document.documentElement; +shouldBeNull("w.previousNode()"); +shouldBe("w.currentNode", "document.documentElement"); +w.currentNode = document.documentElement; +shouldBe("w.firstChild()", "document.documentElement.firstChild"); +shouldBe("w.currentNode", "document.documentElement.firstChild"); +w.currentNode = document.documentElement; +shouldBe("w.lastChild()", "document.documentElement.lastChild"); +shouldBe("w.currentNode", "document.documentElement.lastChild"); +w.currentNode = document.documentElement; +shouldBeNull("w.nextSibling()"); +shouldBe("w.currentNode", "document.documentElement"); +w.currentNode = document.documentElement; +shouldBeNull("w.previousSibling()"); +shouldBe("w.currentNode", "document.documentElement"); + +debug(""); +debug("Test how we handle the case when the traversed to node within the root, but the currentElement is not."); +debug(""); + +w.currentNode = subTree.previousSibling; +shouldBe("w.nextNode()", "subTree"); +w.currentNode = document.body; +shouldBe("w.lastChild()", "subTree"); + +// Cleanup +document.body.removeChild(subTree); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/TreeWalker/script-tests/TEMPLATE.html b/LayoutTests/fast/dom/TreeWalker/script-tests/TEMPLATE.html new file mode 100644 index 0000000..1951c43 --- /dev/null +++ b/LayoutTests/fast/dom/TreeWalker/script-tests/TEMPLATE.html @@ -0,0 +1,13 @@ + + + + + + + +

      +
      + + + + diff --git a/LayoutTests/fast/dom/TreeWalker/script-tests/acceptNode-filter.js b/LayoutTests/fast/dom/TreeWalker/script-tests/acceptNode-filter.js new file mode 100644 index 0000000..79c26cc --- /dev/null +++ b/LayoutTests/fast/dom/TreeWalker/script-tests/acceptNode-filter.js @@ -0,0 +1,81 @@ +description('Test JS objects as NodeFilters.'); + +var walker; +var testElement = document.createElement("div"); +testElement.id = 'root'; +testElement.innerHTML='
      '; + +function filter(node) +{ + debug(" filtering node " + node.id); + if (node.id == "B1") + return NodeFilter.FILTER_SKIP; + return NodeFilter.FILTER_ACCEPT; +} + +debug("Testing with raw function filter"); +walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, filter, false); +shouldBe("walker.firstChild(); walker.currentNode.id", "'A1'"); +shouldBe("walker.nextNode(); walker.currentNode.id", "'B2'"); + +debug("
      Testing with object filter"); +walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, { + acceptNode : function(node) { + debug(" filtering node " + node.id); + if (node.id == "B1") + return NodeFilter.FILTER_SKIP; + return NodeFilter.FILTER_ACCEPT; + } + }, false); + +shouldBe("walker.firstChild(); walker.currentNode.id", "'A1'"); +shouldBe("walker.nextNode(); walker.currentNode.id", "'B2'"); + +debug("
      Testing with null filter"); +walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, null, false); + +shouldBe("walker.firstChild(); walker.currentNode.id", "'A1'"); +shouldBe("walker.nextNode(); walker.currentNode.id", "'B1'"); + +debug("
      Testing with undefined filter"); +walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, undefined, false); + +shouldBe("walker.firstChild(); walker.currentNode.id", "'A1'"); +shouldBe("walker.nextNode(); walker.currentNode.id", "'B1'"); + +debug("
      Testing with object lacking acceptNode property"); +walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, {}, false); + +shouldThrow("walker.firstChild();"); +shouldBe("walker.currentNode.id;", "'root'"); +shouldThrow("walker.nextNode();"); +shouldBe("walker.currentNode.id;", "'root'"); + +debug("
      Testing with object with non-function acceptNode property"); +walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, { acceptNode: "foo" }, false); + +shouldThrow("walker.firstChild();"); +shouldBe("walker.currentNode.id;", "'root'"); +shouldThrow("walker.nextNode();"); +shouldBe("walker.currentNode.id;", "'root'"); + +debug("
      Testing with function having acceptNode function"); +var filter = function() { return NodeFilter.FILTER_ACCEPT; }; +filter.acceptNode = function(node) { return NodeFilter.FILTER_SKIP; }; +walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, filter, false); + +shouldBe("walker.firstChild(); walker.currentNode.id", "'A1'"); +shouldBe("walker.nextNode(); walker.currentNode.id", "'B1'"); + +debug("
      Testing acceptNode callee"); +var filter = { + acceptNode: function(node) { + debug('Callee: ' + arguments.callee); + return NodeFilter.FILTER_ACCEPT; + } +}; +walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, filter, false); + +shouldBe("walker.firstChild(); walker.currentNode.id", "'A1'"); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/TreeWalker/script-tests/filter-throw.js b/LayoutTests/fast/dom/TreeWalker/script-tests/filter-throw.js new file mode 100644 index 0000000..1127f77 --- /dev/null +++ b/LayoutTests/fast/dom/TreeWalker/script-tests/filter-throw.js @@ -0,0 +1,32 @@ +description('Test JS objects as NodeFilters.'); + +var walker; +var testElement = document.createElement("div"); +testElement.id = 'root'; +testElement.innerHTML='
      '; +debug("Testing with object filter"); +walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, function(node) { + throw('filter exception'); + return NodeFilter.FILTER_ACCEPT; +}, false); + +debug("Test with filter function"); +shouldThrow("walker.firstChild();"); +shouldBe("walker.currentNode.id", "'root'") +shouldThrow("walker.nextNode();walker.currentNode.id"); +shouldBe("walker.currentNode.id", "'root'") + +walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, { + acceptNode : function(node) { + throw('filter exception'); + return NodeFilter.FILTER_ACCEPT; + } + }, false); + +debug("
      Test with filter object"); +shouldThrow("walker.firstChild();"); +shouldBe("walker.currentNode.id", "'root'") +shouldThrow("walker.nextNode();walker.currentNode.id"); +shouldBe("walker.currentNode.id", "'root'") + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/TreeWalker/script-tests/previousNodeLastChildReject.js b/LayoutTests/fast/dom/TreeWalker/script-tests/previousNodeLastChildReject.js new file mode 100644 index 0000000..dcc7e58 --- /dev/null +++ b/LayoutTests/fast/dom/TreeWalker/script-tests/previousNodeLastChildReject.js @@ -0,0 +1,21 @@ +description('Test for a specific problem with previousNode that failed in older versions of WebKit.'); + +var testElement = document.createElement("div"); +testElement.innerHTML='
      '; + +function filter(node) +{ + if (node.id == "C2") + return NodeFilter.FILTER_REJECT; + return NodeFilter.FILTER_ACCEPT; +} + +var walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, filter, false); + +shouldBe("walker.firstChild(); walker.currentNode.id", "'A1'"); +shouldBe("walker.nextNode(); walker.currentNode.id", "'B1'"); +shouldBe("walker.nextNode(); walker.currentNode.id", "'C1'"); +shouldBe("walker.nextNode(); walker.currentNode.id", "'B2'"); +shouldBe("walker.previousNode(); walker.currentNode.id", "'C1'"); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/TreeWalker/script-tests/previousSiblingLastChildSkip.js b/LayoutTests/fast/dom/TreeWalker/script-tests/previousSiblingLastChildSkip.js new file mode 100644 index 0000000..ed7c577 --- /dev/null +++ b/LayoutTests/fast/dom/TreeWalker/script-tests/previousSiblingLastChildSkip.js @@ -0,0 +1,23 @@ +description('Test for a specific problem with previousSibling that failed in older versions of WebKit.'); + +var testElement = document.createElement("div"); +testElement.innerHTML='
      '; + +function filter(node) +{ + if (node.id == "B1") + return NodeFilter.FILTER_SKIP; + return NodeFilter.FILTER_ACCEPT; +} + +var walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, filter, false); + +shouldBe("walker.firstChild(); walker.currentNode.id", "'A1'"); +shouldBe("walker.nextNode(); walker.currentNode.id", "'C1'"); +shouldBe("walker.nextNode(); walker.currentNode.id", "'C2'"); +shouldBe("walker.nextNode(); walker.currentNode.id", "'D1'"); +shouldBe("walker.nextNode(); walker.currentNode.id", "'D2'"); +shouldBe("walker.nextNode(); walker.currentNode.id", "'B2'"); +shouldBe("walker.previousSibling(); walker.currentNode.id", "'C2'"); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/TreeWalker/script-tests/traversal-reject.js b/LayoutTests/fast/dom/TreeWalker/script-tests/traversal-reject.js new file mode 100644 index 0000000..33fdbef --- /dev/null +++ b/LayoutTests/fast/dom/TreeWalker/script-tests/traversal-reject.js @@ -0,0 +1,58 @@ +description('Test TreeWalker with rejection'); + +var walker; +var testElement = document.createElement("div"); +testElement.innerHTML='
      '; + +var rejectB1Filter = { + acceptNode: function(node) { + if (node.id == 'B1') + return NodeFilter.FILTER_REJECT; + + return NodeFilter.FILTER_ACCEPT; + } +} + +var rejectB2Filter = { + acceptNode: function(node) { + if (node.id == 'B2') + return NodeFilter.FILTER_SKIP; + + return NodeFilter.FILTER_ACCEPT; + } +} + +debug("
      Testing nextNode") +walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, rejectB1Filter, false); +shouldBe("walker.nextNode(); walker.currentNode.id", "'A1'"); +shouldBe("walker.nextNode(); walker.currentNode.id", "'B2'"); +shouldBe("walker.nextNode(); walker.currentNode.id", "'B3'"); + +debug("
      Testing firstChild") +walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, rejectB1Filter, false); +shouldBe("walker.firstChild(); walker.currentNode.id", "'A1'"); +shouldBe("walker.firstChild(); walker.currentNode.id", "'B2'"); + +debug("
      Testing nextSibling") +walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, rejectB2Filter, false); +shouldBe("walker.firstChild(); walker.currentNode.id", "'A1'"); +shouldBe("walker.firstChild(); walker.currentNode.id", "'B1'"); +shouldBe("walker.nextSibling(); walker.currentNode.id", "'B3'"); + +debug("
      Testing parentNode") +walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, rejectB1Filter, false); +walker.currentNode = testElement.querySelectorAll('#C1')[0]; +shouldBe("walker.parentNode(); walker.currentNode.id", "'A1'"); + +debug("
      Testing previousSibling") +walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, rejectB2Filter, false); +walker.currentNode = testElement.querySelectorAll('#B3')[0]; +shouldBe("walker.previousSibling(); walker.currentNode.id", "'B1'"); + +debug("
      Testing previousNode") +walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, rejectB1Filter, false); +walker.currentNode = testElement.querySelectorAll('#B3')[0]; +shouldBe("walker.previousNode(); walker.currentNode.id", "'B2'"); +shouldBe("walker.previousNode(); walker.currentNode.id", "'A1'"); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/TreeWalker/script-tests/traversal-skip-most.js b/LayoutTests/fast/dom/TreeWalker/script-tests/traversal-skip-most.js new file mode 100644 index 0000000..b3d21ab --- /dev/null +++ b/LayoutTests/fast/dom/TreeWalker/script-tests/traversal-skip-most.js @@ -0,0 +1,27 @@ +description('Test TreeWalker with skipping'); + +var walker; +var testElement = document.createElement("div"); +testElement.innerHTML='
      this text matters
      '; + +var filter = { + acceptNode: function(node) { + if (node.className == 'keep') + return NodeFilter.FILTER_ACCEPT; + + return NodeFilter.FILTER_SKIP; + } +} + +debug("
      Testing nextSibling") +walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, filter, false); +shouldBe("walker.firstChild(); walker.currentNode.id", "'B1'"); +shouldBe("walker.nextSibling(); walker.currentNode.id", "'B3'"); + +debug("
      Testing previousSibling") +walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, filter, false); +walker.currentNode = testElement.querySelectorAll('#B3')[0]; +shouldBe("walker.previousSibling(); walker.currentNode.id", "'B1'"); + + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/TreeWalker/script-tests/traversal-skip.js b/LayoutTests/fast/dom/TreeWalker/script-tests/traversal-skip.js new file mode 100644 index 0000000..d328f53 --- /dev/null +++ b/LayoutTests/fast/dom/TreeWalker/script-tests/traversal-skip.js @@ -0,0 +1,60 @@ +description('Test TreeWalker with skipping'); + +var walker; +var testElement = document.createElement("div"); +testElement.innerHTML='
      '; + +var skipB1Filter = { + acceptNode: function(node) { + if (node.id == 'B1') + return NodeFilter.FILTER_SKIP; + + return NodeFilter.FILTER_ACCEPT; + } +} + +var skipB2Filter = { + acceptNode: function(node) { + if (node.id == 'B2') + return NodeFilter.FILTER_SKIP; + + return NodeFilter.FILTER_ACCEPT; + } +} + +debug("
      Testing nextNode") +walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, skipB1Filter, false); +shouldBe("walker.nextNode(); walker.currentNode.id", "'A1'"); +shouldBe("walker.nextNode(); walker.currentNode.id", "'C1'"); +shouldBe("walker.nextNode(); walker.currentNode.id", "'B2'"); +shouldBe("walker.nextNode(); walker.currentNode.id", "'B3'"); + +debug("
      Testing firstChild") +walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, skipB1Filter, false); +shouldBe("walker.firstChild(); walker.currentNode.id", "'A1'"); +shouldBe("walker.firstChild(); walker.currentNode.id", "'C1'"); + +debug("
      Testing nextSibling") +walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, skipB2Filter, false); +shouldBe("walker.firstChild(); walker.currentNode.id", "'A1'"); +shouldBe("walker.firstChild(); walker.currentNode.id", "'B1'"); +shouldBe("walker.nextSibling(); walker.currentNode.id", "'B3'"); + +debug("
      Testing parentNode") +walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, skipB1Filter, false); +walker.currentNode = testElement.querySelectorAll('#C1')[0]; +shouldBe("walker.parentNode(); walker.currentNode.id", "'A1'"); + +debug("
      Testing previousSibling") +walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, skipB2Filter, false); +walker.currentNode = testElement.querySelectorAll('#B3')[0]; +shouldBe("walker.previousSibling(); walker.currentNode.id", "'B1'"); + +debug("
      Testing previousNode") +walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, skipB1Filter, false); +walker.currentNode = testElement.querySelectorAll('#B3')[0]; +shouldBe("walker.previousNode(); walker.currentNode.id", "'B2'"); +shouldBe("walker.previousNode(); walker.currentNode.id", "'C1'"); +shouldBe("walker.previousNode(); walker.currentNode.id", "'A1'"); + +var successfullyParsed = true; diff --git a/LayoutTests/fast/dom/TreeWalker/traversal-reject-expected.txt b/LayoutTests/fast/dom/TreeWalker/traversal-reject-expected.txt new file mode 100644 index 0000000..89a3127 --- /dev/null +++ b/LayoutTests/fast/dom/TreeWalker/traversal-reject-expected.txt @@ -0,0 +1,33 @@ +Test TreeWalker with rejection + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + + +Testing nextNode +PASS walker.nextNode(); walker.currentNode.id is 'A1' +PASS walker.nextNode(); walker.currentNode.id is 'B2' +PASS walker.nextNode(); walker.currentNode.id is 'B3' + +Testing firstChild +PASS walker.firstChild(); walker.currentNode.id is 'A1' +PASS walker.firstChild(); walker.currentNode.id is 'B2' + +Testing nextSibling +PASS walker.firstChild(); walker.currentNode.id is 'A1' +PASS walker.firstChild(); walker.currentNode.id is 'B1' +PASS walker.nextSibling(); walker.currentNode.id is 'B3' + +Testing parentNode +PASS walker.parentNode(); walker.currentNode.id is 'A1' + +Testing previousSibling +PASS walker.previousSibling(); walker.currentNode.id is 'B1' + +Testing previousNode +PASS walker.previousNode(); walker.currentNode.id is 'B2' +PASS walker.previousNode(); walker.currentNode.id is 'A1' +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/TreeWalker/traversal-reject.html b/LayoutTests/fast/dom/TreeWalker/traversal-reject.html new file mode 100644 index 0000000..ca34d86 --- /dev/null +++ b/LayoutTests/fast/dom/TreeWalker/traversal-reject.html @@ -0,0 +1,13 @@ + + + + + + + +

      +
      + + + + diff --git a/LayoutTests/fast/dom/TreeWalker/traversal-skip-expected.txt b/LayoutTests/fast/dom/TreeWalker/traversal-skip-expected.txt new file mode 100644 index 0000000..65bf98f --- /dev/null +++ b/LayoutTests/fast/dom/TreeWalker/traversal-skip-expected.txt @@ -0,0 +1,35 @@ +Test TreeWalker with skipping + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + + +Testing nextNode +PASS walker.nextNode(); walker.currentNode.id is 'A1' +PASS walker.nextNode(); walker.currentNode.id is 'C1' +PASS walker.nextNode(); walker.currentNode.id is 'B2' +PASS walker.nextNode(); walker.currentNode.id is 'B3' + +Testing firstChild +PASS walker.firstChild(); walker.currentNode.id is 'A1' +PASS walker.firstChild(); walker.currentNode.id is 'C1' + +Testing nextSibling +PASS walker.firstChild(); walker.currentNode.id is 'A1' +PASS walker.firstChild(); walker.currentNode.id is 'B1' +PASS walker.nextSibling(); walker.currentNode.id is 'B3' + +Testing parentNode +PASS walker.parentNode(); walker.currentNode.id is 'A1' + +Testing previousSibling +PASS walker.previousSibling(); walker.currentNode.id is 'B1' + +Testing previousNode +PASS walker.previousNode(); walker.currentNode.id is 'B2' +PASS walker.previousNode(); walker.currentNode.id is 'C1' +PASS walker.previousNode(); walker.currentNode.id is 'A1' +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/TreeWalker/traversal-skip-most-expected.txt b/LayoutTests/fast/dom/TreeWalker/traversal-skip-most-expected.txt new file mode 100644 index 0000000..2be59a2 --- /dev/null +++ b/LayoutTests/fast/dom/TreeWalker/traversal-skip-most-expected.txt @@ -0,0 +1,16 @@ +Test TreeWalker with skipping + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + + +Testing nextSibling +PASS walker.firstChild(); walker.currentNode.id is 'B1' +PASS walker.nextSibling(); walker.currentNode.id is 'B3' + +Testing previousSibling +PASS walker.previousSibling(); walker.currentNode.id is 'B1' +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/TreeWalker/traversal-skip-most.html b/LayoutTests/fast/dom/TreeWalker/traversal-skip-most.html new file mode 100644 index 0000000..141f979 --- /dev/null +++ b/LayoutTests/fast/dom/TreeWalker/traversal-skip-most.html @@ -0,0 +1,13 @@ + + + + + + + +

      +
      + + + + diff --git a/LayoutTests/fast/dom/TreeWalker/traversal-skip.html b/LayoutTests/fast/dom/TreeWalker/traversal-skip.html new file mode 100644 index 0000000..d788624 --- /dev/null +++ b/LayoutTests/fast/dom/TreeWalker/traversal-skip.html @@ -0,0 +1,13 @@ + + + + + + + +

      +
      + + + + diff --git a/LayoutTests/fast/dom/beforeload/flash-before-load-expected.txt b/LayoutTests/fast/dom/beforeload/flash-before-load-expected.txt new file mode 100644 index 0000000..7ef22e9 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/flash-before-load-expected.txt @@ -0,0 +1 @@ +PASS diff --git a/LayoutTests/fast/dom/beforeload/flash-before-load.html b/LayoutTests/fast/dom/beforeload/flash-before-load.html new file mode 100644 index 0000000..5d3ea88 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/flash-before-load.html @@ -0,0 +1,18 @@ + + + + + +
      + + + +PASS + + + + diff --git a/LayoutTests/fast/dom/beforeload/frame-before-load-expected.txt b/LayoutTests/fast/dom/beforeload/frame-before-load-expected.txt new file mode 100644 index 0000000..7ef22e9 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/frame-before-load-expected.txt @@ -0,0 +1 @@ +PASS diff --git a/LayoutTests/fast/dom/beforeload/frame-before-load.html b/LayoutTests/fast/dom/beforeload/frame-before-load.html new file mode 100644 index 0000000..6fd8c92 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/frame-before-load.html @@ -0,0 +1,17 @@ + + + + + +
      + + + + + + diff --git a/LayoutTests/fast/dom/beforeload/image-before-load-expected.txt b/LayoutTests/fast/dom/beforeload/image-before-load-expected.txt new file mode 100644 index 0000000..7ef22e9 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/image-before-load-expected.txt @@ -0,0 +1 @@ +PASS diff --git a/LayoutTests/fast/dom/beforeload/image-before-load-innerHTML-expected.txt b/LayoutTests/fast/dom/beforeload/image-before-load-innerHTML-expected.txt new file mode 100644 index 0000000..aa44e7c --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/image-before-load-innerHTML-expected.txt @@ -0,0 +1,2 @@ + +PASS diff --git a/LayoutTests/fast/dom/beforeload/image-before-load-innerHTML.html b/LayoutTests/fast/dom/beforeload/image-before-load-innerHTML.html new file mode 100644 index 0000000..2351569 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/image-before-load-innerHTML.html @@ -0,0 +1,25 @@ + + + + + + +
      +
      + + + diff --git a/LayoutTests/fast/dom/beforeload/image-before-load.html b/LayoutTests/fast/dom/beforeload/image-before-load.html new file mode 100644 index 0000000..4467018 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/image-before-load.html @@ -0,0 +1,16 @@ + + + + + +
      + + + + + + diff --git a/LayoutTests/fast/dom/beforeload/image-object-before-load-expected.txt b/LayoutTests/fast/dom/beforeload/image-object-before-load-expected.txt new file mode 100644 index 0000000..69cfc5a --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/image-object-before-load-expected.txt @@ -0,0 +1,2 @@ +PASS + diff --git a/LayoutTests/fast/dom/beforeload/image-object-before-load-innerHTML-expected.txt b/LayoutTests/fast/dom/beforeload/image-object-before-load-innerHTML-expected.txt new file mode 100644 index 0000000..69cfc5a --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/image-object-before-load-innerHTML-expected.txt @@ -0,0 +1,2 @@ +PASS + diff --git a/LayoutTests/fast/dom/beforeload/image-object-before-load-innerHTML.html b/LayoutTests/fast/dom/beforeload/image-object-before-load-innerHTML.html new file mode 100644 index 0000000..6befc57 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/image-object-before-load-innerHTML.html @@ -0,0 +1,32 @@ + + + + + + +
      +
      + + + diff --git a/LayoutTests/fast/dom/beforeload/image-object-before-load.html b/LayoutTests/fast/dom/beforeload/image-object-before-load.html new file mode 100644 index 0000000..46fae33 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/image-object-before-load.html @@ -0,0 +1,31 @@ + + + + + + + + PASS + +
      + + diff --git a/LayoutTests/fast/dom/beforeload/link-before-load-expected.txt b/LayoutTests/fast/dom/beforeload/link-before-load-expected.txt new file mode 100644 index 0000000..d9bd273 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/link-before-load-expected.txt @@ -0,0 +1,3 @@ +This page tests the beforeload event on link elements. You should see the word PASS below underneath a green square. + +PASS diff --git a/LayoutTests/fast/dom/beforeload/link-before-load.html b/LayoutTests/fast/dom/beforeload/link-before-load.html new file mode 100644 index 0000000..ae3c71c --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/link-before-load.html @@ -0,0 +1,30 @@ + + + + + + + + +

      This page tests the beforeload event on link elements. You should see the word PASS below underneath a green square.

      +
      +
      +
      +
      diff --git a/LayoutTests/fast/dom/beforeload/pi-before-load-expected.txt b/LayoutTests/fast/dom/beforeload/pi-before-load-expected.txt new file mode 100644 index 0000000..7ef22e9 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/pi-before-load-expected.txt @@ -0,0 +1 @@ +PASS diff --git a/LayoutTests/fast/dom/beforeload/pi-before-load.xhtml b/LayoutTests/fast/dom/beforeload/pi-before-load.xhtml new file mode 100644 index 0000000..58c19e1 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/pi-before-load.xhtml @@ -0,0 +1,41 @@ + + + + + + + + +
      + +
      +
      + + diff --git a/LayoutTests/fast/dom/beforeload/remove-bad-object-in-beforeload-listener-expected.txt b/LayoutTests/fast/dom/beforeload/remove-bad-object-in-beforeload-listener-expected.txt new file mode 100644 index 0000000..9a44ddc --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/remove-bad-object-in-beforeload-listener-expected.txt @@ -0,0 +1,3 @@ +This page tests that you can correctly remove an object element with an invalid data URL in its beforeload listener without causing a crash. + +PASS diff --git a/LayoutTests/fast/dom/beforeload/remove-bad-object-in-beforeload-listener.html b/LayoutTests/fast/dom/beforeload/remove-bad-object-in-beforeload-listener.html new file mode 100644 index 0000000..2bdedae --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/remove-bad-object-in-beforeload-listener.html @@ -0,0 +1,49 @@ + + + + + + +

      This page tests that you can correctly remove an object element with an invalid data URL in its beforeload listener without causing a crash.

      + FAIL + FAIL +
      + + + + diff --git a/LayoutTests/fast/dom/beforeload/remove-flash-in-beforeload-listener-expected.txt b/LayoutTests/fast/dom/beforeload/remove-flash-in-beforeload-listener-expected.txt new file mode 100644 index 0000000..dc83c9c --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/remove-flash-in-beforeload-listener-expected.txt @@ -0,0 +1,3 @@ +This page tests that you can correctly remove a flash object in a beforeload listener without causing a crash. + +PASS diff --git a/LayoutTests/fast/dom/beforeload/remove-flash-in-beforeload-listener.html b/LayoutTests/fast/dom/beforeload/remove-flash-in-beforeload-listener.html new file mode 100644 index 0000000..1c8c021 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/remove-flash-in-beforeload-listener.html @@ -0,0 +1,48 @@ + + + + + + +

      This page tests that you can correctly remove a flash object in a beforeload listener without causing a crash.

      + +
      + + + + diff --git a/LayoutTests/fast/dom/beforeload/remove-frame-in-beforeload-listener-expected.txt b/LayoutTests/fast/dom/beforeload/remove-frame-in-beforeload-listener-expected.txt new file mode 100644 index 0000000..aebdcc4 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/remove-frame-in-beforeload-listener-expected.txt @@ -0,0 +1,3 @@ +This page tests that you can correctly remove an iframe element in its beforeload listener without causing a crash. + +PASS diff --git a/LayoutTests/fast/dom/beforeload/remove-frame-in-beforeload-listener.html b/LayoutTests/fast/dom/beforeload/remove-frame-in-beforeload-listener.html new file mode 100644 index 0000000..fe45195 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/remove-frame-in-beforeload-listener.html @@ -0,0 +1,25 @@ + + + + + + +

      This page tests that you can correctly remove an iframe element in its beforeload listener without causing a crash.

      + +
      + + + diff --git a/LayoutTests/fast/dom/beforeload/remove-image-in-beforeload-listener-expected.txt b/LayoutTests/fast/dom/beforeload/remove-image-in-beforeload-listener-expected.txt new file mode 100644 index 0000000..abc0aa7 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/remove-image-in-beforeload-listener-expected.txt @@ -0,0 +1,3 @@ +This page tests that you can correctly remove an img object in a beforeload listener without causing a crash. + +PASS diff --git a/LayoutTests/fast/dom/beforeload/remove-image-in-beforeload-listener.html b/LayoutTests/fast/dom/beforeload/remove-image-in-beforeload-listener.html new file mode 100644 index 0000000..2ffda88 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/remove-image-in-beforeload-listener.html @@ -0,0 +1,47 @@ + + + + + + +

      This page tests that you can correctly remove an img object in a beforeload listener without causing a crash.

      + +
      + + + diff --git a/LayoutTests/fast/dom/beforeload/remove-link-in-beforeload-listener-expected.txt b/LayoutTests/fast/dom/beforeload/remove-link-in-beforeload-listener-expected.txt new file mode 100644 index 0000000..9a70826 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/remove-link-in-beforeload-listener-expected.txt @@ -0,0 +1,3 @@ +This page tests that you can correctly remove a stylesheet link element in its beforeload listener without causing a crash. + +PASS diff --git a/LayoutTests/fast/dom/beforeload/remove-link-in-beforeload-listener.html b/LayoutTests/fast/dom/beforeload/remove-link-in-beforeload-listener.html new file mode 100644 index 0000000..abbe9af --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/remove-link-in-beforeload-listener.html @@ -0,0 +1,25 @@ + + + + + + + +

      This page tests that you can correctly remove a stylesheet link element in its beforeload listener without causing a crash.

      +
      + + + + diff --git a/LayoutTests/fast/dom/beforeload/remove-script-in-beforeload-listener-expected.txt b/LayoutTests/fast/dom/beforeload/remove-script-in-beforeload-listener-expected.txt new file mode 100644 index 0000000..51192bc --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/remove-script-in-beforeload-listener-expected.txt @@ -0,0 +1,3 @@ +This page tests that you can correctly remove a script element in its beforeload listener without causing a crash. + +PASS diff --git a/LayoutTests/fast/dom/beforeload/remove-script-in-beforeload-listener.html b/LayoutTests/fast/dom/beforeload/remove-script-in-beforeload-listener.html new file mode 100644 index 0000000..874c600 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/remove-script-in-beforeload-listener.html @@ -0,0 +1,28 @@ + + + + + + +

      This page tests that you can correctly remove a script element in its beforeload listener without causing a crash.

      + +
      + + + diff --git a/LayoutTests/fast/dom/beforeload/remove-video-in-beforeload-listener-expected.txt b/LayoutTests/fast/dom/beforeload/remove-video-in-beforeload-listener-expected.txt new file mode 100644 index 0000000..48316fa --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/remove-video-in-beforeload-listener-expected.txt @@ -0,0 +1,3 @@ +This page tests that you can correctly remove a video object in a beforeload listener without causing a crash. + +PASS diff --git a/LayoutTests/fast/dom/beforeload/remove-video-in-beforeload-listener.html b/LayoutTests/fast/dom/beforeload/remove-video-in-beforeload-listener.html new file mode 100644 index 0000000..add0e13 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/remove-video-in-beforeload-listener.html @@ -0,0 +1,47 @@ + + + + + + +

      This page tests that you can correctly remove a video object in a beforeload listener without causing a crash.

      + +
      + + + diff --git a/LayoutTests/fast/dom/beforeload/resources/fail.css b/LayoutTests/fast/dom/beforeload/resources/fail.css new file mode 100644 index 0000000..1a5960a --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/resources/fail.css @@ -0,0 +1,5 @@ +.block { + background-color:red !important; + width: 200px !important; + height:200px !important; +} diff --git a/LayoutTests/fast/dom/beforeload/resources/fail.js b/LayoutTests/fast/dom/beforeload/resources/fail.js new file mode 100644 index 0000000..6ba1fba --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/resources/fail.js @@ -0,0 +1 @@ +print('FAIL', 'red'); diff --git a/LayoutTests/fast/dom/beforeload/resources/print.js b/LayoutTests/fast/dom/beforeload/resources/print.js new file mode 100644 index 0000000..8b5dfe2 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/resources/print.js @@ -0,0 +1,9 @@ +function print(message, color) +{ + var paragraph = document.createElement("div"); + paragraph.appendChild(document.createTextNode(message)); + paragraph.style.fontFamily = "monospace"; + if (color) + paragraph.style.color = color; + document.getElementById("console").appendChild(paragraph); +} diff --git a/LayoutTests/fast/dom/beforeload/script-before-load-dynamic-expected.txt b/LayoutTests/fast/dom/beforeload/script-before-load-dynamic-expected.txt new file mode 100644 index 0000000..9a796b1 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/script-before-load-dynamic-expected.txt @@ -0,0 +1,3 @@ +This page tests the beforeload event on script elements. You should see a PASS message below if everything works. + +PASS diff --git a/LayoutTests/fast/dom/beforeload/script-before-load-dynamic.html b/LayoutTests/fast/dom/beforeload/script-before-load-dynamic.html new file mode 100644 index 0000000..21559bd --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/script-before-load-dynamic.html @@ -0,0 +1,29 @@ + + + + + + +

      This page tests the beforeload event on script elements. You should see a PASS message below if everything +works.

      +
      +
      + + + + + diff --git a/LayoutTests/fast/dom/beforeload/script-before-load-expected.txt b/LayoutTests/fast/dom/beforeload/script-before-load-expected.txt new file mode 100644 index 0000000..9a796b1 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/script-before-load-expected.txt @@ -0,0 +1,3 @@ +This page tests the beforeload event on script elements. You should see a PASS message below if everything works. + +PASS diff --git a/LayoutTests/fast/dom/beforeload/script-before-load-xhtml-expected.txt b/LayoutTests/fast/dom/beforeload/script-before-load-xhtml-expected.txt new file mode 100644 index 0000000..9a796b1 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/script-before-load-xhtml-expected.txt @@ -0,0 +1,3 @@ +This page tests the beforeload event on script elements. You should see a PASS message below if everything works. + +PASS diff --git a/LayoutTests/fast/dom/beforeload/script-before-load-xhtml.xhtml b/LayoutTests/fast/dom/beforeload/script-before-load-xhtml.xhtml new file mode 100644 index 0000000..247c743 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/script-before-load-xhtml.xhtml @@ -0,0 +1,28 @@ + + + + + + + +

      This page tests the beforeload event on script elements. You should see a PASS message below if everything +works.

      +
      +
      + + + + + + diff --git a/LayoutTests/fast/dom/beforeload/script-before-load.html b/LayoutTests/fast/dom/beforeload/script-before-load.html new file mode 100644 index 0000000..e71200c --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/script-before-load.html @@ -0,0 +1,17 @@ + + + + + + +

      This page tests the beforeload event on script elements. You should see a PASS message below if everything +works.

      +
      +
      + + + + diff --git a/LayoutTests/fast/dom/beforeload/video-before-load-expected.txt b/LayoutTests/fast/dom/beforeload/video-before-load-expected.txt new file mode 100644 index 0000000..69cfc5a --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/video-before-load-expected.txt @@ -0,0 +1,2 @@ +PASS + diff --git a/LayoutTests/fast/dom/beforeload/video-before-load.html b/LayoutTests/fast/dom/beforeload/video-before-load.html new file mode 100644 index 0000000..7876761 --- /dev/null +++ b/LayoutTests/fast/dom/beforeload/video-before-load.html @@ -0,0 +1,17 @@ + + + + + +
      + + + + + + diff --git a/LayoutTests/fast/dom/getElementsByClassName/001-expected.txt b/LayoutTests/fast/dom/getElementsByClassName/001-expected.txt new file mode 100644 index 0000000..7ef22e9 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/001-expected.txt @@ -0,0 +1 @@ +PASS diff --git a/LayoutTests/fast/dom/getElementsByClassName/001.html b/LayoutTests/fast/dom/getElementsByClassName/001.html new file mode 100644 index 0000000..930aae5 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/001.html @@ -0,0 +1,11 @@ + + + + document.getElementsByClassName(): simple + + + +

      FAIL (script did not run)

      + + + diff --git a/LayoutTests/fast/dom/getElementsByClassName/002-expected.txt b/LayoutTests/fast/dom/getElementsByClassName/002-expected.txt new file mode 100644 index 0000000..7ef22e9 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/002-expected.txt @@ -0,0 +1 @@ +PASS diff --git a/LayoutTests/fast/dom/getElementsByClassName/002.html b/LayoutTests/fast/dom/getElementsByClassName/002.html new file mode 100644 index 0000000..d91b0ac --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/002.html @@ -0,0 +1,13 @@ + + + + document.getElementsByClassName(): also simple + + + +

      FAIL (script did not run)

      + + + diff --git a/LayoutTests/fast/dom/getElementsByClassName/003-expected.txt b/LayoutTests/fast/dom/getElementsByClassName/003-expected.txt new file mode 100644 index 0000000..7ef22e9 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/003-expected.txt @@ -0,0 +1 @@ +PASS diff --git a/LayoutTests/fast/dom/getElementsByClassName/003.html b/LayoutTests/fast/dom/getElementsByClassName/003.html new file mode 100644 index 0000000..661dbba --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/003.html @@ -0,0 +1,15 @@ + + + + document.getElementsByClassName(): changing classes + + + +

      FAIL (script did not run)

      + + + diff --git a/LayoutTests/fast/dom/getElementsByClassName/004-expected.txt b/LayoutTests/fast/dom/getElementsByClassName/004-expected.txt new file mode 100644 index 0000000..7ef22e9 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/004-expected.txt @@ -0,0 +1 @@ +PASS diff --git a/LayoutTests/fast/dom/getElementsByClassName/004.html b/LayoutTests/fast/dom/getElementsByClassName/004.html new file mode 100644 index 0000000..a932dd1 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/004.html @@ -0,0 +1,15 @@ + + + + document.getElementsByClassName(): changing classes + + + +

      FAIL (script did not run)

      + + + diff --git a/LayoutTests/fast/dom/getElementsByClassName/005-expected.txt b/LayoutTests/fast/dom/getElementsByClassName/005-expected.txt new file mode 100644 index 0000000..7ef22e9 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/005-expected.txt @@ -0,0 +1 @@ +PASS diff --git a/LayoutTests/fast/dom/getElementsByClassName/005.html b/LayoutTests/fast/dom/getElementsByClassName/005.html new file mode 100644 index 0000000..5a609db --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/005.html @@ -0,0 +1,15 @@ + + + + document.getElementsByClassName(): changing classes + + + +

      FAIL (script did not run)

      + + + diff --git a/LayoutTests/fast/dom/getElementsByClassName/006-expected.txt b/LayoutTests/fast/dom/getElementsByClassName/006-expected.txt new file mode 100644 index 0000000..9976b12 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/006-expected.txt @@ -0,0 +1,3 @@ +PASS + + diff --git a/LayoutTests/fast/dom/getElementsByClassName/006.html b/LayoutTests/fast/dom/getElementsByClassName/006.html new file mode 100644 index 0000000..89be60b --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/006.html @@ -0,0 +1,17 @@ + + + + document.getElementsByClassName(): adding element with class + + + +

      FAIL (script did not run)

      + + + diff --git a/LayoutTests/fast/dom/getElementsByClassName/007-expected.txt b/LayoutTests/fast/dom/getElementsByClassName/007-expected.txt new file mode 100644 index 0000000..7ef22e9 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/007-expected.txt @@ -0,0 +1 @@ +PASS diff --git a/LayoutTests/fast/dom/getElementsByClassName/007.html b/LayoutTests/fast/dom/getElementsByClassName/007.html new file mode 100644 index 0000000..bb013df --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/007.html @@ -0,0 +1,11 @@ + + + + document.getElementsByClassName(): multiple classes + + + +

      FAIL (script did not run)

      + + + diff --git a/LayoutTests/fast/dom/getElementsByClassName/008-expected.txt b/LayoutTests/fast/dom/getElementsByClassName/008-expected.txt new file mode 100644 index 0000000..7ef22e9 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/008-expected.txt @@ -0,0 +1 @@ +PASS diff --git a/LayoutTests/fast/dom/getElementsByClassName/008.html b/LayoutTests/fast/dom/getElementsByClassName/008.html new file mode 100644 index 0000000..b60129d --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/008.html @@ -0,0 +1,11 @@ + + + + document.getElementsByClassName(): multiple classes + + + +

      FAIL (script did not run)

      + + + diff --git a/LayoutTests/fast/dom/getElementsByClassName/009-expected.txt b/LayoutTests/fast/dom/getElementsByClassName/009-expected.txt new file mode 100644 index 0000000..7ef22e9 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/009-expected.txt @@ -0,0 +1 @@ +PASS diff --git a/LayoutTests/fast/dom/getElementsByClassName/009.html b/LayoutTests/fast/dom/getElementsByClassName/009.html new file mode 100644 index 0000000..ce52987 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/009.html @@ -0,0 +1,11 @@ + + + + document.getElementsByClassName(): case sensitive + + + +

      FAIL (script did not run)

      + + + diff --git a/LayoutTests/fast/dom/getElementsByClassName/010-expected.txt b/LayoutTests/fast/dom/getElementsByClassName/010-expected.txt new file mode 100644 index 0000000..9976b12 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/010-expected.txt @@ -0,0 +1,3 @@ +PASS + + diff --git a/LayoutTests/fast/dom/getElementsByClassName/010.xml b/LayoutTests/fast/dom/getElementsByClassName/010.xml new file mode 100644 index 0000000..44f8474 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/010.xml @@ -0,0 +1,12 @@ + + + document.getElementsByClassName(): compound + + + +

      FAIL (script did not run)

      + + + + + diff --git a/LayoutTests/fast/dom/getElementsByClassName/011-expected.txt b/LayoutTests/fast/dom/getElementsByClassName/011-expected.txt new file mode 100644 index 0000000..9976b12 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/011-expected.txt @@ -0,0 +1,3 @@ +PASS + + diff --git a/LayoutTests/fast/dom/getElementsByClassName/011.xml b/LayoutTests/fast/dom/getElementsByClassName/011.xml new file mode 100644 index 0000000..6790b5a --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/011.xml @@ -0,0 +1,19 @@ + + + document.getElementsByClassName(): "tricky" compound + + + +

      FAIL (script did not run)

      + + + + + + + + diff --git a/LayoutTests/fast/dom/getElementsByClassName/012-expected.txt b/LayoutTests/fast/dom/getElementsByClassName/012-expected.txt new file mode 100644 index 0000000..7ef22e9 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/012-expected.txt @@ -0,0 +1 @@ +PASS diff --git a/LayoutTests/fast/dom/getElementsByClassName/012.html b/LayoutTests/fast/dom/getElementsByClassName/012.html new file mode 100644 index 0000000..ed93344 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/012.html @@ -0,0 +1,11 @@ + + + + element.getElementsByClassName(): simple + + + +

      FAIL (script did not run)

      + + + diff --git a/LayoutTests/fast/dom/getElementsByClassName/013-expected.txt b/LayoutTests/fast/dom/getElementsByClassName/013-expected.txt new file mode 100644 index 0000000..9976b12 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/013-expected.txt @@ -0,0 +1,3 @@ +PASS + + diff --git a/LayoutTests/fast/dom/getElementsByClassName/013.html b/LayoutTests/fast/dom/getElementsByClassName/013.html new file mode 100644 index 0000000..7c8c232 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/013.html @@ -0,0 +1,17 @@ + + + + element.getElementsByClassName(): adding an element + + + +

      FAIL (script did not run)

      + + + diff --git a/LayoutTests/fast/dom/getElementsByClassName/014-expected.txt b/LayoutTests/fast/dom/getElementsByClassName/014-expected.txt new file mode 100644 index 0000000..7ef22e9 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/014-expected.txt @@ -0,0 +1 @@ +PASS diff --git a/LayoutTests/fast/dom/getElementsByClassName/014.html b/LayoutTests/fast/dom/getElementsByClassName/014.html new file mode 100644 index 0000000..29dff66 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/014.html @@ -0,0 +1,14 @@ + + + document.getElementsByClassName(): case sensitive (quirks mode) + + + +

      FAIL (script did not run)

      + + + diff --git a/LayoutTests/fast/dom/getElementsByClassName/015-expected.txt b/LayoutTests/fast/dom/getElementsByClassName/015-expected.txt new file mode 100644 index 0000000..7ef22e9 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/015-expected.txt @@ -0,0 +1 @@ +PASS diff --git a/LayoutTests/fast/dom/getElementsByClassName/015.html b/LayoutTests/fast/dom/getElementsByClassName/015.html new file mode 100644 index 0000000..567b990 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/015.html @@ -0,0 +1,14 @@ + + + document.getElementsByClassName(): live updating + + + +

      FAIL (script did not run)

      + + + diff --git a/LayoutTests/fast/dom/getElementsByClassName/array/001-expected.txt b/LayoutTests/fast/dom/getElementsByClassName/array/001-expected.txt new file mode 100644 index 0000000..7ef22e9 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/array/001-expected.txt @@ -0,0 +1 @@ +PASS diff --git a/LayoutTests/fast/dom/getElementsByClassName/array/001.html b/LayoutTests/fast/dom/getElementsByClassName/array/001.html new file mode 100644 index 0000000..d002002 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/array/001.html @@ -0,0 +1,13 @@ + + + + document.getElementsByClassName(array): "a\n" + + + +

      FAIL (script did not run)

      + + + diff --git a/LayoutTests/fast/dom/getElementsByClassName/array/002-expected.txt b/LayoutTests/fast/dom/getElementsByClassName/array/002-expected.txt new file mode 100644 index 0000000..7ef22e9 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/array/002-expected.txt @@ -0,0 +1 @@ +PASS diff --git a/LayoutTests/fast/dom/getElementsByClassName/array/002.html b/LayoutTests/fast/dom/getElementsByClassName/array/002.html new file mode 100644 index 0000000..2148e5e --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/array/002.html @@ -0,0 +1,12 @@ + + + + document.getElementsByClassName(array): "b","a" + + + +

      FAIL (script did not run)

      + + + diff --git a/LayoutTests/fast/dom/getElementsByClassName/array/003-expected.txt b/LayoutTests/fast/dom/getElementsByClassName/array/003-expected.txt new file mode 100644 index 0000000..7ef22e9 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/array/003-expected.txt @@ -0,0 +1 @@ +PASS diff --git a/LayoutTests/fast/dom/getElementsByClassName/array/003.html b/LayoutTests/fast/dom/getElementsByClassName/array/003.html new file mode 100644 index 0000000..e110dc9 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/array/003.html @@ -0,0 +1,11 @@ + + + + document.getElementsByClassName(array): "b a" + + + +

      FAIL (script did not run)

      + + + diff --git a/LayoutTests/fast/dom/getElementsByClassName/array/004-expected.txt b/LayoutTests/fast/dom/getElementsByClassName/array/004-expected.txt new file mode 100644 index 0000000..7ef22e9 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/array/004-expected.txt @@ -0,0 +1 @@ +PASS diff --git a/LayoutTests/fast/dom/getElementsByClassName/array/004.html b/LayoutTests/fast/dom/getElementsByClassName/array/004.html new file mode 100644 index 0000000..3740509 --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/array/004.html @@ -0,0 +1,11 @@ + + + + element.getElementsByClassName(array): "a", "b" + + + +

      FAIL (script did not run)

      + + + diff --git a/LayoutTests/fast/dom/getElementsByClassName/dumpNodeList-expected.txt b/LayoutTests/fast/dom/getElementsByClassName/dumpNodeList-expected.txt new file mode 100644 index 0000000..373ffbc --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/dumpNodeList-expected.txt @@ -0,0 +1,26 @@ +Line 1 +Line 2 +Line 3 + +line 4 +line 5 + +[object HTMLDivElement], [object HTMLDivElement], [object HTMLDivElement], length: 3 +[object HTMLDivElement], [object HTMLDivElement], [object HTMLDivElement], [object HTMLParagraphElement], length: 4 +[object HTMLDivElement], [object HTMLDivElement], length: 2 +[object HTMLDivElement], [object HTMLDivElement], length: 2 +length: 0 +length: 0 +length: 0 +length: 0 +length: 0 +[object HTMLDivElement], length: 1 +[object HTMLDivElement], [object HTMLParagraphElement], length: 2 +[object HTMLDivElement], length: 1 +[object HTMLDivElement], length: 1 +length: 0 +length: 0 +length: 0 +length: 0 +length: 0 + diff --git a/LayoutTests/fast/dom/getElementsByClassName/dumpNodeList.html b/LayoutTests/fast/dom/getElementsByClassName/dumpNodeList.html new file mode 100644 index 0000000..86bd42e --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/dumpNodeList.html @@ -0,0 +1,54 @@ + + +
      Line 1
      Line 2

      Line 3

      +
      line 4

      line 5

      +

        + + + diff --git a/LayoutTests/fast/dom/getElementsByClassName/resources/common.js b/LayoutTests/fast/dom/getElementsByClassName/resources/common.js new file mode 100644 index 0000000..0ea011d --- /dev/null +++ b/LayoutTests/fast/dom/getElementsByClassName/resources/common.js @@ -0,0 +1,21 @@ +// runs a test and writes a log +function t(collection, elements) { + if (window.layoutTestController) + layoutTestController.dumpAsText(); + + var log = "", + r = document.getElementById("r"), + pass = true + if(collection.length != elements.length) { + pass = false + log += "Got " + collection.length + " elements, expected " + elements.length + ". " + } + for(var i = 0, max = collection.length > elements.length ? elements.length : collection.length; i < max; i++) { + if(collection[i] != elements[i]) { + pass = false + log += "Got element `" + collection[i].tagName + "` (" + collection[i].namespaceURI + ")" + log += ", expected element `" + elements[i].tagName + "` (" + elements[i].namespaceURI + "). " + } + } + r.textContent = pass ? "PASS" : "FAIL (" + log + ")" +} diff --git a/LayoutTests/fast/leaks/001-expected.txt b/LayoutTests/fast/leaks/001-expected.txt new file mode 100644 index 0000000..4659dec --- /dev/null +++ b/LayoutTests/fast/leaks/001-expected.txt @@ -0,0 +1,4 @@ +This test exercises RenderBlock::bidiReorderCharacters in a specific way to test for BidiRun leaks as reported in rdar://problem/4987649. Its layout has no particular meaning. + +Test: + diff --git a/LayoutTests/fast/leaks/001.html b/LayoutTests/fast/leaks/001.html new file mode 100644 index 0000000..d3c728a --- /dev/null +++ b/LayoutTests/fast/leaks/001.html @@ -0,0 +1,22 @@ + + + + BidiRun leak test + + + + +

        This test exercises RenderBlock::bidiReorderCharacters in a specific way to + test for BidiRun leaks as reported in rdar://problem/4987649. Its layout has no + particular meaning.

        +
        Test:
        +
        + + diff --git a/LayoutTests/fast/leaks/002-expected.txt b/LayoutTests/fast/leaks/002-expected.txt new file mode 100644 index 0000000..586c81e --- /dev/null +++ b/LayoutTests/fast/leaks/002-expected.txt @@ -0,0 +1,4 @@ +This test exercises RenderBlock::bidiReorderCharacters in a specific way to test for BidiRun leaks as reported in rdar://problem/4987649. Its layout has no particular meaning. + + + diff --git a/LayoutTests/fast/leaks/002.html b/LayoutTests/fast/leaks/002.html new file mode 100644 index 0000000..0b0ecd2 --- /dev/null +++ b/LayoutTests/fast/leaks/002.html @@ -0,0 +1,20 @@ +

        This test exercises RenderBlock::bidiReorderCharacters in a specific way to +test for BidiRun leaks as reported in rdar://problem/4987649. Its layout has no +particular meaning. +

        +
        + + + diff --git a/LayoutTests/fast/leaks/003-expected.txt b/LayoutTests/fast/leaks/003-expected.txt new file mode 100644 index 0000000..98a622b --- /dev/null +++ b/LayoutTests/fast/leaks/003-expected.txt @@ -0,0 +1,4 @@ +This test verifies that garbage collection successfully cleans up after the destruction of a frame containing a JavaScript interpreter. If the test passes, you'll see a PASS message below. + +PASS: 20 garbage JS objects or fewer left uncollected after destroying a frame. + diff --git a/LayoutTests/fast/leaks/003.html-disabled b/LayoutTests/fast/leaks/003.html-disabled new file mode 100644 index 0000000..dc7b0ba --- /dev/null +++ b/LayoutTests/fast/leaks/003.html-disabled @@ -0,0 +1,61 @@ +

        This test verifies that garbage collection successfully cleans up after the destruction +of a frame containing a JavaScript interpreter. If the test passes, you'll see a PASS message below.

        +
        +
        
        +
        +
        +
        +
        -- 
        cgit v1.1