Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1351)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/relayout-shifts-inner-editor.html

Issue 2514103002: Rework fast/forms/relayout-shifts-inner-editor.html to remove flakiness. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../resources/run-after-layout-and-paint.js"></script> 2 <script src="../../resources/run-after-layout-and-paint.js"></script>
3 <script>
4 var i = 0;
5 var refreshIntervalId;
6 function repaintTest()
7 {
8 refreshIntervalId = setInterval(function(){moveInputElement();}, 10);
9 }
10 function moveInputElement()
11 {
12 i++;
13 input.style.left = i*10 + 'px';
14 if (i >= 3) {
15 runAfterLayoutAndPaint(function() {
16 clearInterval(refreshIntervalId);
17 }, true);
18 }
19 }
20 if (window.testRunner)
21 testRunner.waitUntilDone();
22 window.onload = repaintTest();
23 </script>
24 <style> 3 <style>
25 input { 4 input {
26 position: absolute; 5 position: absolute;
27 top: 0; 6 top: 0;
28 left: 0; 7 left: 0;
29 height: 50px; 8 height: 50px;
30 width: 200px; 9 width: 200px;
31 } 10 }
32 </style> 11 </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> 12 <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&l t;</div> 13 <div>This test has passed if the caret is centered <b>inside</b> the &gt;input&l t;</div>
35 <input id="input" type="text" autofocus> 14 <input id="input" type="text" autofocus>
15 <script>
16 if (window.testRunner)
17 testRunner.waitUntilDone();
18 runAfterLayoutAndPaint(function() {
19 input.style.left = '10px';
20 runAfterLayoutAndPaint(function() {
21 input.style.left = '20px';
22 runAfterLayoutAndPaint(function() {
23 input.style.left = '30px';
24 }, true);
25 });
26 });
27 </script>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698