summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/sub-pixel/input-caret-on-subpixel-bound.html
blob: aa2a3f97f8097ada87cfd0161647f62cff72953f (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE html>
<html>
  <head>
    <style>
      body {
          font-size: 13px;
          font-family: sans-serif;
      }
      table {
          padding: 2.59px;
      }
      input {
          padding: 5.5px;
      }
    </style>
  </head>
  <body>
    <fieldset>
      <table>
        <tr>
          <td>
            <input type="text" value="Caret"/>
          </td>
        </tr>
      </table>
    </fieldset>
    <script>
        
        if (window.testRunner)
            testRunner.waitUntilDone();

        function test()
        {
            var el = document.getElementsByTagName('input')[0];
            el.focus();
            var step = function() {
                var value = el.value;
                if (value) {
                    el.value = value.substr(0, value.length - 1);
                    window.setTimeout(step, 10);
                }
                else if (window.testRunner)
                    testRunner.notifyDone();
            };
            step();
        }
        
        test();
    </script>
  </body>
</html>