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

Unified Diff: LayoutTests/inspector-protocol/css/css-shadow-host-content-selector.html

Issue 316003002: DevTools: add test to verify matched styles for ::content selector (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaseline Created 6 years, 6 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
« no previous file with comments | « no previous file | LayoutTests/inspector-protocol/css/css-shadow-host-content-selector-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector-protocol/css/css-shadow-host-content-selector.html
diff --git a/LayoutTests/inspector-protocol/css/css-shadow-host-rule.html b/LayoutTests/inspector-protocol/css/css-shadow-host-content-selector.html
similarity index 57%
copy from LayoutTests/inspector-protocol/css/css-shadow-host-rule.html
copy to LayoutTests/inspector-protocol/css/css-shadow-host-content-selector.html
index dc551accccffecfab1883ac5b3ab61a805e106c3..d720ad21c282d49ae337c288bc1019446c885310 100644
--- a/LayoutTests/inspector-protocol/css/css-shadow-host-rule.html
+++ b/LayoutTests/inspector-protocol/css/css-shadow-host-content-selector.html
@@ -1,3 +1,4 @@
+<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
@@ -9,7 +10,7 @@ function test()
function onCSSEnabled()
{
- InspectorTest.requestNodeId("#shadow-host", onNodeReceived);
+ InspectorTest.requestNodeId("#shadow-content", onNodeReceived);
}
function onNodeReceived(nodeId)
@@ -18,23 +19,17 @@ function test()
}
}
</script>
-<template id="shadow-template">
-<style>
-:host {
- color: red;
-}
-</style>
-<div>Hi!</div>
-</template>
</head>
<body>
- <div id="shadow-host"></div>
- <script>
- var host = document.querySelector("#shadow-host").createShadowRoot();
- var template = document.querySelector("#shadow-template");
- host.appendChild(template.content);
- template.remove();
+ <div id="shadow-host">
+ <p id="shadow-content">This text is bold</p>
+ </div>
+ <script type="text/javascript">
+ var host = document.querySelector("#shadow-host");
+ var root = host.createShadowRoot();
+ root.innerHTML = "<style>:host ::content * { font-weight: bold; }</style><content></content>";
runTest();
</script>
</body>
</html>
+
« no previous file with comments | « no previous file | LayoutTests/inspector-protocol/css/css-shadow-host-content-selector-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698