[CSS Grid Layout] Test coverage for first-line pseudo-element
authorrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Sep 2014 08:36:14 +0000 (08:36 +0000)
committerrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Sep 2014 08:36:14 +0000 (08:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=135770

Reviewed by Zoltan Horvath.

According to the spec the ::first-line pseudo-element do not apply to
grid containers.

This was already working as expected but we were missing some tests
checking it, so we are adding new tests to have coverage.

* fast/css-grid-layout/grid-container-ignore-first-line-expected.txt: Added.
* fast/css-grid-layout/grid-container-ignore-first-line.html: Added.
* fast/css-grid-layout/grid-item-first-line-valid-expected.txt: Added.
* fast/css-grid-layout/grid-item-first-line-valid.html: Added.

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

LayoutTests/ChangeLog
LayoutTests/fast/css-grid-layout/grid-container-ignore-first-line-expected.txt [new file with mode: 0644]
LayoutTests/fast/css-grid-layout/grid-container-ignore-first-line.html [new file with mode: 0644]
LayoutTests/fast/css-grid-layout/grid-item-first-line-valid-expected.txt [new file with mode: 0644]
LayoutTests/fast/css-grid-layout/grid-item-first-line-valid.html [new file with mode: 0644]

index 925d4ec..c51b79a 100644 (file)
@@ -1,3 +1,21 @@
+2014-09-02  Manuel Rego Casasnovas  <rego@igalia.com>
+
+        [CSS Grid Layout] Test coverage for first-line pseudo-element
+        https://bugs.webkit.org/show_bug.cgi?id=135770
+
+        Reviewed by Zoltan Horvath.
+
+        According to the spec the ::first-line pseudo-element do not apply to
+        grid containers.
+
+        This was already working as expected but we were missing some tests
+        checking it, so we are adding new tests to have coverage.
+
+        * fast/css-grid-layout/grid-container-ignore-first-line-expected.txt: Added.
+        * fast/css-grid-layout/grid-container-ignore-first-line.html: Added.
+        * fast/css-grid-layout/grid-item-first-line-valid-expected.txt: Added.
+        * fast/css-grid-layout/grid-item-first-line-valid.html: Added.
+
 2014-08-29  Sergio Villar Senin  <svillar@igalia.com>
 
         [CSS Grid Layout] Resolved value of grid-template-* must include every track listed
diff --git a/LayoutTests/fast/css-grid-layout/grid-container-ignore-first-line-expected.txt b/LayoutTests/fast/css-grid-layout/grid-container-ignore-first-line-expected.txt
new file mode 100644 (file)
index 0000000..6c46c13
--- /dev/null
@@ -0,0 +1,22 @@
+This test grid item should ignore grid container's first-line pseudo-element.
+
+The first item.
+The second item.
+PASS
+The first item.
+The second item.
+PASS
+Anonymous item.
+PASS
+Anonymous item.
+PASS
+The first item.
+The second item.
+PASS
+The first item.
+The second item.
+ PASS
+Anonymous item.
+PASS
+Anonymous item.
+PASS
diff --git a/LayoutTests/fast/css-grid-layout/grid-container-ignore-first-line.html b/LayoutTests/fast/css-grid-layout/grid-container-ignore-first-line.html
new file mode 100644 (file)
index 0000000..0d84a78
--- /dev/null
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<html>
+<link href="resources/grid.css" rel="stylesheet">
+<style>
+    body { line-height: 20px; }
+    .grid-first-line::first-line { line-height: 100px; }
+    .container::first-line { line-height: 200px; }
+</style>
+
+<script src="../../resources/check-layout.js"></script>
+<body onload="checkLayout('.grid-first-line');">
+<p>This test grid item should ignore grid container's first-line pseudo-element.</p>
+
+<div class="grid grid-first-line">
+    <div class="item" data-expected-height=20>The first item.</div>
+    <div class="item" data-expected-height=20>The second item.</div>
+</div>
+
+<div class="inline-grid grid-first-line">
+    <div class="item" data-expected-height=20>The first item.</div>
+    <div class="item" data-expected-height=20>The second item.</div>
+</div>
+
+<div class="grid grid-first-line" data-expected-height=20>
+    Anonymous item.
+</div>
+
+<div class="inline-grid grid-first-line" data-expected-height=20>
+    Anonymous item.
+</div>
+
+<div class="container">
+    <div class="grid grid-first-line">
+        <div class="item" data-expected-height=20>The first item.</div>
+        <div class="item" data-expected-height=20>The second item.</div>
+    </div>
+</div>
+
+<div class="container">
+    <div class="inline-grid grid-first-line">
+        <div class="item" data-expected-height=20>The first item.</div>
+        <div class="item" data-expected-height=20>The second item.</div>
+    </div>
+</div>
+
+<div class="container">
+    <div class="grid grid-first-line" data-expected-height=20>
+        Anonymous item.
+    </div>
+</div>
+
+<div class="container">
+    <div class="inline-grid grid-first-line" data-expected-height=20>
+        Anonymous item.
+    </div>
+</div>
+
+</body>
+</html>
diff --git a/LayoutTests/fast/css-grid-layout/grid-item-first-line-valid-expected.txt b/LayoutTests/fast/css-grid-layout/grid-item-first-line-valid-expected.txt
new file mode 100644 (file)
index 0000000..390d3d6
--- /dev/null
@@ -0,0 +1,8 @@
+This test grid item's first-line pseudo-element should be valid.
+
+The first item.
+The second item.
+PASS
+The first item.
+The second item.
+PASS
diff --git a/LayoutTests/fast/css-grid-layout/grid-item-first-line-valid.html b/LayoutTests/fast/css-grid-layout/grid-item-first-line-valid.html
new file mode 100644 (file)
index 0000000..e1c36c7
--- /dev/null
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<link href="resources/grid.css" rel="stylesheet">
+<style>
+    .item::first-line { line-height: 100px; }
+</style>
+
+<script src="../../resources/check-layout.js"></script>
+<body onload="checkLayout('.grid'); checkLayout('.inline-grid');">
+<p>This test grid item's first-line pseudo-element should be valid.</p>
+
+<div class="grid">
+    <div class="item" data-expected-height=100>The first item.</div>
+    <div class="item" data-expected-height=100>The second item.</div>
+</div>
+
+<div class="inline-grid">
+    <div class="item" data-expected-height=100>The first item.</div>
+    <div class="item" data-expected-height=100>The second item.</div>
+</div>
+
+</body>
+</html>