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

Unified Diff: LayoutTests/fast/events/onchange-js.html

Issue 313013005: Set value of m_textAsOfLastFormControlChangeEvent before triggering change event (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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/events/onchange-js-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | LayoutTests/fast/events/onchange-js-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698