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

Unified Diff: chrome/browser/translate/translate_service.h

Issue 186063007: Move TranslateManager unit tests out of the browser_tests target. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: translatetests: Fix test clobbering Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/translate/translate_service.h
diff --git a/chrome/browser/translate/translate_service.h b/chrome/browser/translate/translate_service.h
index 818e90477a2d9a36376283d25cc28e122a874ca5..42385e3b53cf1875df6d83cd5746d67efc168c58 100644
--- a/chrome/browser/translate/translate_service.h
+++ b/chrome/browser/translate/translate_service.h
@@ -18,6 +18,15 @@ class TranslateService : public ResourceRequestAllowedNotifier::Observer {
// Must be called to shut down the Translate feature.
static void Shutdown(bool cleanup_pending_fetcher);
+ // Initializes the TranslateService in a way that it can be initialized
+ // multiple times in a unit test suite (once for each test). Should be paired
+ // with ShutdownForTesting at the end of the test.
+ static void InitializeForTesting();
+
+ // Shuts down the TranslateService at the end of a test in a way that the next
+ // test can initialize and use the service.
+ static void ShutdownForTesting();
+
// Let the caller decide if and when we should fetch the language list from
// the translate server. This is a NOOP if switches::kDisableTranslate is set
// or if prefs::kEnableTranslate is set to false.

Powered by Google App Engine
This is Rietveld 408576698