OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script type="text/javascript"> |
| 5 function test() |
| 6 { |
| 7 self.runtime.loadModulePromise('quick_open').then(() => { |
| 8 var categories = new Set(); |
| 9 var commands = new Map(); |
| 10 QuickOpen.commandMenu.commands().forEach(command => { |
| 11 categories.add(command.category()); |
| 12 commands.set(command.category() + ': ' + command.title(), command); |
| 13 }); |
| 14 |
| 15 InspectorTest.addResult("Categories active:"); |
| 16 Array.from(categories).sort().forEach(category => InspectorTest.addResult("H
as category: " + category)); |
| 17 |
| 18 InspectorTest.addResult(""); |
| 19 var whitelist = ["Panel: Show Console", "Drawer: Show Console", "Appearance:
Switch to dark theme", "DevTools: Auto-open DevTools for popups"]; |
| 20 whitelist.forEach(item => { |
| 21 if (!commands.has(item)) |
| 22 InspectorTest.addResult(item + " is MISSING"); |
| 23 }); |
| 24 |
| 25 InspectorTest.addResult("Switching to console panel"); |
| 26 try { |
| 27 commands.get("Panel: Show Console")._executeHandler().then(() => { |
| 28 InspectorTest.addResult("Current panel: " + UI.inspectorView.currentPane
lDeprecated().name); |
| 29 InspectorTest.completeTest(); |
| 30 }); |
| 31 } |
| 32 catch (e) { |
| 33 InspectorTest.addResult(e); |
| 34 InspectorTest.completeTest(); |
| 35 } |
| 36 }); |
| 37 } |
| 38 |
| 39 </script> |
| 40 </head> |
| 41 <body onload="runTest()"> |
| 42 <p>Test that the command menu is properly filled.</p> |
| 43 </body> |
| 44 </html> |
OLD | NEW |