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

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

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

Powered by Google App Engine
This is Rietveld 408576698