OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <style> | 3 <style> |
4 @font-face { | 4 @font-face { |
5 font-family: 'ahem'; | 5 font-family: 'ahem'; |
6 src: url(../../resources/Ahem.ttf); | 6 src: url(../../resources/Ahem.ttf); |
7 } | 7 } |
8 </style> | 8 </style> |
9 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto
r-protocol-test.js"></script> | 9 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto
r-protocol-test.js"></script> |
10 <script> | 10 <script> |
11 | 11 |
12 function test() | 12 function test() |
13 { | 13 { |
14 InspectorTest.sendCommand("DOM.enable", {}); | 14 InspectorTest.sendCommand("DOM.enable", {}); |
15 InspectorTest.sendCommandOrDie("DOM.getLayoutTreeNodes", {}, onLayoutTreeNod
es); | 15 var whitelist = ["transform", "transform-origin", "height", "width", "displa
y", "outline-color"]; |
| 16 InspectorTest.sendCommandOrDie("CSS.getLayoutTreeAndStyles", {"computedStyle
Whitelist": whitelist}, onLayoutTreeNodes); |
16 | 17 |
17 function onLayoutTreeNodes(response) | 18 function onLayoutTreeNodes(response) |
18 { | 19 { |
19 InspectorTest.log("\nLayoutTreeNodes result:"); | 20 InspectorTest.log("\nLayoutTreeNodes result:"); |
20 canonicalizeBackendNodeIds(response); | 21 canonicalizeBackendNodeIds(response); |
21 InspectorTest.log(JSON.stringify(response, null, 2)); | 22 InspectorTest.log(JSON.stringify(response, null, 2)); |
22 InspectorTest.completeTest(); | 23 InspectorTest.completeTest(); |
23 } | 24 } |
24 | 25 |
25 // While unique the backendNodeId IDs are not stable cross platform, so we c
anonicalize them. | 26 // While unique the backendNodeId IDs are not stable cross platform, so we c
anonicalize them. |
(...skipping 13 matching lines...) Expand all Loading... |
39 } | 40 } |
40 } | 41 } |
41 | 42 |
42 </script> | 43 </script> |
43 <template id="shadow-template"> | 44 <template id="shadow-template"> |
44 <style> | 45 <style> |
45 :host { | 46 :host { |
46 color: red; | 47 color: red; |
47 } | 48 } |
48 </style> | 49 </style> |
49 <div>Hi!</div> | 50 <div style="font-family: ahem;"><h1>Hi!</h1></div> |
50 </template> | 51 </template> |
51 </head> | 52 </head> |
52 <body class="body-class"> | 53 <body class="body-class"> |
53 <div style="font-family: ahem;"> | 54 <div style="font-family: ahem;"> |
54 <div class="class1">Some Text</div> And More Text | 55 <div class="class1">Some Text</div> And More Text |
55 <div style="display:inline-block; width: 200px"> | 56 <div style="display:inline-block; width: 200px"> |
56 <p> | 57 <p> |
57 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque si
t amet est sem. | 58 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque si
t amet est sem. |
58 Aenean ut neque volutpat, posuere odio at, mollis nibh. Aenean sodales n
ulla et | 59 Aenean ut neque volutpat, posuere odio at, mollis nibh. Aenean sodales n
ulla et |
59 ligula efficitur sollicitudin blandit sed lectus. Duis orci enim, sodale
s ac lectus sed, | 60 ligula efficitur sollicitudin blandit sed lectus. Duis orci enim, sodale
s ac lectus sed, |
60 hendrerit efficitur est. Quisque gravida facilisis viverra. | 61 hendrerit efficitur est. Quisque gravida facilisis viverra. |
61 </p> | 62 </p> |
62 <ul class="class3"> | 63 <ul class="class3"> |
63 <li class="class4"></li> | 64 <li class="class4"></li> |
64 <span>Lets have a span</span> | 65 <span>Lets have a span</span> |
65 </ul> | 66 </ul> |
66 </div> | 67 </div> |
67 <div style="transform: rotateZ(90deg); width: 200px">Rotated text!</div> | 68 <div style="transform: rotateZ(90deg); width: 200px">Rotated text!</div> |
68 <iframe src="resources/simple-iframe.html" width="400" height="200"></iframe
> | 69 <iframe src="../dom/resources/simple-iframe.html" width="400" height="200"><
/iframe> |
69 <div id="shadow-host"></div> | 70 <div id="shadow-host"></div> |
70 <script type="text/javascript"> | 71 <script type="text/javascript"> |
71 var host = document.querySelector("#shadow-host").createShadowRoot(); | 72 var host = document.querySelector("#shadow-host").createShadowRoot(); |
72 var template = document.querySelector("#shadow-template"); | 73 var template = document.querySelector("#shadow-template"); |
73 host.appendChild(template.content); | 74 host.appendChild(template.content); |
74 template.remove(); | 75 template.remove(); |
75 runTest(); | 76 window.onload = runTest; |
76 </script> | 77 </script> |
77 </div> | 78 </div> |
78 </body> | 79 </body> |
79 </html> | 80 </html> |
OLD | NEW |