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/extensions-test.js"></script> | 4 <script src="../../http/tests/inspector/extensions-test.js"></script> |
5 <script src="../../http/tests/inspector/console-test.js"></script> | 5 <script src="../../http/tests/inspector/console-test.js"></script> |
6 <script type="text/javascript"> | 6 <script type="text/javascript"> |
7 function logMessage() | 7 function logMessage() |
8 { | 8 { |
9 console.log("hello"); | 9 console.log("hello"); |
10 } | 10 } |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 InspectorTest.installShowResourceLocationHooks = function() | 56 InspectorTest.installShowResourceLocationHooks = function() |
57 { | 57 { |
58 function showURL(panelName, url, lineNumber) | 58 function showURL(panelName, url, lineNumber) |
59 { | 59 { |
60 var url = url.replace(/^.*(([/][^/]*){3}[^/)]*)$/, "...$1"); | 60 var url = url.replace(/^.*(([/][^/]*){3}[^/)]*)$/, "...$1"); |
61 InspectorTest.addResult("Showing resource " + url + " in panel " + p
anelName + " (" + WebInspector.inspectorView.currentPanel().name + "), line: " +
lineNumber); | 61 InspectorTest.addResult("Showing resource " + url + " in panel " + p
anelName + " (" + WebInspector.inspectorView.currentPanel().name + "), line: " +
lineNumber); |
62 } | 62 } |
63 InspectorTest.recordNetwork(); | 63 InspectorTest.recordNetwork(); |
64 | 64 |
65 WebInspector.settings.createSetting("drawerEditorShown", true).set(false
); | |
66 InspectorTest.addSniffer(WebInspector.inspectorView.panel("sources"), "s
howUILocation", showUILocationHook, true); | 65 InspectorTest.addSniffer(WebInspector.inspectorView.panel("sources"), "s
howUILocation", showUILocationHook, true); |
67 InspectorTest.addSniffer(WebInspector.inspectorView.panel("resources"),
"showResource", showResourceHook, true); | 66 InspectorTest.addSniffer(WebInspector.inspectorView.panel("resources"),
"showResource", showResourceHook, true); |
68 InspectorTest.addSniffer(WebInspector.inspectorView.panel("network"), "r
evealAndHighlightRequest", showRequestHook, true); | 67 InspectorTest.addSniffer(WebInspector.inspectorView.panel("network"), "r
evealAndHighlightRequest", showRequestHook, true); |
69 | 68 |
70 function showUILocationHook(uiLocation) | 69 function showUILocationHook(uiLocation) |
71 { | 70 { |
72 showURL("sources", uiLocation.uiSourceCode.url, uiLocation.lineNumbe
r); | 71 showURL("sources", uiLocation.uiSourceCode.url, uiLocation.lineNumbe
r); |
73 } | 72 } |
74 | 73 |
75 function showResourceHook(resource, lineNumber) | 74 function showResourceHook(resource, lineNumber) |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 var img = document.createElement("img"); | 310 var img = document.createElement("img"); |
312 img.src = "resources/abe.png"; | 311 img.src = "resources/abe.png"; |
313 document.body.appendChild(img); | 312 document.body.appendChild(img); |
314 } | 313 } |
315 </script> | 314 </script> |
316 </head> | 315 </head> |
317 <body onload="runTest()"> | 316 <body onload="runTest()"> |
318 <p>Tests WebInspector extension API</p> | 317 <p>Tests WebInspector extension API</p> |
319 </body> | 318 </body> |
320 </html> | 319 </html> |
OLD | NEW |