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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/forms/relayout-shifts-inner-editor.html
diff --git a/third_party/WebKit/LayoutTests/fast/forms/relayout-shifts-inner-editor.html b/third_party/WebKit/LayoutTests/fast/forms/relayout-shifts-inner-editor.html
index f6da2ba927a9eafd879588fd5a232579cd445489..e3fa2dcc62e49414dd98efdeefb1484651d74b27 100644
--- a/third_party/WebKit/LayoutTests/fast/forms/relayout-shifts-inner-editor.html
+++ b/third_party/WebKit/LayoutTests/fast/forms/relayout-shifts-inner-editor.html
@@ -1,26 +1,5 @@
<!DOCTYPE html>
<script src="../../resources/run-after-layout-and-paint.js"></script>
-<script>
-var i = 0;
-var refreshIntervalId;
-function repaintTest()
-{
- refreshIntervalId = setInterval(function(){moveInputElement();}, 10);
-}
-function moveInputElement()
-{
- i++;
- input.style.left = i*10 + 'px';
- if (i >= 3) {
- runAfterLayoutAndPaint(function() {
- clearInterval(refreshIntervalId);
- }, true);
- }
-}
-if (window.testRunner)
- testRunner.waitUntilDone();
-window.onload = repaintTest();
-</script>
<style>
input {
position: absolute;
@@ -33,3 +12,16 @@ input {
<div>This change checks that the caret in the &gt;input&lt; 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 &gt;input&lt;</div>
<input id="input" type="text" autofocus>
+<script>
+if (window.testRunner)
+ testRunner.waitUntilDone();
+runAfterLayoutAndPaint(function() {
+ input.style.left = '10px';
+ runAfterLayoutAndPaint(function() {
+ input.style.left = '20px';
+ runAfterLayoutAndPaint(function() {
+ input.style.left = '30px';
+ }, true);
+ });
+});
+</script>
« 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