[css-grid] Fix fast/css-grid-layout/grid-simplified-layout-positioned.html
authorrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Apr 2017 09:20:16 +0000 (09:20 +0000)
committerrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Apr 2017 09:20:16 +0000 (09:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=167538

Reviewed by Darin Adler.

fast/css-grid-layout/grid-simplified-layout-positioned.html was flacky
as the caret was not always painted in the test runner.
The test was checking for a crash in simplified layout (see bug #163450)
and has nothing to do with the caret or "autofocus" behavior.
"autofocus" was needed to get the crash, so this change modifies
the test to blur the element, so the caret is not painted anymore.

* fast/css-grid-layout/grid-simplified-layout-positioned-expected.html:
Don't focus the input element.
* fast/css-grid-layout/grid-simplified-layout-positioned.html: Blur
the input element to avoid showing the caret.
* platform/mac-wk2/TestExpectations: Remove file from expectations.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215222 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/css-grid-layout/grid-simplified-layout-positioned-expected.html
LayoutTests/fast/css-grid-layout/grid-simplified-layout-positioned.html
LayoutTests/platform/mac-wk2/TestExpectations

index e21bb8e..23a4f26 100644 (file)
@@ -1,3 +1,23 @@
+2017-04-11  Manuel Rego Casasnovas  <rego@igalia.com>
+
+        [css-grid] Fix fast/css-grid-layout/grid-simplified-layout-positioned.html
+        https://bugs.webkit.org/show_bug.cgi?id=167538
+
+        Reviewed by Darin Adler.
+
+        fast/css-grid-layout/grid-simplified-layout-positioned.html was flacky
+        as the caret was not always painted in the test runner.
+        The test was checking for a crash in simplified layout (see bug #163450)
+        and has nothing to do with the caret or "autofocus" behavior.
+        "autofocus" was needed to get the crash, so this change modifies
+        the test to blur the element, so the caret is not painted anymore.
+
+        * fast/css-grid-layout/grid-simplified-layout-positioned-expected.html:
+        Don't focus the input element.
+        * fast/css-grid-layout/grid-simplified-layout-positioned.html: Blur
+        the input element to avoid showing the caret.
+        * platform/mac-wk2/TestExpectations: Remove file from expectations.
+
 2017-04-10  Jiewen Tan  <jiewen_tan@apple.com>
 
         Unreviewed, test expectations update
index 78cfe22..12ca702 100644 (file)
 This text and input should appear at 100x100 position.
 Like if they have a left and top margin of 100px.
 <input autofocus>
+<script>
+  if (window.testRunner)
+    window.testRunner.waitUntilDone();
+  // "autofocus" is needed to force the simplified layout call.
+  // We are removing the focus here to match the expected file and avoid issues with the caret.
+  // We need a small timeout so "blur()" is run after "autofocus".
+  setTimeout(function() {
+    document.querySelector("input").blur();
+    if (window.testRunner)
+      window.testRunner.notifyDone();
+  }, 100);
+</script>
index 121a6c8..e0920a4 100644 (file)
@@ -613,8 +613,6 @@ webkit.org/b/167206 [ Sierra Release ] mathml/opentype/large-operators-displayst
 
 webkit.org/b/168065 inspector/unit-tests/heap-snapshot.html [ Pass Failure Timeout ]
 
-webkit.org/b/167538 [ Sierra ] fast/css-grid-layout/grid-simplified-layout-positioned.html [ Pass ImageOnlyFailure ]
-
 webkit.org/b/168235 [ Debug ] imported/w3c/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-download-click.html [ Pass Failure ]
 
 webkit.org/b/168085 tiled-drawing/scrolling/latched-to-deleted-node.html [ Pass Failure ]