Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / relayout-shifts-inner-editor.html
blob25c3302f9e05323af42eecca01214497484ad0a2
1 <!DOCTYPE html>
2 <script>
3 var i = 0;
4 var refreshIntervalId;
5 function repaintTest()
7 refreshIntervalId = setInterval(function(){moveInputElement();}, 10);
9 function moveInputElement()
11 var input = document.getElementById('input');
12 i++;
13 input.style.left = i*10 + 'px';
14 if (i >= 3) {
15 clearInterval(refreshIntervalId);
16 if (window.testRunner)
17 testRunner.notifyDone();
20 if (window.testRunner)
21 testRunner.waitUntilDone();
22 window.onload = repaintTest();
23 </script>
24 <style>
25 input {
26 position: absolute;
27 top: 0;
28 left: 0;
29 height: 50px;
30 width: 200px;
32 </style>
33 <div>This change checks that the caret in the &gt;input&lt; below doesn't shift out of it after several layouts.</div>
34 <div>This test has passed if the caret is centered <b>inside</b> the &gt;input&lt;</div>
35 <input id="input" type="text" autofocus>