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

Side by Side Diff: LayoutTests/fast/forms/onchange-setvalueforuser.html

Issue 176953009: Move testRunner.startSpeechInput/setValueForUser to internals (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: (rebasing) Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/speech/input-text-speechstart.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../resources/js-test.js"></script> 3 <script src="../../resources/js-test.js"></script>
4 <script> 4 <script>
5 function test() { 5 function test() {
6 var tf = document.getElementById('tf'); 6 var tf = document.getElementById('tf');
7 7
8 var didFireOnChange = false; 8 var didFireOnChange = false;
9 tf.onchange = function() { 9 tf.onchange = function() {
10 didFireOnChange = true; 10 didFireOnChange = true;
11 } 11 }
12 12
13 if (window.testRunner) { 13 if (window.testRunner) {
14 testRunner.dumpAsText(); 14 testRunner.dumpAsText();
15 } 15 }
16 16
17 tf.focus(); 17 tf.focus();
18 if (window.testRunner) { 18 if (window.internals) {
19 testRunner.setValueForUser(tf, 'Hello!'); 19 internals.setValueForUser(tf, 'Hello!');
20 } 20 }
21 21
22 // Should not fire the event until focus is lost. 22 // Should not fire the event until focus is lost.
23 if (didFireOnChange) { 23 if (didFireOnChange) {
24 testFailed('onchange fired too early'); 24 testFailed('onchange fired too early');
25 return; 25 return;
26 } 26 }
27 27
28 tf.blur(); 28 tf.blur();
29 if (didFireOnChange) { 29 if (didFireOnChange) {
30 testPassed(''); 30 testPassed('');
31 } else { 31 } else {
32 testFailed('onchange never fired') 32 testFailed('onchange never fired')
33 } 33 }
34 } 34 }
35 </script> 35 </script>
36 </head> 36 </head>
37 <body onload="test()"> 37 <body onload="test()">
38 This tests that onchange correctly fires after calling setValueForUser(). I t can only be run using DumpRenderTree.<br> 38 This tests that onchange correctly fires after calling setValueForUser(). I t can only be run using DumpRenderTree.<br>
39 <form name="fm"> 39 <form name="fm">
40 <input type="text" id="tf" /> 40 <input type="text" id="tf" />
41 </form> 41 </form>
42 <div id="console"></div> 42 <div id="console"></div>
43 </body> 43 </body>
44 </html> 44 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/speech/input-text-speechstart.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698