mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-09-09 04:54:33 +00:00
44 lines
1.5 KiB
HTML
44 lines
1.5 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<!--
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=764481
|
|
-->
|
|
<head>
|
|
<title>Test for Bug 764481</title>
|
|
<script type="application/javascript" src="/MochiKit/packed.js"></script>
|
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
</head>
|
|
<body>
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=764481">Mozilla Bug 764481</a>
|
|
<p id="display"></p>
|
|
<div id="content" style="display: none" >
|
|
</div>
|
|
<pre id="test">
|
|
<script type="application/javascript">
|
|
|
|
var input = document.createElement("input");
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
SpecialPowers.pushPrefEnv({'set': [["dom.experimental_forms", false]]}, function() {
|
|
input.type = "date";
|
|
is(input.type, "text", "input type shouldn't be date when the experimental forms are disabled");
|
|
is(input.getAttribute('type'), "date", "input 'type' attribute should not change");
|
|
|
|
SpecialPowers.pushPrefEnv({'set': [["dom.experimental_forms",true]]}, function() {
|
|
// Change the type of input to text and then back to date,
|
|
// so that HTMLInputElement::ParseAttribute gets called with the pref enabled.
|
|
input.type = "text";
|
|
input.type = "date";
|
|
is(input.type, "date", "input type should be date when the experimental forms are enabled");
|
|
is(input.getAttribute('type'), "date", "input 'type' attribute should not change");
|
|
|
|
SimpleTest.finish();
|
|
});
|
|
});
|
|
|
|
</script>
|
|
</pre>
|
|
</body>
|
|
</html>
|