| Index: third_party/WebKit/Source/devtools/front_end/shell/TestShell.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/shell/TestShell.js b/third_party/WebKit/Source/devtools/front_end/shell/TestShell.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..fa844293c38f04d9be0a1035260d1fc616a3a0c0
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/devtools/front_end/shell/TestShell.js
|
| @@ -0,0 +1,41 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +Shell.TestShell = class {
|
| + /**
|
| + * @suppressGlobalPropertiesCheck
|
| + */
|
| + constructor() {
|
| + runOnWindowLoad(this.initializeUnitTest.bind(this));
|
| + }
|
| +
|
| + /**
|
| + * @suppressGlobalPropertiesCheck
|
| + */
|
| + initializeUnitTest() {
|
| + var globalStorage = new Common.SettingsStorage(
|
| + {}, InspectorFrontendHost.setPreference, InspectorFrontendHost.removePreference,
|
| + InspectorFrontendHost.clearPreferences);
|
| + var storagePrefix = '';
|
| + var localStorage = new Common.SettingsStorage({}, undefined, undefined, undefined, storagePrefix);
|
| + Common.settings = new Common.Settings(globalStorage, localStorage);
|
| +
|
| + UI.viewManager = new UI.ViewManager();
|
| + UI.initializeUIUtils(document, Common.settings.createSetting('uiTheme', 'default'));
|
| + UI.installComponentRootStyles(/** @type {!Element} */ (document.body));
|
| +
|
| + UI.zoomManager = new UI.ZoomManager(self, InspectorFrontendHost);
|
| + UI.inspectorView = UI.InspectorView.instance();
|
| + UI.ContextMenu.initialize();
|
| + UI.ContextMenu.installHandler(document);
|
| + UI.Tooltip.installHandler(document);
|
| +
|
| + var rootView = new UI.RootView();
|
| + UI.inspectorView.show(rootView.element);
|
| + rootView.attachToDocument(document);
|
| + TestRunner.executeTestScript();
|
| + }
|
| +};
|
| +
|
| +new Shell.TestShell();
|
|
|