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

Unified Diff: chromeos/dbus/dbus_thread_manager.h

Issue 83633004: Do not spawn a thread in browser/interactive ui tests before spawning sandbox host process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style fix Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/dbus/dbus_thread_manager.h
diff --git a/chromeos/dbus/dbus_thread_manager.h b/chromeos/dbus/dbus_thread_manager.h
index c980b27f960898f2d19f412e52234a1aee7e399e..c36ddc3dfe87cc28470a83afd4b3cd2561cb852f 100644
--- a/chromeos/dbus/dbus_thread_manager.h
+++ b/chromeos/dbus/dbus_thread_manager.h
@@ -83,10 +83,18 @@ class CHROMEOS_EXPORT DBusThreadManager {
// making it a Singleton, to ensure clean startup and shutdown.
static void Initialize();
- // Similar to Initialize(), but can inject an alternative
- // DBusThreadManager such as MockDBusThreadManager for testing.
- // The injected object will be owned by the internal pointer and deleted
- // by Shutdown().
+ // Sets an alternative DBusThreadManager such as MockDBusThreadManager
+ // to be used in |Initialize()| for testing. Tests that call
+ // DBusThreadManager::Initialize() (such as browser_tests and
+ // interactive_ui_tests) should use this instead of calling
+ // |InitiailzeForTesting|. The injected object will be owned by the
+ // internal pointer and deleted by Shutdown().
+ static void SetInstanceForTesting(DBusThreadManager* dbus_thread_manager);
+
+ // Similar to Initialize(), but injects an alternative
+ // DBusThreadManager using SetInstanceForTest first. The injected
+ // object will be owned by the internal pointer and deleted by
+ // Shutdown().
static void InitializeForTesting(DBusThreadManager* dbus_thread_manager);
// Initialize with stub implementations for tests based on stubs.
« no previous file with comments | « chrome/browser/extensions/api/system_private/system_private_apitest.cc ('k') | chromeos/dbus/dbus_thread_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698