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

Unified Diff: third_party/WebKit/Source/devtools/front_end/host/InspectorFrontendHost.js

Issue 2522613003: DevTools: respect isUnderTest conditions in the browser tests. (Closed)
Patch Set: Created 4 years, 1 month 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
Index: third_party/WebKit/Source/devtools/front_end/host/InspectorFrontendHost.js
diff --git a/third_party/WebKit/Source/devtools/front_end/host/InspectorFrontendHost.js b/third_party/WebKit/Source/devtools/front_end/host/InspectorFrontendHost.js
index 528fda298277ea56c2297ef55881d034d18501a6..14d426c2b175154e8992131afb2dcf2ef1eaed7d 100644
--- a/third_party/WebKit/Source/devtools/front_end/host/InspectorFrontendHost.js
+++ b/third_party/WebKit/Source/devtools/front_end/host/InspectorFrontendHost.js
@@ -522,3 +522,16 @@ window.InspectorFrontendHost = InspectorFrontendHost;
* @type {!Common.EventTarget}
*/
InspectorFrontendHost.events;
+
+/**
+ * @param {!Object<string, string>=} prefs
+ * @return {boolean}
+ */
+Host.isUnderTest = function(prefs) {
+ if (InspectorFrontendHost.isUnderTest())
+ return true;
+
+ if (prefs)
+ return prefs['isUnderTest'] === 'true';
+ return Common.settings.createSetting('isUnderTest', false).get();
+};
« no previous file with comments | « chrome/browser/devtools/devtools_window_testing.cc ('k') | third_party/WebKit/Source/devtools/front_end/main/Main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698