Bug 1005593 - Test keypress event for numbers on a number control input. r=ehsan
authorGiovanni Sferro <agi.novanta@gmail.com>
Wed, 07 May 2014 17:28:00 +0200
changeset 182128 135afc151b7544fdfc50cb66bcee64d3d332025e
parent 182127 86616594f0c96867f561146cfb51f46cdbd4fd39
child 182129 15680e55195c68c876414ca8521a546dd2292915
push id26748
push userryanvm@gmail.com
push dateThu, 08 May 2014 19:44:34 +0000
treeherdermozilla-central@4cafec48a1f0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs1005593
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1005593 - Test keypress event for numbers on a number control input. r=ehsan
content/html/content/test/forms/test_input_number_key_events.html
--- a/content/html/content/test/forms/test_input_number_key_events.html
+++ b/content/html/content/test/forms/test_input_number_key_events.html
@@ -227,14 +227,20 @@ function test() {
     // Same again:
     expectedVal = expectedValAfterKeyEvent(key, elem);
     synthesizeKey(key, {});
     is(elem.value, expectedVal, "Test repeat of " + key + " for number control");
 
     // Reset 'required' attribute:
     elem.removeAttribute("required");
   }
+
+  // Test that key events are correctly dispatched
+  elem.max = "";
+  elem.value = "";
+  sendString("7837281");
+  is(elem.value, "7837281", "Test keypress event dispatch for number control");
 }
 
 </script>
 </pre>
 </body>
 </html>