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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/shell/TestShell.js

Issue 2513423003: DevTools: Convert inspector-unit tests to use reusable test harness (Closed)
Patch Set: Moved type definition out of externs Created 4 years 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
(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();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698