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

Unified Diff: LayoutTests/http/tests/inspector-enabled/shadow-dom-rules.html

Issue 23629018: DevTools: show styles for shadow dom elements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix inspector-enabled test Created 7 years, 2 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/http/tests/inspector-enabled/shadow-dom-rules-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/inspector-enabled/shadow-dom-rules.html
diff --git a/LayoutTests/http/tests/inspector-enabled/shadow-dom-rules.html b/LayoutTests/http/tests/inspector-enabled/shadow-dom-rules.html
new file mode 100644
index 0000000000000000000000000000000000000000..b278c84a48a75ab3ea9573dc3a6c7b693aec9de6
--- /dev/null
+++ b/LayoutTests/http/tests/inspector-enabled/shadow-dom-rules.html
@@ -0,0 +1,50 @@
+<html>
+<head>
+<script src="../inspector/inspector-test.js"></script>
+<script src="../inspector/elements-test.js"></script>
+<script>
+
+function createShadowRoot()
+{
+ if (window.testRunner)
+ testRunner.waitUntilDone();
+ var template = document.querySelector('#tmpl');
+ var root = document.querySelector('#host').webkitCreateShadowRoot();
+ root.appendChild(template.content.cloneNode(true));
+ if (window.testRunner)
+ testRunner.showWebInspector();
+ runTest();
+}
+
+function test()
+{
+ InspectorTest.runTestSuite([
+ function testInit(next)
+ {
+ WebInspector.settings.showShadowDOM.set(true);
+ InspectorTest.selectNodeAndWaitForStyles("inner", next);
+ },
+
+ function testDumpStyles(next)
+ {
+ InspectorTest.dumpSelectedElementStyles(true);
+ WebInspector.settings.showShadowDOM.set(false);
+ next();
+ }
+ ]);
+}
+</script>
+</head>
+
+<body onload="createShadowRoot()">
+<p>
+This test checks that style sheets hosted inside shadow roots
+could be inspected.
+</p>
+<div id="host"></div>
+<template id="tmpl">
+ <style> .red { color: red; } </style>
+ <div id="inner" class="red">hi!</div>
+</template>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector-enabled/shadow-dom-rules-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698