gecko-dev/dom/html/test/forms/xbl
Timothy Guan-tin Chien 80827187fc Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley
Part I of bug 1496242 was not implemented correctly as it accesses the
nsIDateTimeInputArea methods directly on the <datetimebox> element object.
This won't work because the XBL binding is run in a non-chrome scope.
The methods it implemented are exposed thus had to be accessed via
wrappedJSObject.

Object pass to setValueFromPicker() therefore has to clone into the content scope.

We can be sure that the methods called are implemented by the XBL binding,
because the web content should not have access to <datetimebox>, which is a NAC.

A small clean-up is included in the patch also, removing the useless 3rd argument
to the CustomEvent constructor.

Tests related to the datetime input is duplicated and run with UA Widget disabled
to ensure the XBL binding continue to work.

Differential Revision: https://phabricator.services.mozilla.com/D10947

--HG--
rename : dom/html/test/forms/chrome.ini => dom/html/test/forms/xbl/chrome.ini
rename : dom/html/test/forms/mochitest.ini => dom/html/test/forms/xbl/mochitest.ini
rename : dom/html/test/forms/test_autocompleteinfo.html => dom/html/test/forms/xbl/test_autocompleteinfo.html
rename : dom/html/test/forms/test_input_attributes_reflection.html => dom/html/test/forms/xbl/test_input_attributes_reflection.html
rename : dom/html/test/forms/test_input_date_bad_input.html => dom/html/test/forms/xbl/test_input_date_bad_input.html
rename : dom/html/test/forms/test_input_date_key_events.html => dom/html/test/forms/xbl/test_input_date_key_events.html
rename : dom/html/test/forms/test_input_datetime_focus_blur.html => dom/html/test/forms/xbl/test_input_datetime_focus_blur.html
rename : dom/html/test/forms/test_input_datetime_focus_blur_events.html => dom/html/test/forms/xbl/test_input_datetime_focus_blur_events.html
rename : dom/html/test/forms/test_input_datetime_focus_state.html => dom/html/test/forms/xbl/test_input_datetime_focus_state.html
rename : dom/html/test/forms/test_input_datetime_input_change_events.html => dom/html/test/forms/xbl/test_input_datetime_input_change_events.html
rename : dom/html/test/forms/test_input_datetime_tabindex.html => dom/html/test/forms/xbl/test_input_datetime_tabindex.html
rename : dom/html/test/forms/test_input_defaultValue.html => dom/html/test/forms/xbl/test_input_defaultValue.html
rename : dom/html/test/forms/test_input_sanitization.html => dom/html/test/forms/xbl/test_input_sanitization.html
rename : dom/html/test/forms/test_input_textarea_set_value_no_scroll.html => dom/html/test/forms/xbl/test_input_textarea_set_value_no_scroll.html
rename : dom/html/test/forms/test_input_time_key_events.html => dom/html/test/forms/xbl/test_input_time_key_events.html
rename : dom/html/test/forms/test_input_time_sec_millisec_field.html => dom/html/test/forms/xbl/test_input_time_sec_millisec_field.html
rename : dom/html/test/forms/test_input_types_pref.html => dom/html/test/forms/xbl/test_input_types_pref.html
rename : dom/html/test/forms/test_input_typing_sanitization.html => dom/html/test/forms/xbl/test_input_typing_sanitization.html
rename : dom/html/test/forms/test_label_input_controls.html => dom/html/test/forms/xbl/test_label_input_controls.html
rename : dom/html/test/forms/test_max_attribute.html => dom/html/test/forms/xbl/test_max_attribute.html
rename : dom/html/test/forms/test_min_attribute.html => dom/html/test/forms/xbl/test_min_attribute.html
rename : dom/html/test/forms/test_mozistextfield.html => dom/html/test/forms/xbl/test_mozistextfield.html
rename : dom/html/test/forms/test_novalidate_attribute.html => dom/html/test/forms/xbl/test_novalidate_attribute.html
rename : dom/html/test/forms/test_pattern_attribute.html => dom/html/test/forms/xbl/test_pattern_attribute.html
rename : dom/html/test/forms/test_required_attribute.html => dom/html/test/forms/xbl/test_required_attribute.html
rename : dom/html/test/forms/test_step_attribute.html => dom/html/test/forms/xbl/test_step_attribute.html
rename : dom/html/test/forms/test_stepup_stepdown.html => dom/html/test/forms/xbl/test_stepup_stepdown.html
rename : dom/html/test/forms/test_textarea_attributes_reflection.html => dom/html/test/forms/xbl/test_textarea_attributes_reflection.html
rename : dom/html/test/forms/test_validation.html => dom/html/test/forms/xbl/test_validation.html
rename : dom/html/test/forms/test_validation_not_in_doc.html => dom/html/test/forms/xbl/test_validation_not_in_doc.html
rename : dom/html/test/forms/test_valueAsDate_pref.html => dom/html/test/forms/xbl/test_valueAsDate_pref.html
rename : dom/html/test/forms/test_valueasdate_attribute.html => dom/html/test/forms/xbl/test_valueasdate_attribute.html
rename : dom/html/test/forms/test_valueasnumber_attribute.html => dom/html/test/forms/xbl/test_valueasnumber_attribute.html
rename : toolkit/content/tests/browser/browser_datetime_datepicker.js => toolkit/content/tests/browser/xbl/browser_datetime_datepicker.js
extra : moz-landing-system : lando
2018-11-13 22:02:08 +00:00
..
chrome.ini Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
mochitest.ini Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_autocompleteinfo.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_input_attributes_reflection.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_input_date_bad_input.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_input_date_key_events.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_input_datetime_focus_blur_events.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_input_datetime_focus_blur.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_input_datetime_focus_state.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_input_datetime_input_change_events.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_input_datetime_tabindex.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_input_defaultValue.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_input_sanitization.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_input_textarea_set_value_no_scroll.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_input_time_key_events.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_input_time_sec_millisec_field.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_input_types_pref.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_input_typing_sanitization.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_label_input_controls.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_max_attribute.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_min_attribute.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_mozistextfield.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_novalidate_attribute.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_pattern_attribute.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_required_attribute.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_step_attribute.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_stepup_stepdown.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_textarea_attributes_reflection.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_validation_not_in_doc.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_validation.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_valueasdate_attribute.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_valueAsDate_pref.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00
test_valueasnumber_attribute.html Bug 1504418 - Access to nsIDateTimeInputArea interface implemented by XBL from chrome via wrappedJSObject r=mconley 2018-11-13 22:02:08 +00:00