blob: 25c3302f9e05323af42eecca01214497484ad0a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
<!DOCTYPE html>
<script>
var i = 0;
var refreshIntervalId;
function repaintTest()
{
refreshIntervalId = setInterval(function(){moveInputElement();}, 10);
}
function moveInputElement()
{
var input = document.getElementById('input');
i++;
input.style.left = i*10 + 'px';
if (i >= 3) {
clearInterval(refreshIntervalId);
if (window.testRunner)
testRunner.notifyDone();
}
}
if (window.testRunner)
testRunner.waitUntilDone();
window.onload = repaintTest();
</script>
<style>
input {
position: absolute;
top: 0;
left: 0;
height: 50px;
width: 200px;
}
</style>
<div>This change checks that the caret in the >input< below doesn't shift out of it after several layouts.</div>
<div>This test has passed if the caret is centered <b>inside</b> the >input<</div>
<input id="input" type="text" autofocus>
|