b=450088 backing out (new reftest failed)
[wine-gecko.git] / testing / mochitest / tests / test_bug359754.xul
blob34c93d74a64da8b35caa5f5d037c88b59b209de2
1 <?xml version="1.0"?>
2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
3 <?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
4 <!--
5 https://bugzilla.mozilla.org/show_bug.cgi?id=359754
6 -->
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>
17 <p id="display"></p>
18 <div id="content" style="display: none">
20 </div>
21 </body>
23 <description>
24 Displays a numberbox which ranges from 5 to 10.
25 </description>
27 <textbox id="foo" type="number" min="5" max="10"/>
30 <script class="testbody" type="application/javascript">
32 function hitIt() {
33 sendKey("up", "foo");
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");
45 hitIt();
46 is($("foo").value, "6", "value is now 6");
48 hitIt();
49 is($("foo").value, "7", "value is now 7");
51 hitIt();
52 is($("foo").value, "8", "value is now 8");
54 hitIt();
55 is($("foo").value, "9", "value is now 9");
57 // now try to hit it past max
58 hitIt();
59 is($("foo").value, "10", "value is now 10");
61 hitIt();
62 is($("foo").value, "10", "value is now 10");
64 hitIt();
65 is($("foo").value, "10", "value is now 10");
67 });
69 addLoadEvent(SimpleTest.finish);
70 </script>
72 </window>