From 7f45b928469c5225c45ef5efb784ad7392024c6d Mon Sep 17 00:00:00 2001 From: rsk1994 Date: Wed, 4 Jun 2014 21:47:18 +0530 Subject: Missed inputElement Test files && bubbling and cancelability of generic events & buttonElement tests --- src/html/TODO | 4 +- src/html/html_anchor_element.c | 12 ++--- src/html/html_text_area_element.c | 16 +++--- .../tests/level1/html/HTMLOptionElement05.xml | 44 +++++++++++++++ test/testcases/tests/level1/html/button01.xml | 39 ++++++++++++++ .../tests/level1/html/button01.xml.notimpl | 39 -------------- test/testcases/tests/level1/html/button02.xml | 42 +++++++++++++++ .../tests/level1/html/button02.xml.notimpl | 42 --------------- test/testcases/tests/level1/html/button03.xml | 42 +++++++++++++++ .../tests/level1/html/button03.xml.notimpl | 42 --------------- test/testcases/tests/level1/html/button04.xml | 42 +++++++++++++++ .../tests/level1/html/button04.xml.notimpl | 42 --------------- test/testcases/tests/level1/html/button05.xml | 40 ++++++++++++++ .../tests/level1/html/button05.xml.notimpl | 40 -------------- test/testcases/tests/level1/html/button06.xml | 40 ++++++++++++++ .../tests/level1/html/button06.xml.notimpl | 40 -------------- test/testcases/tests/level1/html/button07.xml | 40 ++++++++++++++ .../tests/level1/html/button07.xml.notimpl | 40 -------------- test/testcases/tests/level1/html/button08.xml | 40 ++++++++++++++ .../tests/level1/html/button08.xml.notimpl | 40 -------------- test/testcases/tests/level1/html/button09.xml | 40 ++++++++++++++ .../tests/level1/html/button09.xml.notimpl | 40 -------------- test/testcases/tests/level2/html/files/input.html | 60 +++++++++++++++++++++ test/testcases/tests/level2/html/files/input.xhtml | 62 ++++++++++++++++++++++ test/testcases/tests/level2/html/files/input.xml | 62 ++++++++++++++++++++++ 25 files changed, 609 insertions(+), 381 deletions(-) create mode 100644 test/testcases/tests/level1/html/HTMLOptionElement05.xml create mode 100644 test/testcases/tests/level1/html/button01.xml delete mode 100644 test/testcases/tests/level1/html/button01.xml.notimpl create mode 100644 test/testcases/tests/level1/html/button02.xml delete mode 100644 test/testcases/tests/level1/html/button02.xml.notimpl create mode 100644 test/testcases/tests/level1/html/button03.xml delete mode 100644 test/testcases/tests/level1/html/button03.xml.notimpl create mode 100644 test/testcases/tests/level1/html/button04.xml delete mode 100644 test/testcases/tests/level1/html/button04.xml.notimpl create mode 100644 test/testcases/tests/level1/html/button05.xml delete mode 100644 test/testcases/tests/level1/html/button05.xml.notimpl create mode 100644 test/testcases/tests/level1/html/button06.xml delete mode 100644 test/testcases/tests/level1/html/button06.xml.notimpl create mode 100644 test/testcases/tests/level1/html/button07.xml delete mode 100644 test/testcases/tests/level1/html/button07.xml.notimpl create mode 100644 test/testcases/tests/level1/html/button08.xml delete mode 100644 test/testcases/tests/level1/html/button08.xml.notimpl create mode 100644 test/testcases/tests/level1/html/button09.xml delete mode 100644 test/testcases/tests/level1/html/button09.xml.notimpl create mode 100644 test/testcases/tests/level2/html/files/input.html create mode 100644 test/testcases/tests/level2/html/files/input.xhtml create mode 100644 test/testcases/tests/level2/html/files/input.xml diff --git a/src/html/TODO b/src/html/TODO index e7d4853..183f10d 100644 --- a/src/html/TODO +++ b/src/html/TODO @@ -15,8 +15,8 @@ HTMLFormElement html_form_element DONE HTMLSelectElement html_select_element DONE HTMLOptGroupElement html_optgroup_element DONE HTMLOptionElement html_option_element DONE -HTMLInputElement html_input_element DONE -HTMLTextAreaElement html_textarea_element MISSING +HTMLInputElement html_input_element MISSING +HTMLTextAreaElement html_textarea_element DONE HTMLButtonElement html_button_element MISSING HTMLLabelElement html_label_element DONE HTMLFieldSetElement html_fieldset_element DONE diff --git a/src/html/html_anchor_element.c b/src/html/html_anchor_element.c index a215900..77f8cef 100644 --- a/src/html/html_anchor_element.c +++ b/src/html/html_anchor_element.c @@ -198,11 +198,11 @@ dom_exception dom_html_anchor_element_blur(dom_html_anchor_element *ele) bool success = false; assert(doc != NULL); - /** \todo Is this event (a) default (b) bubbling and (c) cancelable? */ + /* This event does not bubble & is non-cancelable. Mentioned in w3 specs. More research is needed to prove why. */ return _dom_dispatch_generic_event((dom_document *) doc, (dom_event_target *) ele, - doc->memoised[hds_blur], true, - true, &success); + doc->memoised[hds_blur], false, + false, &success); } /** @@ -218,10 +218,10 @@ dom_exception dom_html_anchor_element_focus(dom_html_anchor_element *ele) bool success = false; assert(doc != NULL); - /** \todo Is this event (a) default (b) bubbling and (c) cancelable? */ + /* This event does not bubble & is non-cancelable. Mentioned in w3 specs. More research is needed to prove why. */ return _dom_dispatch_generic_event((dom_document *)doc, (dom_event_target *) ele, - doc->memoised[hds_focus], true, - true, &success); + doc->memoised[hds_focus], false, + false, &success); } diff --git a/src/html/html_text_area_element.c b/src/html/html_text_area_element.c index eea5b4e..ac90a76 100644 --- a/src/html/html_text_area_element.c +++ b/src/html/html_text_area_element.c @@ -438,11 +438,11 @@ dom_exception dom_html_text_area_element_blur(dom_html_text_area_element *ele) bool success = false; assert(doc != NULL); - /** \todo Is this event (a) default (b) bubbling and (c) cancelable? */ + /* This event does not bubble & is Non-cancellable. Mentioned in w3 specs. More research is needed to prove why. */ return _dom_dispatch_generic_event((dom_document *) doc, (dom_event_target *) ele, - doc->memoised[hds_blur], true, - true, &success); + doc->memoised[hds_blur], false, + false, &success); } /** @@ -458,11 +458,11 @@ dom_exception dom_html_text_area_element_focus(dom_html_text_area_element *ele) bool success = false; assert(doc != NULL); - /** \todo Is this event (a) default (b) bubbling and (c) cancelable? */ + /* This event does not bubble & is Non-cancellable. Mentioned in w3 specs. More research is needed to prove why. */ return _dom_dispatch_generic_event((dom_document *)doc, (dom_event_target *) ele, - doc->memoised[hds_focus], true, - true, &success); + doc->memoised[hds_focus], false, + false, &success); } /** @@ -478,9 +478,9 @@ dom_exception dom_html_text_area_element_select(dom_html_text_area_element *ele) bool success = false; assert(doc != NULL); - /** \todo Is this event (a) default (b) bubbling and (c) cancelable? */ + /* This event bubbles & is non-cancelable. Mentioned in w3 specs. More research is needed to prove why. */ return _dom_dispatch_generic_event((dom_document *)doc, (dom_event_target *) ele, doc->memoised[hds_select], true, - true, &success); + false, &success); } diff --git a/test/testcases/tests/level1/html/HTMLOptionElement05.xml b/test/testcases/tests/level1/html/HTMLOptionElement05.xml new file mode 100644 index 0000000..46812a1 --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLOptionElement05.xml @@ -0,0 +1,44 @@ + + + + + + + +HTMLOptionElement05 +NIST + + The index attribute indicates th index of this OPTION in ints parent + SELECT. + + Retrieve the index attribute from the seventh OPTION element + and examine its value. + +Mary Brady +2002-02-22 + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/button01.xml b/test/testcases/tests/level1/html/button01.xml new file mode 100644 index 0000000..f128ea8 --- /dev/null +++ b/test/testcases/tests/level1/html/button01.xml @@ -0,0 +1,39 @@ + + + + + + +button01 +Netscape + +Returns the FORM element containing this control. Returns null if this control is not within the context of a form. + +Sivakiran Tummala +2002-03-09 + + + + + + + + + + +
+ + diff --git a/test/testcases/tests/level1/html/button01.xml.notimpl b/test/testcases/tests/level1/html/button01.xml.notimpl deleted file mode 100644 index f128ea8..0000000 --- a/test/testcases/tests/level1/html/button01.xml.notimpl +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - -button01 -Netscape - -Returns the FORM element containing this control. Returns null if this control is not within the context of a form. - -Sivakiran Tummala -2002-03-09 - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/button02.xml b/test/testcases/tests/level1/html/button02.xml new file mode 100644 index 0000000..bd072ef --- /dev/null +++ b/test/testcases/tests/level1/html/button02.xml @@ -0,0 +1,42 @@ + + + + + + +button02 +Netscape + +The value of attribute name of the form element which contains this button is read and checked against the expected value. + +Sivakiran Tummala +2002-03-09 + + + + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/button02.xml.notimpl b/test/testcases/tests/level1/html/button02.xml.notimpl deleted file mode 100644 index bd072ef..0000000 --- a/test/testcases/tests/level1/html/button02.xml.notimpl +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - -button02 -Netscape - -The value of attribute name of the form element which contains this button is read and checked against the expected value. - -Sivakiran Tummala -2002-03-09 - - - - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/button03.xml b/test/testcases/tests/level1/html/button03.xml new file mode 100644 index 0000000..4074059 --- /dev/null +++ b/test/testcases/tests/level1/html/button03.xml @@ -0,0 +1,42 @@ + + + + + + +button03 +Netscape + +The value of attribute action of the form element which contains this button is read and checked against the expected value + +Sivakiran Tummala +2002-03-09 + + + + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/button03.xml.notimpl b/test/testcases/tests/level1/html/button03.xml.notimpl deleted file mode 100644 index 4074059..0000000 --- a/test/testcases/tests/level1/html/button03.xml.notimpl +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - -button03 -Netscape - -The value of attribute action of the form element which contains this button is read and checked against the expected value - -Sivakiran Tummala -2002-03-09 - - - - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/button04.xml b/test/testcases/tests/level1/html/button04.xml new file mode 100644 index 0000000..737ddaa --- /dev/null +++ b/test/testcases/tests/level1/html/button04.xml @@ -0,0 +1,42 @@ + + + + + + +button04 +Netscape + +The value of attribute method of the form element which contains this button is read and checked against the expected value + +Sivakiran Tummala +2002-03-09 + + + + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/button04.xml.notimpl b/test/testcases/tests/level1/html/button04.xml.notimpl deleted file mode 100644 index 737ddaa..0000000 --- a/test/testcases/tests/level1/html/button04.xml.notimpl +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - -button04 -Netscape - -The value of attribute method of the form element which contains this button is read and checked against the expected value - -Sivakiran Tummala -2002-03-09 - - - - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/button05.xml b/test/testcases/tests/level1/html/button05.xml new file mode 100644 index 0000000..ecff6b5 --- /dev/null +++ b/test/testcases/tests/level1/html/button05.xml @@ -0,0 +1,40 @@ + + + + + + +button05 +Netscape + +A single character access key to give access to the form control. +The value of attribute accessKey of the button element is read and checked against the expected value. + +Sivakiran Tummala +2002-03-09 + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/button05.xml.notimpl b/test/testcases/tests/level1/html/button05.xml.notimpl deleted file mode 100644 index ecff6b5..0000000 --- a/test/testcases/tests/level1/html/button05.xml.notimpl +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - -button05 -Netscape - -A single character access key to give access to the form control. -The value of attribute accessKey of the button element is read and checked against the expected value. - -Sivakiran Tummala -2002-03-09 - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/button06.xml b/test/testcases/tests/level1/html/button06.xml new file mode 100644 index 0000000..7a5e558 --- /dev/null +++ b/test/testcases/tests/level1/html/button06.xml @@ -0,0 +1,40 @@ + + + + + + +button06 +Netscape + +Index that represents the element's position in the tabbing order. +The value of attribute tabIndex of the button element is read and checked against the expected value. + +Sivakiran Tummala +2002-03-09 + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/button06.xml.notimpl b/test/testcases/tests/level1/html/button06.xml.notimpl deleted file mode 100644 index 7a5e558..0000000 --- a/test/testcases/tests/level1/html/button06.xml.notimpl +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - -button06 -Netscape - -Index that represents the element's position in the tabbing order. -The value of attribute tabIndex of the button element is read and checked against the expected value. - -Sivakiran Tummala -2002-03-09 - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/button07.xml b/test/testcases/tests/level1/html/button07.xml new file mode 100644 index 0000000..daddf76 --- /dev/null +++ b/test/testcases/tests/level1/html/button07.xml @@ -0,0 +1,40 @@ + + + + + + +button07 +Netscape + +The type of button +The value of attribute type of the button element is read and checked against the expected value. + +Sivakiran Tummala +2002-03-09 + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/button07.xml.notimpl b/test/testcases/tests/level1/html/button07.xml.notimpl deleted file mode 100644 index daddf76..0000000 --- a/test/testcases/tests/level1/html/button07.xml.notimpl +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - -button07 -Netscape - -The type of button -The value of attribute type of the button element is read and checked against the expected value. - -Sivakiran Tummala -2002-03-09 - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/button08.xml b/test/testcases/tests/level1/html/button08.xml new file mode 100644 index 0000000..a4dbb0b --- /dev/null +++ b/test/testcases/tests/level1/html/button08.xml @@ -0,0 +1,40 @@ + + + + + + +button08 +Netscape + +The control is unavailable in this context. +The boolean value of attribute disabled of the button element is read and checked against the expected value. + +Sivakiran Tummala +2002-03-09 + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/button08.xml.notimpl b/test/testcases/tests/level1/html/button08.xml.notimpl deleted file mode 100644 index a4dbb0b..0000000 --- a/test/testcases/tests/level1/html/button08.xml.notimpl +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - -button08 -Netscape - -The control is unavailable in this context. -The boolean value of attribute disabled of the button element is read and checked against the expected value. - -Sivakiran Tummala -2002-03-09 - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/button09.xml b/test/testcases/tests/level1/html/button09.xml new file mode 100644 index 0000000..d0efa94 --- /dev/null +++ b/test/testcases/tests/level1/html/button09.xml @@ -0,0 +1,40 @@ + + + + + + +button09 +Netscape + +The current form control value. +The value of attribute value of the button element is read and checked against the expected value. + +Sivakiran Tummala +2002-03-09 + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/button09.xml.notimpl b/test/testcases/tests/level1/html/button09.xml.notimpl deleted file mode 100644 index d0efa94..0000000 --- a/test/testcases/tests/level1/html/button09.xml.notimpl +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - -button09 -Netscape - -The current form control value. -The value of attribute value of the button element is read and checked against the expected value. - -Sivakiran Tummala -2002-03-09 - - - - - - - - - - - - - diff --git a/test/testcases/tests/level2/html/files/input.html b/test/testcases/tests/level2/html/files/input.html new file mode 100644 index 0000000..c36e87d --- /dev/null +++ b/test/testcases/tests/level2/html/files/input.html @@ -0,0 +1,60 @@ + + + + +NIST DOM HTML Test - INPUT + + + + + + +
Under a FORM control + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ReHire +
+NewHire +
Hours available to work +EarlyMornings +
+Afternoon +
+Evenings +
+Closing +
+
+ +
+ +
+ +
+ + diff --git a/test/testcases/tests/level2/html/files/input.xhtml b/test/testcases/tests/level2/html/files/input.xhtml new file mode 100644 index 0000000..b7704ad --- /dev/null +++ b/test/testcases/tests/level2/html/files/input.xhtml @@ -0,0 +1,62 @@ + + + + +NIST DOM HTML Test - INPUT + + + + + + +
Under a FORM control +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ +
Hours available to work + +
+ +
+ +
+ +
+
+ +
+ +
+
+
+ + diff --git a/test/testcases/tests/level2/html/files/input.xml b/test/testcases/tests/level2/html/files/input.xml new file mode 100644 index 0000000..b7704ad --- /dev/null +++ b/test/testcases/tests/level2/html/files/input.xml @@ -0,0 +1,62 @@ + + + + +NIST DOM HTML Test - INPUT + + + + + + +
Under a FORM control +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ +
Hours available to work + +
+ +
+ +
+ +
+
+ +
+ +
+
+
+ + -- cgit v1.2.3