2 <p>This tests whether an input field scrolls to the end of the new composition when setComposition is called.
</p>
8 document
.getElementById('log').appendChild(document
.createTextNode(s
+ "\n"));
11 if (window
.testRunner
)
12 window
.testRunner
.dumpAsText();
14 var input
= document
.querySelector('input');
16 textInputController
.setComposition('longsinglewordstringcomposition');
17 var maxScrollLeft
= input
.scrollWidth
- input
.clientWidth
;
18 if (maxScrollLeft
- input
.scrollLeft
< 5)
19 log("SUCCESS: input has scrolled to the end of the composition");
21 log("FAILED: input has not scrolled to the end of the composition. scrollLeft=" + input
.scrollLeft
);