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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/console/console-context-selector.html

Issue 2842843003: DevTools: Display product information in ConsoleContextSelector (Closed)
Patch Set: f Created 3 years, 7 months 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
OLDNEW
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/debugger-test.js"></script> 5 <script src="../../http/tests/inspector/debugger-test.js"></script>
6 <script> 6 <script>
7 function setup() { 7 function setup() {
8 window.worker = new Worker('resources/worker-pause.js'); 8 window.worker = new Worker('resources/worker-pause.js');
9 window.iframe = document.createElement('iframe'); 9 window.iframe = document.createElement('iframe');
10 window.iframe.src = 'data:text/html;<script>window.foo=1;<' + '/script>'; 10 window.iframe.src = 'data:text/html;<script>window.foo=1;<' + '/script>';
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 InspectorTest.evaluateInPage('destroyIframe()'); 89 InspectorTest.evaluateInPage('destroyIframe()');
90 await InspectorTest.waitForExecutionContextDestroyed(childExecutionContext); 90 await InspectorTest.waitForExecutionContextDestroyed(childExecutionContext);
91 InspectorTest.addResult(''); 91 InspectorTest.addResult('');
92 InspectorTest.addResult('Destroyed iframe'); 92 InspectorTest.addResult('Destroyed iframe');
93 dump(); 93 dump();
94 94
95 InspectorTest.completeDebuggerTest(); 95 InspectorTest.completeDebuggerTest();
96 96
97 function dump() { 97 function dump() {
98 var consoleView = Console.ConsoleView.instance(); 98 var consoleView = Console.ConsoleView.instance();
99 var select = consoleView._executionContextComboBox.selectElement(); 99 var selector = consoleView._consoleContextSelector;
100 InspectorTest.addResult('Console context selector:'); 100 InspectorTest.addResult('Console context selector:');
101 for (var i = 0; i < select.options.length; i++) { 101 for (var executionContext of selector._list._items) {
102 var option = select.options[i]; 102 var selected = selector._list.selectedItem() === executionContext;
103 var selected = select.selectedIndex === i; 103 var text = '____'.repeat(selector._depthFor(executionContext)) + selector. _titleFor(executionContext);
104 var text = option.text.replace(new RegExp('\u00a0', 'g'), '_'); 104 var disabled = !selector.isItemSelectable(executionContext);
105 InspectorTest.addResult(`${selected ? '*' : ' '} ${text} ${option.disabled ? '[disabled]' : ''}`); 105 InspectorTest.addResult(`${selected ? '*' : ' '} ${text} ${disabled ? '[di sabled]' : ''}`);
106 } 106 }
107 } 107 }
108 } 108 }
109 </script> 109 </script>
110 </head> 110 </head>
111 <body onload="runTest()"> 111 <body onload="runTest()">
112 <p> Tests console execution context selector. 112 <p> Tests console execution context selector.
113 </p> 113 </p>
114 </body> 114 </body>
115 </html> 115 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698