| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 Shell.TestShell = class { |
| 6 /** |
| 7 * @suppressGlobalPropertiesCheck |
| 8 */ |
| 9 constructor() { |
| 10 runOnWindowLoad(this.initializeUnitTest.bind(this)); |
| 11 } |
| 12 |
| 13 /** |
| 14 * @suppressGlobalPropertiesCheck |
| 15 */ |
| 16 initializeUnitTest() { |
| 17 var globalStorage = new Common.SettingsStorage( |
| 18 {}, InspectorFrontendHost.setPreference, InspectorFrontendHost.removePre
ference, |
| 19 InspectorFrontendHost.clearPreferences); |
| 20 var storagePrefix = ''; |
| 21 var localStorage = new Common.SettingsStorage({}, undefined, undefined, unde
fined, storagePrefix); |
| 22 Common.settings = new Common.Settings(globalStorage, localStorage); |
| 23 |
| 24 UI.viewManager = new UI.ViewManager(); |
| 25 UI.initializeUIUtils(document, Common.settings.createSetting('uiTheme', 'def
ault')); |
| 26 UI.installComponentRootStyles(/** @type {!Element} */ (document.body)); |
| 27 |
| 28 UI.zoomManager = new UI.ZoomManager(self, InspectorFrontendHost); |
| 29 UI.inspectorView = UI.InspectorView.instance(); |
| 30 UI.ContextMenu.initialize(); |
| 31 UI.ContextMenu.installHandler(document); |
| 32 UI.Tooltip.installHandler(document); |
| 33 |
| 34 var rootView = new UI.RootView(); |
| 35 UI.inspectorView.show(rootView.element); |
| 36 rootView.attachToDocument(document); |
| 37 TestRunner.executeTestScript(); |
| 38 } |
| 39 }; |
| 40 |
| 41 new Shell.TestShell(); |
| OLD | NEW |