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/text/chromium-mac-duplicate-ime-composition.html

Issue 183703003: Remove more testRunner.display() calls from LayoutTests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Ditch fast/text/font-initial changes too 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
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../resources/run-after-display.js"></script>
3 <script> 4 <script>
4 function check(expect, actual) { 5 function check(expect, actual) {
5 var console = document.getElementById('console'); 6 var console = document.getElementById('console');
6 var div = document.createElement('div'); 7 var div = document.createElement('div');
7 div.innerHTML = expect == actual ? 'PASS' : 'FAIL'; 8 div.innerHTML = expect == actual ? 'PASS' : 'FAIL';
8 div.innerHTML += ' expects = "' + expect + '", actual = "' + actual + '"'; 9 div.innerHTML += ' expects = "' + expect + '", actual = "' + actual + '"';
9 console.appendChild(div); 10 console.appendChild(div);
10 } 11 }
11 12
12 function doTest() { 13 function doTest() {
13 if (!window.testRunner) 14 if (!window.testRunner)
14 return; 15 return;
15 testRunner.dumpAsText(); 16 testRunner.dumpAsText();
16 testRunner.waitUntilDone(); 17 testRunner.waitUntilDone();
17 var textarea = document.getElementById('textarea'); 18 var textarea = document.getElementById('textarea');
18 var consoleElement = document.getElementById('console'); 19 var consoleElement = document.getElementById('console');
19 textarea.addEventListener('keydown', function (e) { 20 textarea.addEventListener('keydown', function (e) {
20 textarea.style['overflow'] = 'hidden'; 21 textarea.style['overflow'] = 'hidden';
21 }); 22 });
22 testRunner.display(); 23 runAfterDisplay(function() {
23 textarea.focus(); 24 textarea.focus();
24 if (textInputController.setComposition) { 25 if (textInputController.setComposition) {
25 // Emulates start input method conversion. 26 // Emulates start input method conversion.
26 textInputController.setComposition('first'); 27 textInputController.setComposition('first');
27 // Then, emulates change of the composition text of the input method. 28 // Then, emulates change of the composition text of the input method.
28 textInputController.setComposition('second'); 29 textInputController.setComposition('second');
29 // Checks whether the textarea does not contain the first composition. 30 // Checks whether the textarea does not contain the first composition.
30 check('second', textarea.value); 31 check('second', textarea.value);
31 } 32 }
32 testRunner.notifyDone(); 33 testRunner.notifyDone();
34 });
33 } 35 }
34 </script> 36 </script>
35 </head> 37 </head>
36 <body onload="doTest()"> 38 <body onload="doTest()">
37 <p>This page ensures that the composition text of an input method does not ins ert into the textarea when the composition text is updated but is not committed. The bug, reported in <a href="https://bugs.webkit.org/show_bug.cgi?id=46868">th e issue 46868</a>, should not occur here. When DRT tests this page, it will emul ate changing composition text from "first" to "second". After that, the value of the textarea should be "second" and should not be "secondfirst". </p> 39 <p>This page ensures that the composition text of an input method does not ins ert into the textarea when the composition text is updated but is not committed. The bug, reported in <a href="https://bugs.webkit.org/show_bug.cgi?id=46868">th e issue 46868</a>, should not occur here. When DRT tests this page, it will emul ate changing composition text from "first" to "second". After that, the value of the textarea should be "second" and should not be "secondfirst". </p>
38 <p>For manual test, input text into the following textarea by using an input m ethod. The composition text which is not committed should not be inserted into t he textarea.</p> 40 <p>For manual test, input text into the following textarea by using an input m ethod. The composition text which is not committed should not be inserted into t he textarea.</p>
39 <textarea id="textarea"></textarea> 41 <textarea id="textarea"></textarea>
40 <div id="console"></div> 42 <div id="console"></div>
41 </body> 43 </body>
42 </html> 44 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/table/empty-section-crash.html ('k') | LayoutTests/fast/text/text-shadow-extreme-value.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698