From 2a9572f844e04332d6a448b2f52be8ba2a5e8784 Mon Sep 17 00:00:00 2001 From: John-Mark Bell Date: Wed, 8 Aug 2012 10:56:53 +0100 Subject: Mostly implement HTMLOptionElement, HTMLSelectElement. Enable HTMLOptionElement tests that pass. --- .../tests/level1/html/HTMLOptionElement01.xml | 45 ++++++++++++++++++++++ .../level1/html/HTMLOptionElement01.xml.kfail | 45 ---------------------- .../tests/level1/html/HTMLOptionElement02.xml | 44 +++++++++++++++++++++ .../level1/html/HTMLOptionElement02.xml.kfail | 44 --------------------- .../tests/level1/html/HTMLOptionElement03.xml | 44 +++++++++++++++++++++ .../level1/html/HTMLOptionElement03.xml.kfail | 44 --------------------- .../tests/level1/html/HTMLOptionElement04.xml | 43 +++++++++++++++++++++ .../level1/html/HTMLOptionElement04.xml.kfail | 43 --------------------- .../tests/level1/html/HTMLOptionElement06.xml | 44 +++++++++++++++++++++ .../level1/html/HTMLOptionElement06.xml.kfail | 44 --------------------- .../tests/level1/html/HTMLOptionElement07.xml | 44 +++++++++++++++++++++ .../level1/html/HTMLOptionElement07.xml.kfail | 44 --------------------- .../tests/level1/html/HTMLOptionElement08.xml | 44 +++++++++++++++++++++ .../level1/html/HTMLOptionElement08.xml.kfail | 44 --------------------- .../tests/level1/html/HTMLOptionElement09.xml | 43 +++++++++++++++++++++ .../level1/html/HTMLOptionElement09.xml.kfail | 43 --------------------- 16 files changed, 351 insertions(+), 351 deletions(-) create mode 100644 test/testcases/tests/level1/html/HTMLOptionElement01.xml delete mode 100644 test/testcases/tests/level1/html/HTMLOptionElement01.xml.kfail create mode 100644 test/testcases/tests/level1/html/HTMLOptionElement02.xml delete mode 100644 test/testcases/tests/level1/html/HTMLOptionElement02.xml.kfail create mode 100644 test/testcases/tests/level1/html/HTMLOptionElement03.xml delete mode 100644 test/testcases/tests/level1/html/HTMLOptionElement03.xml.kfail create mode 100644 test/testcases/tests/level1/html/HTMLOptionElement04.xml delete mode 100644 test/testcases/tests/level1/html/HTMLOptionElement04.xml.kfail create mode 100644 test/testcases/tests/level1/html/HTMLOptionElement06.xml delete mode 100644 test/testcases/tests/level1/html/HTMLOptionElement06.xml.kfail create mode 100644 test/testcases/tests/level1/html/HTMLOptionElement07.xml delete mode 100644 test/testcases/tests/level1/html/HTMLOptionElement07.xml.kfail create mode 100644 test/testcases/tests/level1/html/HTMLOptionElement08.xml delete mode 100644 test/testcases/tests/level1/html/HTMLOptionElement08.xml.kfail create mode 100644 test/testcases/tests/level1/html/HTMLOptionElement09.xml delete mode 100644 test/testcases/tests/level1/html/HTMLOptionElement09.xml.kfail (limited to 'test/testcases/tests') diff --git a/test/testcases/tests/level1/html/HTMLOptionElement01.xml b/test/testcases/tests/level1/html/HTMLOptionElement01.xml new file mode 100644 index 0000000..d07454c --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLOptionElement01.xml @@ -0,0 +1,45 @@ + + + + + + + +HTMLOptionElement01 +NIST + + The form attribute returns the FORM element containing this control. + + Retrieve the form attribute from the first SELECT element + and examine its value. + +Mary Brady +2002-02-22 + + + + + + + + + + + +
+ + + diff --git a/test/testcases/tests/level1/html/HTMLOptionElement01.xml.kfail b/test/testcases/tests/level1/html/HTMLOptionElement01.xml.kfail deleted file mode 100644 index d07454c..0000000 --- a/test/testcases/tests/level1/html/HTMLOptionElement01.xml.kfail +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - -HTMLOptionElement01 -NIST - - The form attribute returns the FORM element containing this control. - - Retrieve the form attribute from the first SELECT element - and examine its value. - -Mary Brady -2002-02-22 - - - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLOptionElement02.xml b/test/testcases/tests/level1/html/HTMLOptionElement02.xml new file mode 100644 index 0000000..bbf3153 --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLOptionElement02.xml @@ -0,0 +1,44 @@ + + + + + + + +HTMLOptionElement02 +NIST + + The form attribute returns null if control in not within the context of + a form. + + Retrieve the first OPTION attribute from the second select element and + examine its form element. + +Mary Brady +2002-02-22 + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLOptionElement02.xml.kfail b/test/testcases/tests/level1/html/HTMLOptionElement02.xml.kfail deleted file mode 100644 index bbf3153..0000000 --- a/test/testcases/tests/level1/html/HTMLOptionElement02.xml.kfail +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - -HTMLOptionElement02 -NIST - - The form attribute returns null if control in not within the context of - a form. - - Retrieve the first OPTION attribute from the second select element and - examine its form element. - -Mary Brady -2002-02-22 - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLOptionElement03.xml b/test/testcases/tests/level1/html/HTMLOptionElement03.xml new file mode 100644 index 0000000..9cee3c4 --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLOptionElement03.xml @@ -0,0 +1,44 @@ + + + + + + + +HTMLOptionElement03 +NIST + + The defaultSelected attribute contains the value of the selected + attribute. + + Retrieve the defaultSelected attribute from the first OPTION element + and examine its value. + +Mary Brady +2002-02-22 + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLOptionElement03.xml.kfail b/test/testcases/tests/level1/html/HTMLOptionElement03.xml.kfail deleted file mode 100644 index 9cee3c4..0000000 --- a/test/testcases/tests/level1/html/HTMLOptionElement03.xml.kfail +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - -HTMLOptionElement03 -NIST - - The defaultSelected attribute contains the value of the selected - attribute. - - Retrieve the defaultSelected attribute from the first OPTION element - and examine its value. - -Mary Brady -2002-02-22 - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLOptionElement04.xml b/test/testcases/tests/level1/html/HTMLOptionElement04.xml new file mode 100644 index 0000000..1923dd3 --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLOptionElement04.xml @@ -0,0 +1,43 @@ + + + + + + + +HTMLOptionElement04 +NIST + + The text attribute contains the text contained within the option element. + + Retrieve the text attribute from the second OPTION element + and examine its value. + +Mary Brady +2002-02-22 + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLOptionElement04.xml.kfail b/test/testcases/tests/level1/html/HTMLOptionElement04.xml.kfail deleted file mode 100644 index 1923dd3..0000000 --- a/test/testcases/tests/level1/html/HTMLOptionElement04.xml.kfail +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - -HTMLOptionElement04 -NIST - - The text attribute contains the text contained within the option element. - - Retrieve the text attribute from the second OPTION element - and examine its value. - -Mary Brady -2002-02-22 - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLOptionElement06.xml b/test/testcases/tests/level1/html/HTMLOptionElement06.xml new file mode 100644 index 0000000..2c00da4 --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLOptionElement06.xml @@ -0,0 +1,44 @@ + + + + + + + +HTMLOptionElement06 +NIST + + The disabled attribute indicates that this control is not available + within this context. + + Retrieve the disabled attribute from the last OPTION element + and examine its value. + +Mary Brady +2002-02-22 + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLOptionElement06.xml.kfail b/test/testcases/tests/level1/html/HTMLOptionElement06.xml.kfail deleted file mode 100644 index 2c00da4..0000000 --- a/test/testcases/tests/level1/html/HTMLOptionElement06.xml.kfail +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - -HTMLOptionElement06 -NIST - - The disabled attribute indicates that this control is not available - within this context. - - Retrieve the disabled attribute from the last OPTION element - and examine its value. - -Mary Brady -2002-02-22 - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLOptionElement07.xml b/test/testcases/tests/level1/html/HTMLOptionElement07.xml new file mode 100644 index 0000000..9218070 --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLOptionElement07.xml @@ -0,0 +1,44 @@ + + + + + + + +HTMLOptionElement07 +NIST + + The label attribute is used in hierarchical menus. It specifies + a shorter label for an option that the content of the OPTION element. + + Retrieve the label attribute from the second OPTION element + and examine its value. + +Mary Brady +2002-02-22 + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLOptionElement07.xml.kfail b/test/testcases/tests/level1/html/HTMLOptionElement07.xml.kfail deleted file mode 100644 index 9218070..0000000 --- a/test/testcases/tests/level1/html/HTMLOptionElement07.xml.kfail +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - -HTMLOptionElement07 -NIST - - The label attribute is used in hierarchical menus. It specifies - a shorter label for an option that the content of the OPTION element. - - Retrieve the label attribute from the second OPTION element - and examine its value. - -Mary Brady -2002-02-22 - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLOptionElement08.xml b/test/testcases/tests/level1/html/HTMLOptionElement08.xml new file mode 100644 index 0000000..c5c6640 --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLOptionElement08.xml @@ -0,0 +1,44 @@ + + + + + + + +HTMLOptionElement08 +NIST + + The selected attribute indicates the current state of the corresponding + form control in an interactive user-agent. + + Retrieve the selected attribute from the first OPTION element + and examine its value. + +Mary Brady +2002-02-22 + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLOptionElement08.xml.kfail b/test/testcases/tests/level1/html/HTMLOptionElement08.xml.kfail deleted file mode 100644 index c5c6640..0000000 --- a/test/testcases/tests/level1/html/HTMLOptionElement08.xml.kfail +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - -HTMLOptionElement08 -NIST - - The selected attribute indicates the current state of the corresponding - form control in an interactive user-agent. - - Retrieve the selected attribute from the first OPTION element - and examine its value. - -Mary Brady -2002-02-22 - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLOptionElement09.xml b/test/testcases/tests/level1/html/HTMLOptionElement09.xml new file mode 100644 index 0000000..064ccbe --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLOptionElement09.xml @@ -0,0 +1,43 @@ + + + + + + + +HTMLOptionElement09 +NIST + + The value attribute contains the current form control value. + + Retrieve the value attribute from the first OPTION element + and examine its value. + +Mary Brady +2002-02-22 + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLOptionElement09.xml.kfail b/test/testcases/tests/level1/html/HTMLOptionElement09.xml.kfail deleted file mode 100644 index 064ccbe..0000000 --- a/test/testcases/tests/level1/html/HTMLOptionElement09.xml.kfail +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - -HTMLOptionElement09 -NIST - - The value attribute contains the current form control value. - - Retrieve the value attribute from the first OPTION element - and examine its value. - -Mary Brady -2002-02-22 - - - - - - - - - - - - - -- cgit v1.2.3 From 15fa04e97c7c0c9108c0324bae4dfd384e2eb3be Mon Sep 17 00:00:00 2001 From: John-Mark Bell Date: Wed, 19 Sep 2012 00:03:05 +0100 Subject: Enable HTMLSelectElement tests --- include/dom/html/html_select_element.h | 11 +++- src/html/html_select_element.c | 4 +- test/DOMTSHandler.pm | 7 +++ .../tests/level1/html/HTMLSelectElement01.xml | 44 ++++++++++++++++ .../level1/html/HTMLSelectElement01.xml.kfail | 44 ---------------- .../tests/level1/html/HTMLSelectElement02.xml | 44 ++++++++++++++++ .../level1/html/HTMLSelectElement02.xml.kfail | 44 ---------------- .../tests/level1/html/HTMLSelectElement03.xml | 49 ++++++++++++++++++ .../level1/html/HTMLSelectElement03.xml.kfail | 49 ------------------ .../tests/level1/html/HTMLSelectElement04.xml | 43 ++++++++++++++++ .../level1/html/HTMLSelectElement04.xml.kfail | 43 ---------------- .../tests/level1/html/HTMLSelectElement05.xml | 43 ++++++++++++++++ .../level1/html/HTMLSelectElement05.xml.kfail | 43 ---------------- .../tests/level1/html/HTMLSelectElement06.xml | 45 +++++++++++++++++ .../level1/html/HTMLSelectElement06.xml.kfail | 45 ----------------- .../tests/level1/html/HTMLSelectElement07.xml | 44 ++++++++++++++++ .../level1/html/HTMLSelectElement07.xml.kfail | 44 ---------------- .../tests/level1/html/HTMLSelectElement08.xml | 59 ++++++++++++++++++++++ .../level1/html/HTMLSelectElement08.xml.kfail | 59 ---------------------- .../tests/level1/html/HTMLSelectElement09.xml | 44 ++++++++++++++++ .../level1/html/HTMLSelectElement09.xml.kfail | 44 ---------------- .../tests/level1/html/HTMLSelectElement10.xml | 44 ++++++++++++++++ .../level1/html/HTMLSelectElement10.xml.kfail | 44 ---------------- .../tests/level1/html/HTMLSelectElement11.xml | 44 ++++++++++++++++ .../level1/html/HTMLSelectElement11.xml.kfail | 44 ---------------- .../tests/level1/html/HTMLSelectElement12.xml | 43 ++++++++++++++++ .../level1/html/HTMLSelectElement12.xml.kfail | 43 ---------------- .../tests/level1/html/HTMLSelectElement13.xml | 44 ++++++++++++++++ .../level1/html/HTMLSelectElement13.xml.kfail | 44 ---------------- .../tests/level1/html/HTMLSelectElement14.xml | 37 ++++++++++++++ .../level1/html/HTMLSelectElement14.xml.kfail | 37 -------------- .../tests/level1/html/HTMLSelectElement15.xml | 37 ++++++++++++++ .../level1/html/HTMLSelectElement15.xml.kfail | 37 -------------- .../tests/level1/html/HTMLSelectElement17.xml | 43 ++++++++++++++++ .../level1/html/HTMLSelectElement17.xml.kfail | 43 ---------------- test/testutils/foreach.c | 26 ++++++++++ test/testutils/foreach.h | 4 ++ 37 files changed, 755 insertions(+), 711 deletions(-) create mode 100644 test/testcases/tests/level1/html/HTMLSelectElement01.xml delete mode 100644 test/testcases/tests/level1/html/HTMLSelectElement01.xml.kfail create mode 100644 test/testcases/tests/level1/html/HTMLSelectElement02.xml delete mode 100644 test/testcases/tests/level1/html/HTMLSelectElement02.xml.kfail create mode 100644 test/testcases/tests/level1/html/HTMLSelectElement03.xml delete mode 100644 test/testcases/tests/level1/html/HTMLSelectElement03.xml.kfail create mode 100644 test/testcases/tests/level1/html/HTMLSelectElement04.xml delete mode 100644 test/testcases/tests/level1/html/HTMLSelectElement04.xml.kfail create mode 100644 test/testcases/tests/level1/html/HTMLSelectElement05.xml delete mode 100644 test/testcases/tests/level1/html/HTMLSelectElement05.xml.kfail create mode 100644 test/testcases/tests/level1/html/HTMLSelectElement06.xml delete mode 100644 test/testcases/tests/level1/html/HTMLSelectElement06.xml.kfail create mode 100644 test/testcases/tests/level1/html/HTMLSelectElement07.xml delete mode 100644 test/testcases/tests/level1/html/HTMLSelectElement07.xml.kfail create mode 100644 test/testcases/tests/level1/html/HTMLSelectElement08.xml delete mode 100644 test/testcases/tests/level1/html/HTMLSelectElement08.xml.kfail create mode 100644 test/testcases/tests/level1/html/HTMLSelectElement09.xml delete mode 100644 test/testcases/tests/level1/html/HTMLSelectElement09.xml.kfail create mode 100644 test/testcases/tests/level1/html/HTMLSelectElement10.xml delete mode 100644 test/testcases/tests/level1/html/HTMLSelectElement10.xml.kfail create mode 100644 test/testcases/tests/level1/html/HTMLSelectElement11.xml delete mode 100644 test/testcases/tests/level1/html/HTMLSelectElement11.xml.kfail create mode 100644 test/testcases/tests/level1/html/HTMLSelectElement12.xml delete mode 100644 test/testcases/tests/level1/html/HTMLSelectElement12.xml.kfail create mode 100644 test/testcases/tests/level1/html/HTMLSelectElement13.xml delete mode 100644 test/testcases/tests/level1/html/HTMLSelectElement13.xml.kfail create mode 100644 test/testcases/tests/level1/html/HTMLSelectElement14.xml delete mode 100644 test/testcases/tests/level1/html/HTMLSelectElement14.xml.kfail create mode 100644 test/testcases/tests/level1/html/HTMLSelectElement15.xml delete mode 100644 test/testcases/tests/level1/html/HTMLSelectElement15.xml.kfail create mode 100644 test/testcases/tests/level1/html/HTMLSelectElement17.xml delete mode 100644 test/testcases/tests/level1/html/HTMLSelectElement17.xml.kfail (limited to 'test/testcases/tests') diff --git a/include/dom/html/html_select_element.h b/include/dom/html/html_select_element.h index 89b6844..b92abd6 100644 --- a/include/dom/html/html_select_element.h +++ b/include/dom/html/html_select_element.h @@ -40,9 +40,12 @@ dom_exception dom_html_select_element_set_length( dom_exception dom_html_select_element_get_form( dom_html_select_element *ele, dom_html_form_element **form); -dom_exception dom_html_select_element_get_options( +dom_exception dom__html_select_element_get_options( dom_html_select_element *ele, struct dom_html_options_collection **col); +#define dom_html_select_element_get_options(e, c) \ + dom__html_select_element_get_options((dom_html_select_element *) (e), \ + (struct dom_html_options_collection **) (c)) dom_exception dom_html_select_element_get_disabled( dom_html_select_element *ele, bool *disabled); @@ -70,8 +73,12 @@ dom_exception dom_html_select_element_set_tab_index( dom_html_select_element *ele, unsigned long tab_index); /* Functions */ -dom_exception dom_html_select_element_add(dom_html_select_element *select, +dom_exception dom__html_select_element_add(dom_html_select_element *select, struct dom_html_element *ele, struct dom_html_element *before); +#define dom_html_select_element_add(s, e, b) \ + dom__html_select_element_add((dom_html_select_element *) (s), \ + (struct dom_html_element *) (e), \ + (struct dom_html_element *) (b)) dom_exception dom_html_select_element_remove(dom_html_select_element *ele, long index); dom_exception dom_html_select_element_blur(struct dom_html_select_element *ele); diff --git a/src/html/html_select_element.c b/src/html/html_select_element.c index 9992376..89e46a9 100644 --- a/src/html/html_select_element.c +++ b/src/html/html_select_element.c @@ -361,7 +361,7 @@ dom_exception dom_html_select_element_get_form( * \param col THe returned collection object * \return DOM_NO_ERR on success. */ -dom_exception dom_html_select_element_get_options( +dom_exception dom__html_select_element_get_options( dom_html_select_element *ele, struct dom_html_options_collection **col) { @@ -524,7 +524,7 @@ dom_exception dom_html_select_element_set_tab_index( /* Functions */ -dom_exception dom_html_select_element_add(dom_html_select_element *select, +dom_exception dom__html_select_element_add(dom_html_select_element *select, struct dom_html_element *ele, struct dom_html_element *before) { UNUSED(select); diff --git a/test/DOMTSHandler.pm b/test/DOMTSHandler.pm index 890a8ff..93a97e9 100644 --- a/test/DOMTSHandler.pm +++ b/test/DOMTSHandler.pm @@ -1244,6 +1244,13 @@ sub generate_control_statement { print "foreach_initialise_domnamednodemap($coll, \&iterator$iterator_index);\n"; print "while(get_next_domnamednodemap($coll, \&iterator$iterator_index, \&$member)) {\n"; } + + if ($self->{"var"}->{$coll} eq "HTMLCollection") { + $iterator_index++; + print "unsigned int iterator$iterator_index = 0;"; + print "foreach_initialise_domhtmlcollection($coll, \&iterator$iterator_index);\n"; + print "while(get_next_domhtmlcollection($coll, \&iterator$iterator_index, \&$member)) {\n"; + } } } diff --git a/test/testcases/tests/level1/html/HTMLSelectElement01.xml b/test/testcases/tests/level1/html/HTMLSelectElement01.xml new file mode 100644 index 0000000..3b08881 --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLSelectElement01.xml @@ -0,0 +1,44 @@ + + + + + + + +HTMLSelectElement01 +NIST + + The type attribute is the string "select-multiple" when multiple + attribute is true. + + Retrieve the type attribute from the first SELECT element and + examine its value. + +Mary Brady +2002-02-22 + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLSelectElement01.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement01.xml.kfail deleted file mode 100644 index 3b08881..0000000 --- a/test/testcases/tests/level1/html/HTMLSelectElement01.xml.kfail +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - -HTMLSelectElement01 -NIST - - The type attribute is the string "select-multiple" when multiple - attribute is true. - - Retrieve the type attribute from the first SELECT element and - examine its value. - -Mary Brady -2002-02-22 - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLSelectElement02.xml b/test/testcases/tests/level1/html/HTMLSelectElement02.xml new file mode 100644 index 0000000..f9e865d --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLSelectElement02.xml @@ -0,0 +1,44 @@ + + + + + + + +HTMLSelectElement02 +NIST + + The selectedIndex attribute specifies the ordinal index of the selected + option. + + Retrieve the selectedIndex attribute from the first SELECT element and + examine its value. + +Mary Brady +2002-02-22 + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLSelectElement02.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement02.xml.kfail deleted file mode 100644 index f9e865d..0000000 --- a/test/testcases/tests/level1/html/HTMLSelectElement02.xml.kfail +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - -HTMLSelectElement02 -NIST - - The selectedIndex attribute specifies the ordinal index of the selected - option. - - Retrieve the selectedIndex attribute from the first SELECT element and - examine its value. - -Mary Brady -2002-02-22 - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLSelectElement03.xml b/test/testcases/tests/level1/html/HTMLSelectElement03.xml new file mode 100644 index 0000000..97d217c --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLSelectElement03.xml @@ -0,0 +1,49 @@ + + + + + + + +HTMLSelectElement03 +NIST + + The selectedIndex attribute specifies the ordinal index of the selected + option. If no element is selected -1 is returned. + + Retrieve the selectedIndex attribute from the second SELECT element and + examine its value. + + Per http://www.w3.org/TR/html401/interact/forms.html#h-17.6.1, + without an explicit selected attribute, user agent behavior is + undefined. There is no way to coerce no option to be selected. + +Mary Brady +2002-02-22 + + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLSelectElement03.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement03.xml.kfail deleted file mode 100644 index 97d217c..0000000 --- a/test/testcases/tests/level1/html/HTMLSelectElement03.xml.kfail +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - -HTMLSelectElement03 -NIST - - The selectedIndex attribute specifies the ordinal index of the selected - option. If no element is selected -1 is returned. - - Retrieve the selectedIndex attribute from the second SELECT element and - examine its value. - - Per http://www.w3.org/TR/html401/interact/forms.html#h-17.6.1, - without an explicit selected attribute, user agent behavior is - undefined. There is no way to coerce no option to be selected. - -Mary Brady -2002-02-22 - - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLSelectElement04.xml b/test/testcases/tests/level1/html/HTMLSelectElement04.xml new file mode 100644 index 0000000..11ff6ee --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLSelectElement04.xml @@ -0,0 +1,43 @@ + + + + + + + +HTMLSelectElement04 +NIST + + The value attribute specifies the current form control value. + + Retrieve the value attribute from the first SELECT element and + examine its value. + +Mary Brady +2002-02-22 + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLSelectElement04.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement04.xml.kfail deleted file mode 100644 index 11ff6ee..0000000 --- a/test/testcases/tests/level1/html/HTMLSelectElement04.xml.kfail +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - -HTMLSelectElement04 -NIST - - The value attribute specifies the current form control value. - - Retrieve the value attribute from the first SELECT element and - examine its value. - -Mary Brady -2002-02-22 - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLSelectElement05.xml b/test/testcases/tests/level1/html/HTMLSelectElement05.xml new file mode 100644 index 0000000..16c78e1 --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLSelectElement05.xml @@ -0,0 +1,43 @@ + + + + + + + +HTMLSelectElement05 +NIST + + The length attribute specifies the number of options in this select. + + Retrieve the length attribute from the first SELECT element and + examine its value. + +Mary Brady +2002-02-22 + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLSelectElement05.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement05.xml.kfail deleted file mode 100644 index 16c78e1..0000000 --- a/test/testcases/tests/level1/html/HTMLSelectElement05.xml.kfail +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - -HTMLSelectElement05 -NIST - - The length attribute specifies the number of options in this select. - - Retrieve the length attribute from the first SELECT element and - examine its value. - -Mary Brady -2002-02-22 - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLSelectElement06.xml b/test/testcases/tests/level1/html/HTMLSelectElement06.xml new file mode 100644 index 0000000..8ff66a0 --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLSelectElement06.xml @@ -0,0 +1,45 @@ + + + + + + + +HTMLSelectElement06 +NIST + + The form attribute returns the FORM element containing this control. + + Retrieve the form attribute from the first SELECT element + and examine its value. + +Mary Brady +2002-02-22 + + + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLSelectElement06.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement06.xml.kfail deleted file mode 100644 index 8ff66a0..0000000 --- a/test/testcases/tests/level1/html/HTMLSelectElement06.xml.kfail +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - -HTMLSelectElement06 -NIST - - The form attribute returns the FORM element containing this control. - - Retrieve the form attribute from the first SELECT element - and examine its value. - -Mary Brady -2002-02-22 - - - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLSelectElement07.xml b/test/testcases/tests/level1/html/HTMLSelectElement07.xml new file mode 100644 index 0000000..218b9d6 --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLSelectElement07.xml @@ -0,0 +1,44 @@ + + + + + + + +HTMLSelectElement07 +NIST + + The form attribute returns null if control in not within the context of + a form. + + Retrieve the second SELECT element and + examine its form element. + +Mary Brady +2002-02-22 + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLSelectElement07.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement07.xml.kfail deleted file mode 100644 index 218b9d6..0000000 --- a/test/testcases/tests/level1/html/HTMLSelectElement07.xml.kfail +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - -HTMLSelectElement07 -NIST - - The form attribute returns null if control in not within the context of - a form. - - Retrieve the second SELECT element and - examine its form element. - -Mary Brady -2002-02-22 - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLSelectElement08.xml b/test/testcases/tests/level1/html/HTMLSelectElement08.xml new file mode 100644 index 0000000..12593fe --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLSelectElement08.xml @@ -0,0 +1,59 @@ + + + + + + + +HTMLSelectElement08 +NIST + + The options attribute returns a collection of OPTION elements contained + by this element. + + Retrieve the options attribute from the first SELECT element and + examine the items of the returned collection. + +Mary Brady +2002-02-22 + + + + + + + + + + + +"option" +"option" +"option" +"option" +"option" + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLSelectElement08.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement08.xml.kfail deleted file mode 100644 index 12593fe..0000000 --- a/test/testcases/tests/level1/html/HTMLSelectElement08.xml.kfail +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - -HTMLSelectElement08 -NIST - - The options attribute returns a collection of OPTION elements contained - by this element. - - Retrieve the options attribute from the first SELECT element and - examine the items of the returned collection. - -Mary Brady -2002-02-22 - - - - - - - - - - - -"option" -"option" -"option" -"option" -"option" - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLSelectElement09.xml b/test/testcases/tests/level1/html/HTMLSelectElement09.xml new file mode 100644 index 0000000..382510d --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLSelectElement09.xml @@ -0,0 +1,44 @@ + + + + + + + +HTMLSelectElement09 +NIST + + The disabled attribute indicates that this control is not available + within this context. + + Retrieve the disabled attribute from the third SELECT element + and examine its value. + +Mary Brady +2002-02-22 + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLSelectElement09.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement09.xml.kfail deleted file mode 100644 index 382510d..0000000 --- a/test/testcases/tests/level1/html/HTMLSelectElement09.xml.kfail +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - -HTMLSelectElement09 -NIST - - The disabled attribute indicates that this control is not available - within this context. - - Retrieve the disabled attribute from the third SELECT element - and examine its value. - -Mary Brady -2002-02-22 - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLSelectElement10.xml b/test/testcases/tests/level1/html/HTMLSelectElement10.xml new file mode 100644 index 0000000..b9f5762 --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLSelectElement10.xml @@ -0,0 +1,44 @@ + + + + + + + +HTMLSelectElement10 +NIST + + The multiple attribute(if true) indicates that multiple OPTION elements + may be selected + + Retrieve the multiple attribute from the first SELECT element + and examine its value. + +Mary Brady +2002-02-22 + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLSelectElement10.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement10.xml.kfail deleted file mode 100644 index b9f5762..0000000 --- a/test/testcases/tests/level1/html/HTMLSelectElement10.xml.kfail +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - -HTMLSelectElement10 -NIST - - The multiple attribute(if true) indicates that multiple OPTION elements - may be selected - - Retrieve the multiple attribute from the first SELECT element - and examine its value. - -Mary Brady -2002-02-22 - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLSelectElement11.xml b/test/testcases/tests/level1/html/HTMLSelectElement11.xml new file mode 100644 index 0000000..ebb4d1b --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLSelectElement11.xml @@ -0,0 +1,44 @@ + + + + + + + +HTMLSelectElement11 +NIST + + The name attribute specifies the form control or object name when + submitted with a form. + + Retrieve the name attribute from the first SELECT element and + examine its value. + +Mary Brady +2002-02-22 + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLSelectElement11.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement11.xml.kfail deleted file mode 100644 index ebb4d1b..0000000 --- a/test/testcases/tests/level1/html/HTMLSelectElement11.xml.kfail +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - -HTMLSelectElement11 -NIST - - The name attribute specifies the form control or object name when - submitted with a form. - - Retrieve the name attribute from the first SELECT element and - examine its value. - -Mary Brady -2002-02-22 - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLSelectElement12.xml b/test/testcases/tests/level1/html/HTMLSelectElement12.xml new file mode 100644 index 0000000..5559f5d --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLSelectElement12.xml @@ -0,0 +1,43 @@ + + + + + + + +HTMLSelectElement12 +NIST + + The size attribute specifies the number of visible rows. + + Retrieve the size attribute from the first SELECT element and + examine its value. + +Mary Brady +2002-02-22 + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLSelectElement12.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement12.xml.kfail deleted file mode 100644 index 5559f5d..0000000 --- a/test/testcases/tests/level1/html/HTMLSelectElement12.xml.kfail +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - -HTMLSelectElement12 -NIST - - The size attribute specifies the number of visible rows. - - Retrieve the size attribute from the first SELECT element and - examine its value. - -Mary Brady -2002-02-22 - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLSelectElement13.xml b/test/testcases/tests/level1/html/HTMLSelectElement13.xml new file mode 100644 index 0000000..2c0aafb --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLSelectElement13.xml @@ -0,0 +1,44 @@ + + + + + + + +HTMLSelectElement13 +NIST + + The tabIndex attribute specifies an index that represents the elements + position in the tabbing order. + + Retrieve the tabIndex attribute from the first SELECT element and + examine its value. + +Mary Brady +2002-02-22 + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLSelectElement13.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement13.xml.kfail deleted file mode 100644 index 2c0aafb..0000000 --- a/test/testcases/tests/level1/html/HTMLSelectElement13.xml.kfail +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - -HTMLSelectElement13 -NIST - - The tabIndex attribute specifies an index that represents the elements - position in the tabbing order. - - Retrieve the tabIndex attribute from the first SELECT element and - examine its value. - -Mary Brady -2002-02-22 - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLSelectElement14.xml b/test/testcases/tests/level1/html/HTMLSelectElement14.xml new file mode 100644 index 0000000..df22987 --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLSelectElement14.xml @@ -0,0 +1,37 @@ + + + + + + + +HTMLSelectElement14 +Curt Arnold + +focus should give the select element input focus. + +2004-03-18 + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLSelectElement14.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement14.xml.kfail deleted file mode 100644 index df22987..0000000 --- a/test/testcases/tests/level1/html/HTMLSelectElement14.xml.kfail +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - -HTMLSelectElement14 -Curt Arnold - -focus should give the select element input focus. - -2004-03-18 - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLSelectElement15.xml b/test/testcases/tests/level1/html/HTMLSelectElement15.xml new file mode 100644 index 0000000..dcc2f6d --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLSelectElement15.xml @@ -0,0 +1,37 @@ + + + + + + + +HTMLSelectElement15 +Curt Arnold + +blur should surrender input focus. + +2004-03-18 + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLSelectElement15.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement15.xml.kfail deleted file mode 100644 index dcc2f6d..0000000 --- a/test/testcases/tests/level1/html/HTMLSelectElement15.xml.kfail +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - -HTMLSelectElement15 -Curt Arnold - -blur should surrender input focus. - -2004-03-18 - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLSelectElement17.xml b/test/testcases/tests/level1/html/HTMLSelectElement17.xml new file mode 100644 index 0000000..03549ff --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLSelectElement17.xml @@ -0,0 +1,43 @@ + + + + + + + +HTMLSelectElement17 +Curt Arnold + +Removes a non-existant option using HTMLSelectElement.remove. + +2004-03-18 + + + + + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLSelectElement17.xml.kfail b/test/testcases/tests/level1/html/HTMLSelectElement17.xml.kfail deleted file mode 100644 index 03549ff..0000000 --- a/test/testcases/tests/level1/html/HTMLSelectElement17.xml.kfail +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - -HTMLSelectElement17 -Curt Arnold - -Removes a non-existant option using HTMLSelectElement.remove. - -2004-03-18 - - - - - - - - - - - - - - - - - diff --git a/test/testutils/foreach.c b/test/testutils/foreach.c index 764920c..bbc8a47 100644 --- a/test/testutils/foreach.c +++ b/test/testutils/foreach.c @@ -34,6 +34,11 @@ void foreach_initialise_domnamednodemap(dom_namednodemap *map, unsigned int *ite *iterator = 0; } +void foreach_initialise_domhtmlcollection(dom_html_collection *coll, unsigned int *iterator) +{ + (void)coll; + *iterator = 0; +} bool _get_next_domnodelist(dom_nodelist *list, unsigned int *iterator, dom_node **ret) { @@ -97,3 +102,24 @@ bool _get_next_domnamednodemap(dom_namednodemap *map, unsigned int *iterator, do return true; } + +bool _get_next_domhtmlcollection(dom_html_collection *coll, unsigned int *iterator, dom_node **ret) +{ + dom_exception err; + unsigned long len; + + err = dom_html_collection_get_length(coll, &len); + if (err != DOM_NO_ERR) + return false; + + if (*iterator >= len) + return false; + + err = dom_html_collection_item(coll, (*iterator), ret); + if (err != DOM_NO_ERR) + return false; + + (*iterator)++; + + return true; +} diff --git a/test/testutils/foreach.h b/test/testutils/foreach.h index 75874bc..aa9543d 100644 --- a/test/testutils/foreach.h +++ b/test/testutils/foreach.h @@ -26,6 +26,7 @@ void foreach_initialise_domnodelist(dom_nodelist *list, unsigned int *iterator); void foreach_initialise_list(list *list, unsigned int *iterator); void foreach_initialise_domnamednodemap(dom_namednodemap *map, unsigned int *iterator); +void foreach_initialise_domhtmlcollection(dom_html_collection *coll, unsigned int *iterator); bool _get_next_domnodelist(dom_nodelist *list, unsigned int *iterator, dom_node **ret); #define get_next_domnodelist(l, i, r) _get_next_domnodelist( \ @@ -37,5 +38,8 @@ bool _get_next_domnamednodemap(dom_namednodemap *map, unsigned int *iterator, do #define get_next_domnamednodemap(m, i, r) _get_next_domnamednodemap( \ (dom_namednodemap *) (m), (unsigned int *) (i), (dom_node **) (r)) +bool _get_next_domhtmlcollection(dom_html_collection *coll, unsigned int *iterator, dom_node **ret); +#define get_next_domhtmlcollection(c, i, r) _get_next_domhtmlcollection( \ + (dom_html_collection *) (c), (unsigned int *) (i), (dom_node **) (r)) #endif -- cgit v1.2.3