| Index: third_party/WebKit/Source/devtools/front_end/main/Main.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/main/Main.js b/third_party/WebKit/Source/devtools/front_end/main/Main.js
|
| index 261dddbc9433ed6dd9053c57667336e6d13947b7..8dd3dee20ca08e4c546f44c005e1b3b878a89f09 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/main/Main.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/main/Main.js
|
| @@ -51,9 +51,6 @@ Main.Main = class {
|
|
|
| _loaded() {
|
| console.timeStamp('Main._loaded');
|
| -
|
| - if (InspectorFrontendHost.isUnderTest())
|
| - self.runtime.useTestBase();
|
| Runtime.setPlatform(Host.platform());
|
| InspectorFrontendHost.getPreferences(this._gotPreferences.bind(this));
|
| }
|
| @@ -63,6 +60,8 @@ Main.Main = class {
|
| */
|
| _gotPreferences(prefs) {
|
| console.timeStamp('Main._gotPreferences');
|
| + if (Host.isUnderTest(prefs))
|
| + self.runtime.useTestBase();
|
| this._createSettings(prefs);
|
| this._createAppUI();
|
| }
|
| @@ -78,7 +77,7 @@ Main.Main = class {
|
| storagePrefix = '__custom__';
|
| else if (
|
| !Runtime.queryParam('can_dock') && !!Runtime.queryParam('debugFrontend') &&
|
| - !InspectorFrontendHost.isUnderTest())
|
| + !Host.isUnderTest(prefs))
|
| storagePrefix = '__bundled__';
|
| var clearLocalStorage = window.localStorage ? window.localStorage.clear.bind(window.localStorage) : undefined;
|
| var localStorage =
|
| @@ -87,8 +86,7 @@ Main.Main = class {
|
| prefs, InspectorFrontendHost.setPreference, InspectorFrontendHost.removePreference,
|
| InspectorFrontendHost.clearPreferences, storagePrefix);
|
| Common.settings = new Common.Settings(globalStorage, localStorage);
|
| -
|
| - if (!InspectorFrontendHost.isUnderTest())
|
| + if (!Host.isUnderTest(prefs))
|
| new Common.VersionController().updateVersion();
|
| }
|
|
|
| @@ -129,7 +127,7 @@ Main.Main = class {
|
|
|
| Runtime.experiments.cleanUpStaleExperiments();
|
|
|
| - if (InspectorFrontendHost.isUnderTest()) {
|
| + if (Host.isUnderTest(prefs)) {
|
| var testPath = JSON.parse(prefs['testPath'] || '""');
|
| // Enable experiments for testing.
|
| if (testPath.indexOf('layers/') !== -1)
|
|
|