Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 function output(msg) { | |
| 2 webInspector.console.addMessage(webInspector.console.Severity.Log, msg); | |
| 3 } | |
| 4 | |
| 5 function test() { | |
| 6 var expectedAPIs = [ | |
| 7 "console", | |
| 8 "inspectedWindow", | |
| 9 "network", | |
| 10 "panels" | |
| 11 ]; | |
| 12 | |
| 13 for (var i = 0; i < expectedAPIs.length; ++i) { | |
| 14 var api = expectedAPIs[i]; | |
| 15 if (typeof chrome.experimental.devtools[api] !== "object") { | |
| 16 output("FAIL: API " + api + " is missing"); | |
| 17 return; | |
| 18 } | |
| 19 } | |
| 20 if (typeof chrome.experimental.devtools.inspectedWindow.tabId !== "number") { | |
| 21 output("FAIL: chrome.experimental.inspectedWindow.tabId is not a number"); | |
| 22 return; | |
| 23 } | |
| 24 output("PASS"); | |
| 25 } | |
| 26 | |
| 27 test(); | |
| OLD | NEW |