| OLD | NEW |
| (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 var test = function() | |
| 8 { | |
| 9 var expressions = [ | |
| 10 "$0.toString()", | |
| 11 "$0.firstChild.toString()", | |
| 12 "$0.firstChild.firstChild.style.width" | |
| 13 ]; | |
| 14 function isShadowRoot(node) | |
| 15 { | |
| 16 return node.nodeType() === Node.SHADOW_ROOT_NODE; | |
| 17 } | |
| 18 function processExpression() | |
| 19 { | |
| 20 if (!expressions.length) { | |
| 21 InspectorTest.completeTest(); | |
| 22 return; | |
| 23 } | |
| 24 var expression = expressions.shift(); | |
| 25 InspectorTest.evaluateInConsoleAndDump(expression, processExpression); | |
| 26 } | |
| 27 InspectorTest.findNode(isShadowRoot, function(node) { | |
| 28 InspectorTest.selectNode(node, processExpression); | |
| 29 }); | |
| 30 } | |
| 31 | |
| 32 </script> | |
| 33 </head> | |
| 34 | |
| 35 <body onload="runTest()"> | |
| 36 <p> | |
| 37 Tests that $0 may successfully be used to refer to shadow DOM elements. | |
| 38 </p> | |
| 39 | |
| 40 <meter min="0" max="100" value="42"></meter> | |
| 41 </body> | |
| 42 </html> | |
| OLD | NEW |