mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-17 12:47:30 +09:00
Bug 1344642 - Part 2: Add a new pref for input type=week, month and datetime-local
This commit is contained in:
parent
36d469a74f
commit
5622e56123
6 changed files with 73 additions and 24 deletions
|
|
@ -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>'
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue