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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-collect-class-names.html

Issue 2296323002: DevTools: Add features to collect classnames from Stylesheets and DOM (Closed)
Patch Set: DevTools: Add features to collect classnames from Stylesheets and DOM Created 4 years, 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script>
4 <script>
5
6 function test()
7 {
8 InspectorTest.sendCommand("DOM.getDocument", {}, onGotDocument);
9 InspectorTest.sendCommand("DOM.enable", {});
10 function onGotDocument(msg)
11 {
12 rootNodeId = msg.result.root.nodeId;
13 InspectorTest.sendCommandOrDie("DOM.collectClassNames", { nodeId: rootNo deId }, 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.
14 }
15
16 function onClassNamesCollected(response)
17 {
18 var classNames = response.classNames;
19 classNames.sort();
20 for(var i=0; i < classNames.length; i++)
21 InspectorTest.log(classNames[i]);
22
23 InspectorTest.completeTest();
24 }
25 }
26
27 </script>
28 </head>
29 <body class="body-class">
30 <div class="class1"></div>
31 <div class="class2">
32 <ul class="class3">
33 <li class="class4"></li>
34 </ul>
35 </div>
36 <div class="class5 class6"></div>
37 <div id="shadow-host"></div>
38 <script type="text/javascript">
39 var host = document.querySelector("#shadow-host");
40 var root = host.createShadowRoot();
41 root.innerHTML = "<div class=\"shadow-class\"></div>";
42 runTest();
43 </script>
44
45 </body>
46 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698