Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: LayoutTests/fast/dom/shadow/pseudo-attribute-dynamic.html

Issue 187573002: Revert "Reverting custom pseudo element". (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>
« no previous file with comments | « LayoutTests/fast/dom/shadow/pseudo-attribute.html ('k') | LayoutTests/fast/dom/shadow/pseudo-attribute-dynamic-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698