Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Unified Diff: LayoutTests/fast/forms/range/range-keyboard-oninput-event.html

Issue 178593003: Dispatch input event for Range element keyboard event (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/forms/range/range-keyboard-oninput-event-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/forms/range/range-keyboard-oninput-event.html
diff --git a/LayoutTests/fast/forms/range/range-keyboard-oninput-event.html b/LayoutTests/fast/forms/range/range-keyboard-oninput-event.html
new file mode 100644
index 0000000000000000000000000000000000000000..22ad1806131dae21f28eac2304376ef39b382099
--- /dev/null
+++ b/LayoutTests/fast/forms/range/range-keyboard-oninput-event.html
@@ -0,0 +1,33 @@
+<html>
+ <head>
+ <script>
+
+ function sendKey(element, keyName) {
+ var event = document.createEvent('KeyboardEvent');
+ event.initKeyboardEvent('keydown', true, true, document.defaultView, keyName);
+ element.dispatchEvent(event);
+ }
+ function log(msg)
+ {
+ var res = document.getElementById('res');
+ res.innerHTML = res.innerHTML + msg + "<br>";
+ }
+ function test()
+ {
+ var slider = document.getElementById('slider');
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ // slider drag
+ sendKey(slider, 'Left');
+ sendKey(slider, 'Right');
+
+ }
+ }
+ </script>
+ </hefad>
ltilve 2014/02/25 23:52:21 I think that you have a typo here.
Habib Virji 2014/02/26 08:52:57 Done.
+ <body onload="test()">
+ This tests that range generates oninput when in focus for keyboard event and when onblur or out of focus generates for keyboard events.
+ <input type="range" id="slider" oninput="log('input')" onchange="log('change')" min=0 max=100 value=50>
+ <div id="res"></div>
+ </body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/forms/range/range-keyboard-oninput-event-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698