Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-collect-class-names.html |
| diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-collect-class-names.html b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-collect-class-names.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5af0d6253d80489d393638adbd463bc486892a3c |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-collect-class-names.html |
| @@ -0,0 +1,46 @@ |
| +<html> |
| +<head> |
| +<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> |
| +<script> |
| + |
| +function test() |
| +{ |
| + InspectorTest.sendCommand("DOM.getDocument", {}, onGotDocument); |
| + InspectorTest.sendCommand("DOM.enable", {}); |
| + function onGotDocument(msg) |
| + { |
| + rootNodeId = msg.result.root.nodeId; |
| + InspectorTest.sendCommandOrDie("DOM.collectClassNames", { nodeId: rootNodeId }, onClassNamesCollected); |
|
lushnikov
2016/09/06 17:51:38
could you please also add a test that verifies tha
ahmetemirercin
2016/09/07 00:02:28
Done.
|
| + } |
| + |
| + function onClassNamesCollected(response) |
| + { |
| + var classNames = response.classNames; |
| + classNames.sort(); |
| + for(var i=0; i < classNames.length; i++) |
| + InspectorTest.log(classNames[i]); |
| + |
| + InspectorTest.completeTest(); |
| + } |
| +} |
| + |
| +</script> |
| +</head> |
| +<body class="body-class"> |
| +<div class="class1"></div> |
| +<div class="class2"> |
| + <ul class="class3"> |
| + <li class="class4"></li> |
| + </ul> |
| +</div> |
| +<div class="class5 class6"></div> |
| +<div id="shadow-host"></div> |
| +<script type="text/javascript"> |
| + var host = document.querySelector("#shadow-host"); |
| + var root = host.createShadowRoot(); |
| + root.innerHTML = "<div class=\"shadow-class\"></div>"; |
| + runTest(); |
| +</script> |
| + |
| +</body> |
| +</html> |