Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 var initialize_InspectorTest = function() { | 1 var initialize_InspectorTest = function() { |
| 2 | 2 |
| 3 var results = []; | 3 var results = []; |
| 4 | 4 |
| 5 function consoleOutputHook(messageType) | 5 function consoleOutputHook(messageType) |
| 6 { | 6 { |
| 7 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu ments, 1)); | 7 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu ments, 1)); |
| 8 } | 8 } |
| 9 | 9 |
| 10 window._originalConsoleLog = console.log.bind(console); | 10 window._originalConsoleLog = console.log.bind(console); |
| (...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 758 targetRemoved: function(target) { } | 758 targetRemoved: function(target) { } |
| 759 }); | 759 }); |
| 760 | 760 |
| 761 InspectorTest._panelsToPreload = []; | 761 InspectorTest._panelsToPreload = []; |
| 762 | 762 |
| 763 InspectorTest.preloadPanel = function(panelName) | 763 InspectorTest.preloadPanel = function(panelName) |
| 764 { | 764 { |
| 765 InspectorTest._panelsToPreload.push(panelName); | 765 InspectorTest._panelsToPreload.push(panelName); |
| 766 } | 766 } |
| 767 | 767 |
| 768 InspectorTest._modulesToPreload = []; | |
| 769 | |
| 770 InspectorTest.preloadModule = function(moduleName) | |
| 771 { | |
| 772 InspectorTest._modulesToPreload.push(moduleName); | |
| 773 } | |
| 774 | |
| 768 }; // initialize_InspectorTest | 775 }; // initialize_InspectorTest |
| 769 | 776 |
| 770 var initializeCallId = 0; | 777 var initializeCallId = 0; |
| 771 var runTestCallId = 1; | 778 var runTestCallId = 1; |
| 772 var evalCallbackCallId = 2; | 779 var evalCallbackCallId = 2; |
| 773 var frontendReopeningCount = 0; | 780 var frontendReopeningCount = 0; |
| 774 | 781 |
| 775 function reopenFrontend() | 782 function reopenFrontend() |
| 776 { | 783 { |
| 777 closeFrontend(openFrontendAndIncrement); | 784 closeFrontend(openFrontendAndIncrement); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 840 { | 847 { |
| 841 if (InspectorTest.wasAlreadyExecuted) | 848 if (InspectorTest.wasAlreadyExecuted) |
| 842 return; | 849 return; |
| 843 | 850 |
| 844 InspectorTest.wasAlreadyExecuted = true; | 851 InspectorTest.wasAlreadyExecuted = true; |
| 845 | 852 |
| 846 // 1. Preload panels. | 853 // 1. Preload panels. |
| 847 var lastLoadedPanel; | 854 var lastLoadedPanel; |
| 848 | 855 |
| 849 var promises = []; | 856 var promises = []; |
| 857 for (var moduleName of InspectorTest._modulesToPreload) | |
|
sergeyv
2015/04/08 09:47:33
should we merge modulesToPreload and panelsToPrel
| |
| 858 promises.push(self.runtime.loadModulePromise(moduleName)); | |
| 859 | |
| 850 for (var i = 0; i < InspectorTest._panelsToPreload.length; ++i) { | 860 for (var i = 0; i < InspectorTest._panelsToPreload.length; ++i) { |
| 851 lastLoadedPanel = InspectorTest._panelsToPreload[i]; | 861 lastLoadedPanel = InspectorTest._panelsToPreload[i]; |
| 852 promises.push(WebInspector.inspectorView.panel(lastLoadedPanel)); | 862 promises.push(WebInspector.inspectorView.panel(lastLoadedPanel)); |
| 853 } | 863 } |
| 854 | 864 |
| 855 var testPath = WebInspector.settings.testPath.get(); | 865 var testPath = WebInspector.settings.testPath.get(); |
| 856 | 866 |
| 857 // 2. Show initial panel based on test path. | 867 // 2. Show initial panel based on test path. |
| 858 var initialPanelByFolder = { | 868 var initialPanelByFolder = { |
| 859 "audits": "audits", | 869 "audits": "audits", |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 964 _output("[page] " + text); | 974 _output("[page] " + text); |
| 965 } | 975 } |
| 966 | 976 |
| 967 function _output(result) | 977 function _output(result) |
| 968 { | 978 { |
| 969 if (!outputElement) | 979 if (!outputElement) |
| 970 createOutputElement(); | 980 createOutputElement(); |
| 971 outputElement.appendChild(document.createTextNode(result)); | 981 outputElement.appendChild(document.createTextNode(result)); |
| 972 outputElement.appendChild(document.createElement("br")); | 982 outputElement.appendChild(document.createElement("br")); |
| 973 } | 983 } |
| OLD | NEW |