Add some tests for shadow DOM rendering
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Sep 2015 03:08:09 +0000 (03:08 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Sep 2015 03:08:09 +0000 (03:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=149330

Reviewed by Antti Koivisto.

Added some ref tests for new shadow DOM API rendering with failing expectations everywhere.

* fast/shadow-dom/css-scoping-shadow-invisible-slot-expected.html: Added.
* fast/shadow-dom/css-scoping-shadow-invisible-slot.html: Added.
* fast/shadow-dom/css-scoping-shadow-rendering-expected.html: Added.
* fast/shadow-dom/css-scoping-shadow-rendering.html: Added.
* fast/shadow-dom/css-scoping-shadow-slot-expected.html: Added.
* fast/shadow-dom/css-scoping-shadow-slot.html: Added.
* fast/shadow-dom/css-scoping-shadow-with-rules-expected.html: Added.
* fast/shadow-dom/css-scoping-shadow-with-rules.html: Added.
* platform/mac/TestExpectations:

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

LayoutTests/ChangeLog
LayoutTests/fast/shadow-dom/css-scoping-shadow-invisible-slot-expected.html [new file with mode: 0644]
LayoutTests/fast/shadow-dom/css-scoping-shadow-invisible-slot.html [new file with mode: 0644]
LayoutTests/fast/shadow-dom/css-scoping-shadow-rendering-expected.html [new file with mode: 0644]
LayoutTests/fast/shadow-dom/css-scoping-shadow-rendering.html [new file with mode: 0644]
LayoutTests/fast/shadow-dom/css-scoping-shadow-slot-expected.html [new file with mode: 0644]
LayoutTests/fast/shadow-dom/css-scoping-shadow-slot.html [new file with mode: 0644]
LayoutTests/fast/shadow-dom/css-scoping-shadow-with-rules-expected.html [new file with mode: 0644]
LayoutTests/fast/shadow-dom/css-scoping-shadow-with-rules.html [new file with mode: 0644]
LayoutTests/platform/mac/TestExpectations

index 73c24837cb8e1e224a29540f49af02ac566d8b34..f4f4237cd456b49efe850d74753b58f4e865d0e0 100644 (file)
@@ -1,3 +1,22 @@
+2015-09-17  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Add some tests for shadow DOM rendering
+        https://bugs.webkit.org/show_bug.cgi?id=149330
+
+        Reviewed by Antti Koivisto.
+
+        Added some ref tests for new shadow DOM API rendering with failing expectations everywhere.
+
+        * fast/shadow-dom/css-scoping-shadow-invisible-slot-expected.html: Added.
+        * fast/shadow-dom/css-scoping-shadow-invisible-slot.html: Added.
+        * fast/shadow-dom/css-scoping-shadow-rendering-expected.html: Added.
+        * fast/shadow-dom/css-scoping-shadow-rendering.html: Added.
+        * fast/shadow-dom/css-scoping-shadow-slot-expected.html: Added.
+        * fast/shadow-dom/css-scoping-shadow-slot.html: Added.
+        * fast/shadow-dom/css-scoping-shadow-with-rules-expected.html: Added.
+        * fast/shadow-dom/css-scoping-shadow-with-rules.html: Added.
+        * platform/mac/TestExpectations:
+
 2015-09-17  Commit Queue  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r189938, r189952, and r189956.
diff --git a/LayoutTests/fast/shadow-dom/css-scoping-shadow-invisible-slot-expected.html b/LayoutTests/fast/shadow-dom/css-scoping-shadow-invisible-slot-expected.html
new file mode 100644 (file)
index 0000000..e704d24
--- /dev/null
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+    <p>Test passes if you see a single 100px by 100px green box below.</p>
+    <div style="width: 100px; height: 100px; background: green;"></div>
+</body>
+</html>
diff --git a/LayoutTests/fast/shadow-dom/css-scoping-shadow-invisible-slot.html b/LayoutTests/fast/shadow-dom/css-scoping-shadow-invisible-slot.html
new file mode 100644 (file)
index 0000000..03bfb7e
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>CSS Scoping - elements with a distribution list should generate boxes in the formatting tree.</title>
+    <link rel="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"/>
+    <link rel="help" href="http://www.w3.org/TR/css-scoping-1/#selectors-data-model">
+    <link rel="match" href="reference/green-box.html"/>
+</head>
+<body>
+    <style>
+    my-host {
+        display: block;
+        width: 100px;
+        height: 100px;
+        overflow: hidden;
+    }
+    div {
+        width: 100%;
+        height: 50%;
+    }
+    </style>
+    <p>Test passes if you see a single 100px by 100px green box below.</p> 
+    <my-host>
+        <div slot="green" style="background: green;"></div>
+        <div style="background: red;">FAIL</div>
+        <div slot="green" style="background: green;"></div>
+    </my-host>
+    <script>
+
+    try {
+        var shadowHost = document.querySelector('my-host');
+        shadowRoot = shadowHost.attachShadow({mode: 'open'});
+        shadowRoot.innerHTML = '<slot name="green" style="border: solid 50px red;"></slot>';
+    } catch (exception) {
+        document.body.appendChild(document.createTextNode(exception));
+    }
+
+    </script>
+</body>
+</html>
diff --git a/LayoutTests/fast/shadow-dom/css-scoping-shadow-rendering-expected.html b/LayoutTests/fast/shadow-dom/css-scoping-shadow-rendering-expected.html
new file mode 100644 (file)
index 0000000..e704d24
--- /dev/null
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+    <p>Test passes if you see a single 100px by 100px green box below.</p>
+    <div style="width: 100px; height: 100px; background: green;"></div>
+</body>
+</html>
diff --git a/LayoutTests/fast/shadow-dom/css-scoping-shadow-rendering.html b/LayoutTests/fast/shadow-dom/css-scoping-shadow-rendering.html
new file mode 100644 (file)
index 0000000..d2b20de
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>CSS Scoping - The contents of the active shadow tree instead of the descendants of a shadow host generate boxes</title>
+    <link rel="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"/>
+    <link rel="help" href="http://www.w3.org/TR/css-scoping-1/#shadow-dom">
+    <link rel="match" href="reference/gren-box.html"/>
+</head>
+<body>
+    <style>
+    my-host {
+        display: block;
+        width: 100px;
+        height: 100px;
+    }
+    </style>
+    <p>Test passes if you see a single 100px by 100px green box below.</p> 
+    <my-host>
+        FAIL
+        <div style="width: 100%; height: 100%; background: red;">FAIL</div>
+    </my-host>
+    <script>
+
+    try {
+        var shadowHost = document.querySelector('my-host');
+        shadowRoot = shadowHost.attachShadow({mode: 'open'});
+        shadowRoot.innerHTML = '<div style="width: 100%; height: 100%; background: green;"></div>';
+    } catch (exception) {
+        document.body.appendChild(document.createTextNode(exception));
+    }
+
+    </script>
+</body>
+</html>
diff --git a/LayoutTests/fast/shadow-dom/css-scoping-shadow-slot-expected.html b/LayoutTests/fast/shadow-dom/css-scoping-shadow-slot-expected.html
new file mode 100644 (file)
index 0000000..e704d24
--- /dev/null
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+    <p>Test passes if you see a single 100px by 100px green box below.</p>
+    <div style="width: 100px; height: 100px; background: green;"></div>
+</body>
+</html>
diff --git a/LayoutTests/fast/shadow-dom/css-scoping-shadow-slot.html b/LayoutTests/fast/shadow-dom/css-scoping-shadow-slot.html
new file mode 100644 (file)
index 0000000..680213d
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>CSS Scoping - elements with a distribution list should generate boxes in the formatting tree.</title>
+    <link rel="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"/>
+    <link rel="help" href="http://www.w3.org/TR/css-scoping-1/#selectors-data-model">
+    <link rel="match" href="reference/green-box.html"/>
+</head>
+<body>
+    <style>
+    my-host {
+        display: block;
+        width: 100px;
+        height: 100px;
+        overflow: hidden;
+    }
+    div {
+        width: 100%;
+        height: 50%;
+    }
+    </style>
+    <p>Test passes if you see a single 100px by 100px green box below.</p> 
+    <my-host>
+        <div slot="green" style="background: green;"></div>
+        <div style="background: red;">FAIL</div>
+        <div slot="green" style="background: green;"></div>
+    </my-host>
+    <script>
+
+    try {
+        var shadowHost = document.querySelector('my-host');
+        shadowRoot = shadowHost.attachShadow({mode: 'open'});
+        shadowRoot.innerHTML = '<slot name="green"></slot>';
+    } catch (exception) {
+        document.body.appendChild(document.createTextNode(exception));
+    }
+
+    </script>
+</body>
+</html>
diff --git a/LayoutTests/fast/shadow-dom/css-scoping-shadow-with-rules-expected.html b/LayoutTests/fast/shadow-dom/css-scoping-shadow-with-rules-expected.html
new file mode 100644 (file)
index 0000000..e704d24
--- /dev/null
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+    <p>Test passes if you see a single 100px by 100px green box below.</p>
+    <div style="width: 100px; height: 100px; background: green;"></div>
+</body>
+</html>
diff --git a/LayoutTests/fast/shadow-dom/css-scoping-shadow-with-rules.html b/LayoutTests/fast/shadow-dom/css-scoping-shadow-with-rules.html
new file mode 100644 (file)
index 0000000..2d5a403
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>CSS Scoping - a selector inside a shadow tree is matched against nodes in the shadow tree</title>
+    <link rel="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"/>
+    <link rel="help" href="http://www.w3.org/TR/css-scoping-1/#selectors-data-model">
+    <link rel="match" href="reference/green-box.html"/>
+</head>
+<body>
+    <style>
+    my-host {
+        display: block;
+        width: 100px;
+        height: 100px;
+    }
+    div {
+        width: 100%; height: 100%; background: red;
+    }
+    </style>
+    <p>Test passes if you see a single 100px by 100px green box below.</p> 
+    <my-host>
+        <div>FAIL</div>
+    </my-host>
+    <script>
+
+    try {
+        var shadowHost = document.querySelector('my-host');
+        shadowRoot = shadowHost.attachShadow({mode: 'open'});
+        shadowRoot.innerHTML = '<div>FAIL</div><style> div {width: 100px; height: 100px; background: green; color:green; } </style>';
+    } catch (exception) {
+        document.body.appendChild(document.createTextNode(exception));
+    }
+
+    </script>
+</body>
+</html>
index 9738f6d596a47d2d1b38f89fe2683ef8252b205b..f65832ffbbad2769a16653b7d144ed70e651934e 100644 (file)
@@ -1298,3 +1298,8 @@ webkit.org/b/143258 [ Mavericks ] http/tests/cache/disk-cache/disk-cache-validat
 webkit.org/b/149128 fast/text/control-characters [ ImageOnlyFailure ]
 
 webkit.org/b/148695 fast/shadow-dom [ Pass ]
+
+webkit.org/b/149327 fast/shadow-dom/css-scoping-shadow-rendering.html [ ImageOnlyFailure ]
+webkit.org/b/149242 fast/shadow-dom/css-scoping-shadow-slot.html [ ImageOnlyFailure ]
+webkit.org/b/149242 fast/shadow-dom/css-scoping-shadow-invisible-slot.html [ ImageOnlyFailure ]
+webkit.org/b/149328 fast/shadow-dom/css-scoping-shadow-with-rules.html [ ImageOnlyFailure ]