summaryrefslogtreecommitdiffstats
path: root/dom/html/test
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-15 14:52:09 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-15 14:52:09 +0200
commitc55addfa6422cd6fd3886f914b71139c4dd0edcc (patch)
tree2c5406fb382e855d74d939ff90d4d5b0fb50d316 /dom/html/test
parent054dde272820f12b4f3c60ee4c8b7ede47126aa6 (diff)
downloadUXP-c55addfa6422cd6fd3886f914b71139c4dd0edcc.tar
UXP-c55addfa6422cd6fd3886f914b71139c4dd0edcc.tar.gz
UXP-c55addfa6422cd6fd3886f914b71139c4dd0edcc.tar.lz
UXP-c55addfa6422cd6fd3886f914b71139c4dd0edcc.tar.xz
UXP-c55addfa6422cd6fd3886f914b71139c4dd0edcc.zip
Bug 1344642 - Part 2: Add a new pref for input type=week, month and datetime-local
Diffstat (limited to 'dom/html/test')
-rw-r--r--dom/html/test/forms/test_input_types_pref.html36
-rw-r--r--dom/html/test/forms/test_valueAsDate_pref.html16
2 files changed, 39 insertions, 13 deletions
diff --git a/dom/html/test/forms/test_input_types_pref.html b/dom/html/test/forms/test_input_types_pref.html
index 73c4d65ab..5279d6a2a 100644
--- a/dom/html/test/forms/test_input_types_pref.html
+++ b/dom/html/test/forms/test_input_types_pref.html
@@ -49,27 +49,51 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=764481
inputType: "date",
expectedType: "date"
}, {
- prefs: [["dom.forms.datetime", false]],
+ prefs: [["dom.experimental_forms", false], ["dom.forms.datetime", false]],
+ inputType: "time",
+ expectedType: "text"
+ }, {
+ prefs: [["dom.experimental_forms", true], ["dom.forms.datetime", false]],
+ inputType: "time",
+ expectedType: "time"
+ }, {
+ prefs: [["dom.experimental_forms", false], ["dom.forms.datetime", true]],
+ inputType: "time",
+ expectedType: "time"
+ }, {
+ prefs: [["dom.forms.datetime", false], ["dom.forms.datetime.others", false]],
+ inputType: "month",
+ expectedType: "text"
+ }, {
+ prefs: [["dom.forms.datetime", true], ["dom.forms.datetime.others", false]],
inputType: "month",
expectedType: "text"
}, {
- prefs: [["dom.forms.datetime", true]],
+ prefs: [["dom.forms.datetime", false], ["dom.forms.datetime.others", true]],
inputType: "month",
expectedType: "month"
}, {
- prefs: [["dom.forms.datetime", false]],
+ prefs: [["dom.forms.datetime", false], ["dom.forms.datetime.others", false]],
+ inputType: "week",
+ expectedType: "text"
+ }, {
+ prefs: [["dom.forms.datetime", true], ["dom.forms.datetime.others", false]],
inputType: "week",
expectedType: "text"
}, {
- prefs: [["dom.forms.datetime", true]],
+ prefs: [["dom.forms.datetime", false], ["dom.forms.datetime.others", true]],
inputType: "week",
expectedType: "week"
}, {
- prefs: [["dom.forms.datetime", false]],
+ prefs: [["dom.forms.datetime", false], ["dom.forms.datetime.others", false]],
+ inputType: "datetime-local",
+ expectedType: "text"
+ }, {
+ prefs: [["dom.forms.datetime", true], ["dom.forms.datetime.others", false]],
inputType: "datetime-local",
expectedType: "text"
}, {
- prefs: [["dom.forms.datetime", true]],
+ prefs: [["dom.forms.datetime", false], ["dom.forms.datetime.others", true]],
inputType: "datetime-local",
expectedType: "datetime-local"
}
diff --git a/dom/html/test/forms/test_valueAsDate_pref.html b/dom/html/test/forms/test_valueAsDate_pref.html
index 91e2e1bfc..0369980e4 100644
--- a/dom/html/test/forms/test_valueAsDate_pref.html
+++ b/dom/html/test/forms/test_valueAsDate_pref.html
@@ -12,11 +12,12 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=874640
/** Test for Bug 874640 **/
var states = [
- // dom.experimental_forms, dom.forms.datetime, expectedValueAsDate
- [ 'true', 'true', 'true' ],
- [ 'true', 'false', 'true' ],
- [ 'false', 'true', 'true' ],
- [ 'false', 'false', 'false' ],
+ // dom.experimental_forms, dom.forms.datetime, dom.forms.datetime.others, expectedValueAsDate
+ [ 'true', 'true', ,'true', 'true' ],
+ [ 'true', 'false', 'false', 'true' ],
+ [ 'false', 'true', 'false', 'true' ],
+ [ 'false', 'false', 'true', 'true' ],
+ [ 'false', 'false', 'false', 'false' ],
'end'
];
@@ -32,11 +33,12 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=874640
SpecialPowers.pushPrefEnv({"set":[
["dom.experimental_forms", state[0] === 'true'],
- ["dom.forms.datetime", state[1] === 'true']]},
+ ["dom.forms.datetime", state[1] === 'true'],
+ ["dom.forms.datetime.others", state[2] === 'true']]},
function() {
iframe.src = 'data:text/html,<script>' +
'parent.is("valueAsDate" in document.createElement("input"), ' +
- state[2] + ', "valueAsDate presence state should be ' + state[2] + '");' +
+ state[3] + ', "valueAsDate presence state should be ' + state[3] + '");' +
'<\/script>'
});
}