From 09cc381be6ed4e722e28dbf494458a9b6e6f809d Mon Sep 17 00:00:00 2001 From: Rupinder Singh Khokhar Date: Mon, 9 Jun 2014 22:20:49 +0530 Subject: [HTMLCollection && DOMTSHandler && dtd interface] fixes --- test/DOMTSHandler.pm | 3 +- test/dom1-interfaces.xml | 47 ++++++++++++++++++ .../tests/level2/html/HTMLOptionsCollection01.xml | 46 ++++++++++++++++++ .../level2/html/HTMLOptionsCollection01.xml.kfail | 46 ------------------ .../tests/level2/html/HTMLOptionsCollection02.xml | 54 +++++++++++++++++++++ .../level2/html/HTMLOptionsCollection02.xml.kfail | 54 --------------------- .../tests/level2/html/HTMLOptionsCollection03.xml | 54 +++++++++++++++++++++ .../level2/html/HTMLOptionsCollection03.xml.kfail | 54 --------------------- .../tests/level2/html/HTMLOptionsCollection04.xml | 54 +++++++++++++++++++++ .../level2/html/HTMLOptionsCollection04.xml.kfail | 54 --------------------- .../tests/level2/html/HTMLOptionsCollection05.xml | 55 ++++++++++++++++++++++ .../level2/html/HTMLOptionsCollection05.xml.kfail | 55 ---------------------- .../tests/level2/html/HTMLOptionsCollection06.xml | 52 ++++++++++++++++++++ .../level2/html/HTMLOptionsCollection06.xml.kfail | 52 -------------------- .../tests/level2/html/HTMLOptionsCollection07.xml | 54 +++++++++++++++++++++ .../level2/html/HTMLOptionsCollection07.xml.kfail | 54 --------------------- 16 files changed, 418 insertions(+), 370 deletions(-) create mode 100644 test/testcases/tests/level2/html/HTMLOptionsCollection01.xml delete mode 100644 test/testcases/tests/level2/html/HTMLOptionsCollection01.xml.kfail create mode 100644 test/testcases/tests/level2/html/HTMLOptionsCollection02.xml delete mode 100644 test/testcases/tests/level2/html/HTMLOptionsCollection02.xml.kfail create mode 100644 test/testcases/tests/level2/html/HTMLOptionsCollection03.xml delete mode 100644 test/testcases/tests/level2/html/HTMLOptionsCollection03.xml.kfail create mode 100644 test/testcases/tests/level2/html/HTMLOptionsCollection04.xml delete mode 100644 test/testcases/tests/level2/html/HTMLOptionsCollection04.xml.kfail create mode 100644 test/testcases/tests/level2/html/HTMLOptionsCollection05.xml delete mode 100644 test/testcases/tests/level2/html/HTMLOptionsCollection05.xml.kfail create mode 100644 test/testcases/tests/level2/html/HTMLOptionsCollection06.xml delete mode 100644 test/testcases/tests/level2/html/HTMLOptionsCollection06.xml.kfail create mode 100644 test/testcases/tests/level2/html/HTMLOptionsCollection07.xml delete mode 100644 test/testcases/tests/level2/html/HTMLOptionsCollection07.xml.kfail (limited to 'test') diff --git a/test/DOMTSHandler.pm b/test/DOMTSHandler.pm index fa71365..fec9bcb 100644 --- a/test/DOMTSHandler.pm +++ b/test/DOMTSHandler.pm @@ -48,6 +48,7 @@ our %special_type = ( HTMLTableSectionElement => "dom_html_table_section_element *", HTMLTableElement => "dom_html_table_element *", HTMLTableRowElement => "dom_html_table_row_element *", + HTMLOptionsCollection => "dom_html_options_collection *", ); our %special_prefix = ( DOMString => "dom_string", @@ -1491,7 +1492,7 @@ sub to_get_attribute_cast { sub get_get_attribute_prefix { my $type = shift; my $interface = shift; - if ((($interface eq "HTMLCollection") or ($interface eq "HTMLSelectElement")) and ($type eq "length")) { + if ($type eq "length") { $prefix = "uint32_t "; } elsif (exists $special_prefix{$type}) { $prefix = $special_prefix{$type}; diff --git a/test/dom1-interfaces.xml b/test/dom1-interfaces.xml index fc88b80..240f2b9 100644 --- a/test/dom1-interfaces.xml +++ b/test/dom1-interfaces.xml @@ -3674,4 +3674,51 @@ See W3C License http://www.w3.org/Consortium/Legal/ for more details. + + +

AnHTMLOptionsCollectionis a list of nodes. An individual node may be accessed by either ordinal index or the node'snameoridattributes.Note:Collections in the HTML DOM are assumed to belivemeaning that they are automatically updated when the underlying document is changed.

+
+ + +

This attribute specifies the length orsizeof the list.

+
+
+ + +

This method retrieves a node specified by ordinal index. Nodes are numbered in tree order (depth-first traversal order).

+
+ + + +

The index of the node to be fetched. The index origin is 0.

+
+ +
+ + +

TheNodeat the corresponding position upon success. A value ofnullis returned if the index is out of range.

+
+
+ +
+ + +

This method retrieves aNodeusing a name. It first searches for aNodewith a matchingidattribute. If it doesn't find one, it then searches for aNodewith a matchingnameattribute, but only on those elements that are allowed a name attribute.

+
+ + + +

The name of theNodeto be fetched.

+
+ +
+ + +

TheNodewith anameoridattribute whose value corresponds to the specified string. Upon failure (e.g., no node with this name exists), returnsnull.

+
+
+ +
+
+ diff --git a/test/testcases/tests/level2/html/HTMLOptionsCollection01.xml b/test/testcases/tests/level2/html/HTMLOptionsCollection01.xml new file mode 100644 index 0000000..80df1a3 --- /dev/null +++ b/test/testcases/tests/level2/html/HTMLOptionsCollection01.xml @@ -0,0 +1,46 @@ + + + + + + +HTMLOptionsCollection01 +NIST + + An HTMLOptionsCollection is a list of nodes representing HTML option + element. + The length attribute specifies the length or size of the list. + + Retrieve the first SELECT element and create a HTMLOptionsCollection + of the OPTION elements. Check the size of the length of OPTION elements. + +Rick Rivello +2002-08-01 + + + + + + + + + + + + + + + diff --git a/test/testcases/tests/level2/html/HTMLOptionsCollection01.xml.kfail b/test/testcases/tests/level2/html/HTMLOptionsCollection01.xml.kfail deleted file mode 100644 index 80df1a3..0000000 --- a/test/testcases/tests/level2/html/HTMLOptionsCollection01.xml.kfail +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - -HTMLOptionsCollection01 -NIST - - An HTMLOptionsCollection is a list of nodes representing HTML option - element. - The length attribute specifies the length or size of the list. - - Retrieve the first SELECT element and create a HTMLOptionsCollection - of the OPTION elements. Check the size of the length of OPTION elements. - -Rick Rivello -2002-08-01 - - - - - - - - - - - - - - - diff --git a/test/testcases/tests/level2/html/HTMLOptionsCollection02.xml b/test/testcases/tests/level2/html/HTMLOptionsCollection02.xml new file mode 100644 index 0000000..44b5431 --- /dev/null +++ b/test/testcases/tests/level2/html/HTMLOptionsCollection02.xml @@ -0,0 +1,54 @@ + + + + + + +HTMLOptionsCollection02 +NIST + + An HTMLOptionsCollection is a list of nodes representing HTML option + element. + An individual node may be accessed by either ordinal index, the node's + name or id attributes. (Test ordinal index=3). + The item() method retrieves a node specified by ordinal index. + Nodes are numbered in tree order. The index origin is 0. + + Retrieve the first SELECT element. Create a HTMLOptionsCollection. + Retrieve the fourth item in the list and examine its firstChild's + nodeValue. + +Rick Rivello +2002-08-01 + + + + + + + + + + + + + + + + + + + diff --git a/test/testcases/tests/level2/html/HTMLOptionsCollection02.xml.kfail b/test/testcases/tests/level2/html/HTMLOptionsCollection02.xml.kfail deleted file mode 100644 index 44b5431..0000000 --- a/test/testcases/tests/level2/html/HTMLOptionsCollection02.xml.kfail +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - -HTMLOptionsCollection02 -NIST - - An HTMLOptionsCollection is a list of nodes representing HTML option - element. - An individual node may be accessed by either ordinal index, the node's - name or id attributes. (Test ordinal index=3). - The item() method retrieves a node specified by ordinal index. - Nodes are numbered in tree order. The index origin is 0. - - Retrieve the first SELECT element. Create a HTMLOptionsCollection. - Retrieve the fourth item in the list and examine its firstChild's - nodeValue. - -Rick Rivello -2002-08-01 - - - - - - - - - - - - - - - - - - - diff --git a/test/testcases/tests/level2/html/HTMLOptionsCollection03.xml b/test/testcases/tests/level2/html/HTMLOptionsCollection03.xml new file mode 100644 index 0000000..280b2bf --- /dev/null +++ b/test/testcases/tests/level2/html/HTMLOptionsCollection03.xml @@ -0,0 +1,54 @@ + + + + + + +HTMLOptionsCollection03 +NIST + + An HTMLOptionsCollection is a list of nodes representing HTML option + element. + An individual node may be accessed by either ordinal index, the node's + name or id attributes. (Test node name). + The namedItem method retrieves a Node using a name. It first searches + for a node with a matching id attribute. If it doesn't find one, it + then searches for a Node with a matching name attribute, but only + those elements that are allowed a name attribute. + + Retrieve the first FORM element. Create a HTMLCollection of the elements. + Search for an element that has select1 as the value for the name attribute. + Get the nodeName of that element. + +Rick Rivello +2002-08-01 + + + + + + + + + + + + + + + + + diff --git a/test/testcases/tests/level2/html/HTMLOptionsCollection03.xml.kfail b/test/testcases/tests/level2/html/HTMLOptionsCollection03.xml.kfail deleted file mode 100644 index 280b2bf..0000000 --- a/test/testcases/tests/level2/html/HTMLOptionsCollection03.xml.kfail +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - -HTMLOptionsCollection03 -NIST - - An HTMLOptionsCollection is a list of nodes representing HTML option - element. - An individual node may be accessed by either ordinal index, the node's - name or id attributes. (Test node name). - The namedItem method retrieves a Node using a name. It first searches - for a node with a matching id attribute. If it doesn't find one, it - then searches for a Node with a matching name attribute, but only - those elements that are allowed a name attribute. - - Retrieve the first FORM element. Create a HTMLCollection of the elements. - Search for an element that has select1 as the value for the name attribute. - Get the nodeName of that element. - -Rick Rivello -2002-08-01 - - - - - - - - - - - - - - - - - diff --git a/test/testcases/tests/level2/html/HTMLOptionsCollection04.xml b/test/testcases/tests/level2/html/HTMLOptionsCollection04.xml new file mode 100644 index 0000000..83e59d3 --- /dev/null +++ b/test/testcases/tests/level2/html/HTMLOptionsCollection04.xml @@ -0,0 +1,54 @@ + + + + + + +HTMLOptionsCollection04 +NIST + + An HTMLOptionsCollection is a list of nodes representing HTML option + element. + An individual node may be accessed by either ordinal index, the node's + name or id attributes. (Test node name). + The namedItem method retrieves a Node using a name. It first searches + for a node with a matching id attribute. If it doesn't find one, it + then searches for a Node with a matching name attribute, but only + those elements that are allowed a name attribute. + + Retrieve the first FORM element. Create a HTMLCollection of the elements. + Search for an element that has selectId as the value for the id attribute. + Get the nodeName of that element. + +Rick Rivello +2002-08-01 + + + + + + + + + + + + + + + + + diff --git a/test/testcases/tests/level2/html/HTMLOptionsCollection04.xml.kfail b/test/testcases/tests/level2/html/HTMLOptionsCollection04.xml.kfail deleted file mode 100644 index 83e59d3..0000000 --- a/test/testcases/tests/level2/html/HTMLOptionsCollection04.xml.kfail +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - -HTMLOptionsCollection04 -NIST - - An HTMLOptionsCollection is a list of nodes representing HTML option - element. - An individual node may be accessed by either ordinal index, the node's - name or id attributes. (Test node name). - The namedItem method retrieves a Node using a name. It first searches - for a node with a matching id attribute. If it doesn't find one, it - then searches for a Node with a matching name attribute, but only - those elements that are allowed a name attribute. - - Retrieve the first FORM element. Create a HTMLCollection of the elements. - Search for an element that has selectId as the value for the id attribute. - Get the nodeName of that element. - -Rick Rivello -2002-08-01 - - - - - - - - - - - - - - - - - diff --git a/test/testcases/tests/level2/html/HTMLOptionsCollection05.xml b/test/testcases/tests/level2/html/HTMLOptionsCollection05.xml new file mode 100644 index 0000000..d2f44d7 --- /dev/null +++ b/test/testcases/tests/level2/html/HTMLOptionsCollection05.xml @@ -0,0 +1,55 @@ + + + + + + +HTMLOptionsCollection05 +NIST + + An HTMLOptionsCollection is a list of nodes representing HTML option + element. + An individual node may be accessed by either ordinal index, the node's + name or id attributes. (Test node name). + The namedItem method retrieves a Node using a name. It first searches + for a node with a matching id attribute. If it doesn't find one, it + then searches for a Node with a matching name attribute, but only + those elements that are allowed a name attribute. Upon failure(e.q., no + node with this name exists), returns null. + + Retrieve the first FORM element. Create a HTMLCollection of the elements. + Search for an element that has select9 as the value for the name attribute. + Null should be returned since there is not any name or id attribute with + select9 as a value. + +Rick Rivello +2002-08-01 + + + + + + + + + + + + + + + + diff --git a/test/testcases/tests/level2/html/HTMLOptionsCollection05.xml.kfail b/test/testcases/tests/level2/html/HTMLOptionsCollection05.xml.kfail deleted file mode 100644 index d2f44d7..0000000 --- a/test/testcases/tests/level2/html/HTMLOptionsCollection05.xml.kfail +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - -HTMLOptionsCollection05 -NIST - - An HTMLOptionsCollection is a list of nodes representing HTML option - element. - An individual node may be accessed by either ordinal index, the node's - name or id attributes. (Test node name). - The namedItem method retrieves a Node using a name. It first searches - for a node with a matching id attribute. If it doesn't find one, it - then searches for a Node with a matching name attribute, but only - those elements that are allowed a name attribute. Upon failure(e.q., no - node with this name exists), returns null. - - Retrieve the first FORM element. Create a HTMLCollection of the elements. - Search for an element that has select9 as the value for the name attribute. - Null should be returned since there is not any name or id attribute with - select9 as a value. - -Rick Rivello -2002-08-01 - - - - - - - - - - - - - - - - diff --git a/test/testcases/tests/level2/html/HTMLOptionsCollection06.xml b/test/testcases/tests/level2/html/HTMLOptionsCollection06.xml new file mode 100644 index 0000000..fbde429 --- /dev/null +++ b/test/testcases/tests/level2/html/HTMLOptionsCollection06.xml @@ -0,0 +1,52 @@ + + + + + + +HTMLOptionsCollection06 +NIST + + An HTMLOptionsCollection is a list of nodes representing HTML option + element. + An individual node may be accessed by either ordinal index, the node's + name or id attributes. (Test ordinal index). + The item() method retrieves a node specified by ordinal index. + A value of null is returned if the index is out of range. + + Retrieve the first SELECT element. Create a HTMLOptionsCollection. + Retrieve the tenth item in the list - null should be returned since + there are not 10 items in the list. + +Rick Rivello +2002-08-01 + + + + + + + + + + + + + + + + + diff --git a/test/testcases/tests/level2/html/HTMLOptionsCollection06.xml.kfail b/test/testcases/tests/level2/html/HTMLOptionsCollection06.xml.kfail deleted file mode 100644 index fbde429..0000000 --- a/test/testcases/tests/level2/html/HTMLOptionsCollection06.xml.kfail +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - -HTMLOptionsCollection06 -NIST - - An HTMLOptionsCollection is a list of nodes representing HTML option - element. - An individual node may be accessed by either ordinal index, the node's - name or id attributes. (Test ordinal index). - The item() method retrieves a node specified by ordinal index. - A value of null is returned if the index is out of range. - - Retrieve the first SELECT element. Create a HTMLOptionsCollection. - Retrieve the tenth item in the list - null should be returned since - there are not 10 items in the list. - -Rick Rivello -2002-08-01 - - - - - - - - - - - - - - - - - diff --git a/test/testcases/tests/level2/html/HTMLOptionsCollection07.xml b/test/testcases/tests/level2/html/HTMLOptionsCollection07.xml new file mode 100644 index 0000000..a2731e5 --- /dev/null +++ b/test/testcases/tests/level2/html/HTMLOptionsCollection07.xml @@ -0,0 +1,54 @@ + + + + + + +HTMLOptionsCollection07 +NIST + + An HTMLOptionsCollection is a list of nodes representing HTML option + element. + An individual node may be accessed by either ordinal index, the node's + name or id attributes. (Test ordinal index=0). + The item() method retrieves a node specified by ordinal index. Nodes + are numbered in tree order. The index origin is 0. + + Retrieve the first SELECT element. Create a HTMLOptionsCollection. + Retrieve the first item in the list and examine its firstChild's + nodeValue. + +Rick Rivello +2002-08-01 + + + + + + + + + + + + + + + + + + + diff --git a/test/testcases/tests/level2/html/HTMLOptionsCollection07.xml.kfail b/test/testcases/tests/level2/html/HTMLOptionsCollection07.xml.kfail deleted file mode 100644 index a2731e5..0000000 --- a/test/testcases/tests/level2/html/HTMLOptionsCollection07.xml.kfail +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - -HTMLOptionsCollection07 -NIST - - An HTMLOptionsCollection is a list of nodes representing HTML option - element. - An individual node may be accessed by either ordinal index, the node's - name or id attributes. (Test ordinal index=0). - The item() method retrieves a node specified by ordinal index. Nodes - are numbered in tree order. The index origin is 0. - - Retrieve the first SELECT element. Create a HTMLOptionsCollection. - Retrieve the first item in the list and examine its firstChild's - nodeValue. - -Rick Rivello -2002-08-01 - - - - - - - - - - - - - - - - - - - -- cgit v1.2.1