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

Side by Side Diff: LayoutTests/inspector/elements/shadow-dom.html

Issue 7147011: Merge 88331 - 2011-06-07 Andrey Kosyakov <caseq@chromium.org> (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/elements-test.js"></script>
5 <script>
6
7 function addShadowRoot()
8 {
9 if (!window.layoutTestController)
10 return;
11 var element = document.getElementById("delayed-shadow-host");
12 var shadowRoot = layoutTestController.ensureShadowRoot(element);
13 var shadowChild = document.createElement("div");
14 shadowRoot.appendChild(shadowChild);
15 var span = document.createElement("span");
16 span.textContent = "text";
17 shadowChild.appendChild(span);
18 }
19
20 function test()
21 {
22 InspectorTest.runTestSuite([
23 function testDumpInitial(next)
24 {
25 InspectorTest.expandElementsTree(function() {
26 InspectorTest.selectNodeWithId("meter", function(node) {
27 InspectorTest.dumpElementsTree(node);
28 next();
29 });
30 });
31 },
32
33 function testDumpUpdated(next) {
34 var host;
35
36 function dumpWithShadowRoot()
37 {
38 InspectorTest.addResult("After shadow root added");
39 InspectorTest.runAfterPendingDispatches(function() {
40 InspectorTest.dumpElementsTree(host);
41 next();
42 });
43 }
44
45 InspectorTest.selectNodeWithId("delayed-shadow-host", function(node) {
46 host = node;
47 InspectorTest.addResult("Before shadow root added");
48 InspectorTest.dumpElementsTree(node);
49
50 WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Eve nts.ShadowRootUpdated, function() {
51 InspectorTest.expandElementsTree(dumpWithShadowRoot);
52 });
53 InspectorTest.evaluateInPage("addShadowRoot()");
54 });
55 }
56 ]);
57 }
58
59 </script>
60 </head>
61
62 <body onload="runTest()">
63 <p>
64 Tests that shadow DOM tree is properly displayed.
65 </p>
66
67 <meter id="meter" min="0" max="100" value="20"></meter>
68 <div id="delayed-shadow-host"></div>
69 </body>
70 </html>
OLDNEW
« no previous file with comments | « LayoutTests/inspector/console/console-shadow-dom-access.html ('k') | LayoutTests/inspector/elements/shadow-dom-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698