| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../http/tests/inspector/console-test.js"></script> | 4 <script src="../../http/tests/inspector/console-test.js"></script> |
| 5 <script src="../../http/tests/inspector/elements-test.js"></script> | 5 <script src="../../http/tests/inspector/elements-test.js"></script> |
| 6 <script> | 6 <script> |
| 7 | 7 |
| 8 function test() | 8 function test() |
| 9 { | 9 { |
| 10 WebInspector.settingForTest("showUAShadowDOM").set(true); | 10 Common.settingForTest("showUAShadowDOM").set(true); |
| 11 InspectorTest.selectNodeWithId("shadow", step1); | 11 InspectorTest.selectNodeWithId("shadow", step1); |
| 12 | 12 |
| 13 function step1() | 13 function step1() |
| 14 { | 14 { |
| 15 InspectorTest.evaluateInConsoleAndDump("'Author shadow element: ' + $0.i
d", step3); | 15 InspectorTest.evaluateInConsoleAndDump("'Author shadow element: ' + $0.i
d", step3); |
| 16 } | 16 } |
| 17 | 17 |
| 18 function step3() | 18 function step3() |
| 19 { | 19 { |
| 20 InspectorTest.selectNodeWithId("user-agent-host", step4); | 20 InspectorTest.selectNodeWithId("user-agent-host", step4); |
| 21 } | 21 } |
| 22 | 22 |
| 23 function step4(node) | 23 function step4(node) |
| 24 { | 24 { |
| 25 WebInspector.panels.elements.revealAndSelectNode(node.shadowRoots()[0]); | 25 UI.panels.elements.revealAndSelectNode(node.shadowRoots()[0]); |
| 26 InspectorTest.evaluateInConsoleAndDump("'User agent shadow host: ' + $0.
id", step5); | 26 InspectorTest.evaluateInConsoleAndDump("'User agent shadow host: ' + $0.
id", step5); |
| 27 } | 27 } |
| 28 | 28 |
| 29 function step5() | 29 function step5() |
| 30 { | 30 { |
| 31 InspectorTest.completeTest(); | 31 InspectorTest.completeTest(); |
| 32 } | 32 } |
| 33 } | 33 } |
| 34 </script> | 34 </script> |
| 35 </head> | 35 </head> |
| 36 | 36 |
| 37 <body onload="runTest()"> | 37 <body onload="runTest()"> |
| 38 <p> | 38 <p> |
| 39 Tests that $0 works with shadow dom. | 39 Tests that $0 works with shadow dom. |
| 40 </p> | 40 </p> |
| 41 | 41 |
| 42 <div><div><div id="host"></div></div></div> | 42 <div><div><div id="host"></div></div></div> |
| 43 <script> | 43 <script> |
| 44 var host = document.querySelector('#host'); | 44 var host = document.querySelector('#host'); |
| 45 var sr = host.createShadowRoot(); | 45 var sr = host.createShadowRoot(); |
| 46 sr.innerHTML = "<div><div><div id='shadow'><input id='user-agent-host' type='r
ange'></div></div></div>"; | 46 sr.innerHTML = "<div><div><div id='shadow'><input id='user-agent-host' type='r
ange'></div></div></div>"; |
| 47 </script> | 47 </script> |
| 48 | 48 |
| 49 </body> | 49 </body> |
| 50 </html> | 50 </html> |
| OLD | NEW |