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

Side by Side Diff: LayoutTests/inspector/elements/node-xpath.xhtml

Issue 75253002: DevTools: [Elements] Implement "Copy CSS Path" context menu item for elements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Tentatively fix xpath test on Windows bot Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 <!-- Pre-comment --> 1 <!-- Pre-comment -->
2 <html xmlns="http://www.w3.org/1999/xhtml"> 2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head> 3 <head>
4 <script src="../../http/tests/inspector/inspector-test.js" id="script-id"></scri pt> 4 <script src="../../http/tests/inspector/inspector-test.js" id="script-id"></scri pt>
5 <script src="../../http/tests/inspector/elements-test.js"></script> 5 <script src="../../http/tests/inspector/elements-test.js"></script>
6 <script id="test-script"> 6 <script id="test-script">
7 //<![CDATA[ 7 //<![CDATA[
8 function test() 8 function test()
9 { 9 {
10 InspectorTest.expandElementsTree(dumpNodes.bind(null, "")); 10 InspectorTest.expandElementsTree(dumpNodes.bind(null, ""));
(...skipping 21 matching lines...) Expand all
32 for (var id in map) { 32 for (var id in map) {
33 if (map[id].nodeName() === "#document") 33 if (map[id].nodeName() === "#document")
34 return map[id]; 34 return map[id];
35 } 35 }
36 36
37 return null; 37 return null;
38 } 38 }
39 39
40 function dumpNodeData(node, prefix) 40 function dumpNodeData(node, prefix)
41 { 41 {
42 var result = prefix + "'" + node.nodeName() + "':'" + node.nodeValue() + "' - '" + node.xPath(true) + "'"; 42 var result = prefix + "'" + node.nodeName() + "':'" + node.nodeValue() + "' - '" + WebInspector.DOMPresentationUtils.xPath(node, true) + "'";
43 InspectorTest.addResult(result.replace(/\n/g, "\\n")); 43 InspectorTest.addResult(result.replace(/\r?\n/g, "\\n"));
44 } 44 }
45 } 45 }
46 //]]> 46 //]]>
47 </script> 47 </script>
48 <script> 48 <script>
49 // Comment 49 // Comment
50 //<![CDATA[ 50 //<![CDATA[
51 function f() 51 function f()
52 { 52 {
53 document.write("<"); 53 document.write("<");
54 } 54 }
55 //]]> 55 //]]>
56 </script> 56 </script>
57 </head> 57 </head>
58 58
59 <body onload="runTest()"> 59 <body onload="runTest()">
60 <p>Tests DOMNode.xPath()</p> 60 <p>Tests node xPath construction</p>
61 61
62 <div id="id1" class="foo"></div> 62 <div id="id1" class="foo"></div>
63 <div id="id2" class="foo"></div> 63 <div id="id2" class="foo"></div>
64 64
65 <div id="container"> 65 <div id="container">
66 <div id="id3" class="foo">3 Prefix <![CDATA[<greeting>Hello, world!</greetin g>]]> Suffix</div> 66 <div id="id3" class="foo">3 Prefix <![CDATA[<greeting>Hello, world!</greetin g>]]> Suffix</div>
67 <div id="id4" class="foo">4</div> 67 <div id="id4" class="foo">4</div>
68 <div id="id5" class="foo">5</div> 68 <div id="id5" class="foo">5</div>
69 <div id="id6" class="foo">6</div> 69 <div id="id6" class="foo">6</div>
70 </div> 70 </div>
71 71
72 </body> 72 </body>
73 </html> 73 </html>
74 <!-- Post-comment --> 74 <!-- Post-comment -->
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698