Index: LayoutTests/fast/dom/shadow/pseudo-attribute-dynamic.html |
diff --git a/LayoutTests/fast/dom/shadow/pseudo-attribute-dynamic.html b/LayoutTests/fast/dom/shadow/pseudo-attribute-dynamic.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e9d4c5b39dc877d3e9729b5351fdc886d1f3b567 |
--- /dev/null |
+++ b/LayoutTests/fast/dom/shadow/pseudo-attribute-dynamic.html |
@@ -0,0 +1,37 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<style> |
+#host::x-foo { |
+ color: red; |
+} |
+ |
+#host::x-bar { |
+ color: blue; |
+} |
+</style> |
+</head> |
+<body> |
+ |
+<p>This test checks dynamic 'pseudo' attribute should reflect style.</p> |
+ |
+<div id="host"></div> |
+ |
+<script> |
+if (window.testRunner) |
+ testRunner.waitUntilDone(); |
+ |
+var shadowRoot = host.createShadowRoot(); |
+var div = document.createElement('div'); |
+div.pseudo = 'x-foo'; |
+div.innerHTML = "This should be blue."; |
+shadowRoot.appendChild(div); |
+ |
+setTimeout(function() { |
+ div.pseudo = 'x-bar'; |
+ if (window.testRunner) |
+ testRunner.notifyDone(); |
+}, 0); |
+</script> |
+</body> |
+</html> |