Title: [121495] trunk/LayoutTests
Revision
121495
Author
[email protected]
Date
2012-06-28 17:59:37 -0700 (Thu, 28 Jun 2012)

Log Message

Add a test for a 'user-modify' css property of distributed nodes.
https://bugs.webkit.org/show_bug.cgi?id=90197

Reviewed by Ryosuke Niwa.

* fast/dom/shadow/user-modify-inheritance-expected.txt:
* fast/dom/shadow/user-modify-inheritance.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (121494 => 121495)


--- trunk/LayoutTests/ChangeLog	2012-06-29 00:55:47 UTC (rev 121494)
+++ trunk/LayoutTests/ChangeLog	2012-06-29 00:59:37 UTC (rev 121495)
@@ -1,3 +1,13 @@
+2012-06-28  Hayato Ito  <[email protected]>
+
+        Add a test for a 'user-modify' css property of distributed nodes.
+        https://bugs.webkit.org/show_bug.cgi?id=90197
+
+        Reviewed by Ryosuke Niwa.
+
+        * fast/dom/shadow/user-modify-inheritance-expected.txt:
+        * fast/dom/shadow/user-modify-inheritance.html:
+
 2012-06-28  Elliott Sprehn  <[email protected]>
 
         frameborder="no" on frameset is ignored if border attribute set

Modified: trunk/LayoutTests/fast/dom/shadow/user-modify-inheritance-expected.txt (121494 => 121495)


--- trunk/LayoutTests/fast/dom/shadow/user-modify-inheritance-expected.txt	2012-06-29 00:55:47 UTC (rev 121494)
+++ trunk/LayoutTests/fast/dom/shadow/user-modify-inheritance-expected.txt	2012-06-29 00:59:37 UTC (rev 121495)
@@ -9,6 +9,8 @@
 PASS computedStyle(prepareNodeInShadowRoot(document.getElementById("non-contenteditable-host1"), null), userModifyPropertyName) is "read-only"
 PASS computedStyle(prepareNodeInShadowRoot(document.getElementById("non-contenteditable-host2"), "false"), userModifyPropertyName) is "read-only"
 PASS computedStyle(prepareNodeInShadowRoot(document.getElementById("non-contenteditable-host3"), "true"), userModifyPropertyName) is "read-write"
+PASS getUserModifyProperty("child-a") is "read-write"
+PASS getUserModifyProperty("child-b") is "read-write"
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/fast/dom/shadow/user-modify-inheritance.html (121494 => 121495)


--- trunk/LayoutTests/fast/dom/shadow/user-modify-inheritance.html	2012-06-29 00:55:47 UTC (rev 121494)
+++ trunk/LayoutTests/fast/dom/shadow/user-modify-inheritance.html	2012-06-29 00:59:37 UTC (rev 121495)
@@ -2,6 +2,7 @@
 <html>
 <head>
 <script src=""
+<script src=""
 </head>
 <body>
 <p id="description"></p>
@@ -11,6 +12,7 @@
 <div id="non-contenteditable-host1"></div>
 <div id="non-contenteditable-host2"></div>
 <div id="non-contenteditable-host3"></div>
+<div id="sandbox"></div>
 <pre id="console"></pre>
 <script>
 description("Tests to ensure that a '-webkit-user-modify' CSS porperty is not inherited across shadow boundaries.");
@@ -26,6 +28,10 @@
     return undefined;
 }
 
+function getUserModifyProperty(id) {
+    return computedStyle(document.getElementById("child-a"), userModifyPropertyName);
+}
+
 function prepareNodeInShadowRoot(host, contentEditableAttributeValueForNode) {
     var shadowRoot = new WebKitShadowRoot(host);
     var nodeInShadow = document.createElement('div');
@@ -44,6 +50,20 @@
 shouldBeEqualToString('computedStyle(prepareNodeInShadowRoot(document.getElementById("non-contenteditable-host1"), null), userModifyPropertyName)', 'read-only');
 shouldBeEqualToString('computedStyle(prepareNodeInShadowRoot(document.getElementById("non-contenteditable-host2"), "false"), userModifyPropertyName)', 'read-only');
 shouldBeEqualToString('computedStyle(prepareNodeInShadowRoot(document.getElementById("non-contenteditable-host3"), "true"), userModifyPropertyName)', 'read-write');
+
+document.getElementById('sandbox').appendChild(
+    createDOM('div', {'id': 'host', 'contenteditable': 'true'},
+              createShadowRoot(createDOM('content', {'select': '#child-a'}),
+                               createDOM('div', {},
+                                         createDOM('content', {'select': '#child-b'}))),
+              createDOM('div', {'id': 'child-a'}),
+              createDOM('div', {'id': 'child-b'})));
+
+document.body.offsetLeft;
+
+shouldBeEqualToString('getUserModifyProperty("child-a")', 'read-write');
+shouldBeEqualToString('getUserModifyProperty("child-b")', 'read-write');
+
 </script>
 <script src=""
 </body>
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to