Chromium Code Reviews| Index: LayoutTests/fast/events/onchange-js.html |
| diff --git a/LayoutTests/fast/events/onchange-js.html b/LayoutTests/fast/events/onchange-js.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3c24a0a7b074f300155e5a4a9a9e1c8dd977d9e3 |
| --- /dev/null |
| +++ b/LayoutTests/fast/events/onchange-js.html |
| @@ -0,0 +1,31 @@ |
| +<p>This test verifies that the change event is fired, when value is changed in change event handler.</p> |
| +<hr> |
| +<input id="input" type="text" onchange="changeHandler()"></input> |
|
keishi
2014/06/04 21:26:22
nit: input doesn't need end tag in html
Habib Virji
2014/06/05 08:43:23
Done.
|
| +<pre id="console"></pre> |
| + |
| +<script> |
| +function log(s) |
| +{ |
| + document.getElementById('console').appendChild(document.createTextNode(s + "\n")); |
| +} |
| + |
| +function changeHandler() |
| +{ |
| + log('change event fired'); |
|
keishi
2014/06/04 20:43:54
nit: inconsistent string literal quotes. You used
Habib Virji
2014/06/05 08:43:23
Done.
|
| + document.getElementById('input').value = ' '; |
|
keishi
2014/06/04 21:26:22
nit: use input variable
|
| +} |
| + |
| +if (window.testRunner) |
| + testRunner.dumpAsText(); |
| + |
| +var input = document.getElementById('input'); |
| + |
| +input.focus(); |
| +document.execCommand("InsertText", false, "foo bar baz"); |
| +input.blur(); |
| + |
| +input.focus(); |
| +document.execCommand("InsertText", false, "foo bar baz"); |
|
keishi
2014/06/04 20:43:54
This test is not reproducing the bug.
InsertText j
Habib Virji
2014/06/05 08:43:23
Not sure, what I am trying to do with test is put
keishi
2014/06/05 09:02:17
I tried this test on Chrome Canary and it passes s
Habib Virji
2014/06/05 09:33:31
Thanks Keishi, I have updated test to now check st
|
| +input.blur(); |
| + |
| +</script> |