| 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/network-test.js"></script> | 5 <script src="../../http/tests/inspector/network-test.js"></script> |
| 6 <script src="../../http/tests/inspector/sources-test.js"></script> | 6 <script src="../../http/tests/inspector/sources-test.js"></script> |
| 7 <script src="../../http/tests/inspector/resources-test.js"></script> | 7 <script src="../../http/tests/inspector/resources-test.js"></script> |
| 8 <script src="../../http/tests/inspector/extensions-test.js"></script> | 8 <script src="../../http/tests/inspector/extensions-test.js"></script> |
| 9 <script type="text/javascript"> | 9 <script type="text/javascript"> |
| 10 function logMessage() | 10 function logMessage() |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 testPanel.onHidden.addListener(onPanelHidden); | 309 testPanel.onHidden.addListener(onPanelHidden); |
| 310 evaluateOnFrontend("InspectorTest.switchToLastPanel();"); | 310 evaluateOnFrontend("InspectorTest.switchToLastPanel();"); |
| 311 } | 311 } |
| 312 var panelWindow; | 312 var panelWindow; |
| 313 function onPanelShown(win) | 313 function onPanelShown(win) |
| 314 { | 314 { |
| 315 panelWindow = win; | 315 panelWindow = win; |
| 316 testPanel.onShown.removeListener(onPanelShown); | 316 testPanel.onShown.removeListener(onPanelShown); |
| 317 output("Panel shown, now toggling console..."); | 317 output("Panel shown, now toggling console..."); |
| 318 panelWindow.addEventListener("resize", onPanelResized); | 318 panelWindow.addEventListener("resize", onPanelResized); |
| 319 dispatchKeydownEvent({ keyIdentifier: "U+001B" }); | 319 dispatchKeydownEvent({ key: "Escape", keyIdentifier: "U+001B" }); |
| 320 } | 320 } |
| 321 function onPanelResized() | 321 function onPanelResized() |
| 322 { | 322 { |
| 323 panelWindow.removeEventListener("resize", onPanelResized); | 323 panelWindow.removeEventListener("resize", onPanelResized); |
| 324 output("Panel resized, switching away..."); | 324 output("Panel resized, switching away..."); |
| 325 var isMac = platform === "mac"; | 325 var isMac = platform === "mac"; |
| 326 dispatchKeydownEvent({ ctrlKey: !isMac, metaKey: isMac, keyIdentifier: "
U+005D" }); | 326 dispatchKeydownEvent({ ctrlKey: !isMac, metaKey: isMac, key: "]" }); |
| 327 } | 327 } |
| 328 function onPanelHidden() | 328 function onPanelHidden() |
| 329 { | 329 { |
| 330 output("Panel hidden, test passed."); | 330 output("Panel hidden, test passed."); |
| 331 testPanel.onShown.removeListener(onPanelHidden); | 331 testPanel.onShown.removeListener(onPanelHidden); |
| 332 evaluateOnFrontend("reply(WebInspector.inspectorView.closeDrawer())", ne
xtTest); | 332 evaluateOnFrontend("reply(WebInspector.inspectorView.closeDrawer())", ne
xtTest); |
| 333 } | 333 } |
| 334 } | 334 } |
| 335 | 335 |
| 336 function loadResources() | 336 function loadResources() |
| 337 { | 337 { |
| 338 var xhr = new XMLHttpRequest(); | 338 var xhr = new XMLHttpRequest(); |
| 339 xhr.open("GET", "resources/missing.txt", false); | 339 xhr.open("GET", "resources/missing.txt", false); |
| 340 xhr.send(); | 340 xhr.send(); |
| 341 var img = document.createElement("img"); | 341 var img = document.createElement("img"); |
| 342 img.src = "resources/abe.png"; | 342 img.src = "resources/abe.png"; |
| 343 document.body.appendChild(img); | 343 document.body.appendChild(img); |
| 344 } | 344 } |
| 345 </script> | 345 </script> |
| 346 </head> | 346 </head> |
| 347 <body onload="runTest()"> | 347 <body onload="runTest()"> |
| 348 <p>Tests WebInspector extension API</p> | 348 <p>Tests WebInspector extension API</p> |
| 349 </body> | 349 </body> |
| 350 </html> | 350 </html> |
| OLD | NEW |