2 <?xml-stylesheet href=
"chrome://global/skin" type=
"text/css"?>
3 <?xml-stylesheet href=
"/tests/SimpleTest/test.css" type=
"text/css"?>
5 https://bugzilla.mozilla.org/show_bug.cgi?id=359754
7 <window title=
"Mozilla Bug 359754"
8 xmlns:
html=
"http://www.w3.org/1999/xhtml"
9 xmlns=
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
11 <script type=
"application/javascript" src=
"/MochiKit/packed.js"></script>
12 <script type=
"application/javascript" src=
"/tests/SimpleTest/SimpleTest.js"></script>
13 <script type=
"application/javascript" src=
"/tests/SimpleTest/EventUtils.js"></script>
15 <body xmlns=
"http://www.w3.org/1999/xhtml">
16 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=359754">Mozilla Bug
359754</a>
18 <div id=
"content" style=
"display: none">
24 Displays a numberbox which ranges from
5 to
10.
27 <textbox id=
"foo" type=
"number" min=
"5" max=
"10"/>
30 <script class=
"testbody" type=
"application/javascript">
36 SimpleTest.waitForExplicitFinish();
38 /** Test for Bug
359754 **/
39 setTimeout('document.getElementById(
"foo").focus()',
0);
40 addLoadEvent(function() {
42 // pay attention to our key events
43 netscape.security.PrivilegeManager.enablePrivilege(
"UniversalXPConnect");
46 is($(
"foo").value,
"6",
"value is now 6");
49 is($(
"foo").value,
"7",
"value is now 7");
52 is($(
"foo").value,
"8",
"value is now 8");
55 is($(
"foo").value,
"9",
"value is now 9");
57 // now try to hit it past max
59 is($(
"foo").value,
"10",
"value is now 10");
62 is($(
"foo").value,
"10",
"value is now 10");
65 is($(
"foo").value,
"10",
"value is now 10");
69 addLoadEvent(SimpleTest.finish);