| OLD | NEW |
| 1 var UnitTest = {}; | 1 var UnitTest = {}; |
| 2 (function() | 2 (function() |
| 3 { | 3 { |
| 4 var lazyModules = []; | 4 var lazyModules = []; |
| 5 var oldLoadResourcePromise = Runtime.loadResourcePromise; | 5 var oldLoadResourcePromise = Runtime.loadResourcePromise; |
| 6 Runtime.loadResourcePromise = function(url) | 6 Runtime.loadResourcePromise = function(url) |
| 7 { | 7 { |
| 8 if (url.startsWith("/")) | 8 if (url.startsWith("/")) |
| 9 return oldLoadResourcePromise(url); | 9 return oldLoadResourcePromise(url); |
| 10 | 10 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 window.onerror = completeTestOnError; | 124 window.onerror = completeTestOnError; |
| 125 | 125 |
| 126 Runtime.startApplication("/inspector-unit/inspector-unit-test").then(runTest
); | 126 Runtime.startApplication("/inspector-unit/inspector-unit-test").then(runTest
); |
| 127 | 127 |
| 128 function runTest() | 128 function runTest() |
| 129 { | 129 { |
| 130 var description = document.body.textContent.trim(); | 130 var description = document.body.textContent.trim(); |
| 131 if (description) | 131 if (description) |
| 132 UnitTest.addResult(description); | 132 UnitTest.addResult(description); |
| 133 | 133 |
| 134 WebInspector.settings = new WebInspector.Settings(new WebInspector.Setti
ngsStorage( | 134 Common.settings = new Common.Settings(new Common.SettingsStorage( |
| 135 {}, | 135 {}, |
| 136 InspectorFrontendHost.setPreference, | 136 InspectorFrontendHost.setPreference, |
| 137 InspectorFrontendHost.removePreference, | 137 InspectorFrontendHost.removePreference, |
| 138 InspectorFrontendHost.clearPreferences)); | 138 InspectorFrontendHost.clearPreferences)); |
| 139 | 139 |
| 140 | 140 |
| 141 WebInspector.viewManager = new WebInspector.ViewManager(); | 141 UI.viewManager = new UI.ViewManager(); |
| 142 WebInspector.initializeUIUtils(document, WebInspector.settings.createSet
ting("uiTheme", "default")); | 142 UI.initializeUIUtils(document, Common.settings.createSetting("uiTheme",
"default")); |
| 143 WebInspector.installComponentRootStyles(document.body); | 143 UI.installComponentRootStyles(document.body); |
| 144 | 144 |
| 145 WebInspector.zoomManager = new WebInspector.ZoomManager(window, Inspecto
rFrontendHost); | 145 UI.zoomManager = new UI.ZoomManager(window, InspectorFrontendHost); |
| 146 WebInspector.inspectorView = WebInspector.InspectorView.instance(); | 146 UI.inspectorView = UI.InspectorView.instance(); |
| 147 WebInspector.ContextMenu.initialize(); | 147 UI.ContextMenu.initialize(); |
| 148 WebInspector.ContextMenu.installHandler(document); | 148 UI.ContextMenu.installHandler(document); |
| 149 WebInspector.Tooltip.installHandler(document); | 149 UI.Tooltip.installHandler(document); |
| 150 | 150 |
| 151 var rootView = new WebInspector.RootView(); | 151 var rootView = new UI.RootView(); |
| 152 WebInspector.inspectorView.show(rootView.element); | 152 UI.inspectorView.show(rootView.element); |
| 153 rootView.attachToDocument(document); | 153 rootView.attachToDocument(document); |
| 154 Promise.all(lazyModules.map(lazyModule => window.runtime.loadModulePromi
se(lazyModule))).then(test); | 154 Promise.all(lazyModules.map(lazyModule => window.runtime.loadModulePromi
se(lazyModule))).then(test); |
| 155 } | 155 } |
| 156 })(); | 156 })(); |
| 157 | 157 |
| OLD | NEW |