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

Unified Diff: LayoutTests/inspector/elements/shadow/elements-panel-shadow-selection-on-refresh.html

Issue 1309403002: Show closed/open shadow root in inspector (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: update test expectation for breadcrumb Created 5 years, 4 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/inspector/elements/shadow/elements-panel-shadow-selection-on-refresh.html
diff --git a/LayoutTests/inspector/elements/shadow/elements-panel-shadow-selection-on-refresh.html b/LayoutTests/inspector/elements/shadow/elements-panel-shadow-selection-on-refresh.html
index 07a69a8457b130215353b1ed270124153424783a..5687267adcf2c00dc5e6cb0b048d0bc79222fcc6 100644
--- a/LayoutTests/inspector/elements/shadow/elements-panel-shadow-selection-on-refresh.html
+++ b/LayoutTests/inspector/elements/shadow/elements-panel-shadow-selection-on-refresh.html
@@ -19,6 +19,11 @@ function test()
InspectorTest.findNode(isOpenShadowRoot, selectReloadAndDump.bind(null, next));
},
+ function testClosedShadowRoot(next)
+ {
+ InspectorTest.findNode(isClosedShadowRoot, selectReloadAndDump.bind(null, next));
+ },
+
function testUserAgentShadowRoot(next)
{
InspectorTest.findNode(isUserAgentShadowRoot, selectReloadAndDump.bind(null, next));
@@ -29,6 +34,11 @@ function test()
InspectorTest.findNode(isOpenShadowRootChild, selectReloadAndDump.bind(null, next));
},
+ function testClosedShadowRootChild(next)
+ {
+ InspectorTest.findNode(isClosedShadowRootChild, selectReloadAndDump.bind(null, next));
+ },
+
function testUserAgentShadowRootChild(next)
{
InspectorTest.findNode(isUserAgentShadowRootChild, selectReloadAndDump.bind(null, next));
@@ -37,7 +47,12 @@ function test()
function isOpenShadowRoot(node)
{
- return node && node.shadowRootType() === WebInspector.DOMNode.ShadowRootTypes.Author;
+ return node && node.shadowRootType() === WebInspector.DOMNode.ShadowRootTypes.Open;
+ }
+
+ function isClosedShadowRoot(node)
+ {
+ return node && node.shadowRootType() === WebInspector.DOMNode.ShadowRootTypes.Closed;
}
function isUserAgentShadowRoot(node)
@@ -50,6 +65,11 @@ function test()
return isOpenShadowRoot(node.parentNode);
}
+ function isClosedShadowRootChild(node)
+ {
+ return isClosedShadowRoot(node.parentNode);
+ }
+
function isUserAgentShadowRootChild(node)
{
return isUserAgentShadowRoot(node.parentNode);
@@ -91,10 +111,12 @@ function test()
<p>
Tests that elements panel preserves selected shadow DOM node on page refresh.
</p>
-<span id="hostElement"></span>
+<span id="hostElement"></span><span id="closedHostElement"></span>
<script>
var root = document.getElementById("hostElement").createShadowRoot();
root.innerHTML = "<input type='text'>";
+var closedRoot = document.getElementById("closedHostElement").createShadowRoot({mode: 'closed'});
+closedRoot.innerHTML = "<button></button>";
</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698