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

Unified Diff: Source/devtools/front_end/main/Main.js

Issue 1170193002: [DevTools] Add uiTest.testSettings. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed review comments Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/Runtime.js ('k') | Source/devtools/front_end/main/Tests.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/main/Main.js
diff --git a/Source/devtools/front_end/main/Main.js b/Source/devtools/front_end/main/Main.js
index c4f8d7b2dc5076a025730e4748f8ab35215e0a7b..2c94e2245b791306f19c33d3842dd92e4a04f866 100644
--- a/Source/devtools/front_end/main/Main.js
+++ b/Source/devtools/front_end/main/Main.js
@@ -37,6 +37,7 @@
WebInspector.Main = function()
{
WebInspector.console.setUIDelegate(this);
+ WebInspector.Main._instanceForTest = this;
runOnWindowLoad(this._loaded.bind(this));
}
@@ -56,12 +57,23 @@ WebInspector.Main.prototype = {
if (InspectorFrontendHost.isUnderTest())
self.runtime.useTestBase();
- InspectorFrontendHost.getPreferences(this._createSettings.bind(this));
+ InspectorFrontendHost.getPreferences(this._gotPreferences.bind(this));
},
/**
* @param {!Object<string, string>} prefs
*/
+ _gotPreferences: function(prefs)
+ {
+ console.timeStamp("Main._gotPreferences");
+ this._createSettings(prefs);
+ this._createAppUI();
+ },
+
+ /**
+ * @param {!Object<string, string>} prefs
+ * Note: this function is called from testSettings in Tests.js.
+ */
_createSettings: function(prefs)
{
// Patch settings from the URL param (for tests).
@@ -102,8 +114,6 @@ WebInspector.Main.prototype = {
if (!InspectorFrontendHost.isUnderTest())
new WebInspector.VersionController().updateVersion();
-
- this._createAppUI();
},
/**
« no previous file with comments | « Source/devtools/front_end/Runtime.js ('k') | Source/devtools/front_end/main/Tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698