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

Unified Diff: chrome/browser/sync/profile_sync_service_bookmark_unittest.cc

Issue 8561031: Replace ScopedCommandLineOverride with TestSuite listener. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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: chrome/browser/sync/profile_sync_service_bookmark_unittest.cc
diff --git a/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc b/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc
index f24106e497fd5a294ca5583aa5dda5a49081a582..086791cd3d21dda7a4ef0e88004b829ba9c018c6 100644
--- a/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc
@@ -9,7 +9,6 @@
#include <stack>
#include <vector>
-#include "base/command_line.h"
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/location.h"
@@ -33,6 +32,7 @@
#include "chrome/browser/sync/test/engine/test_id_factory.h"
#include "chrome/browser/sync/test/engine/test_user_share.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/test/base/scoped_command_line_override.h"
#include "chrome/test/base/testing_profile.h"
#include "content/test/test_browser_thread.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -287,7 +287,7 @@ class ProfileSyncServiceBookmarkTest : public testing::Test {
: ui_thread_(BrowserThread::UI, &message_loop_),
file_thread_(BrowserThread::FILE, &message_loop_),
model_(NULL),
- original_command_line_(*CommandLine::ForCurrentProcess()) {
+ override_(switches::kEnableSyncedBookmarksFolder) {
}
virtual ~ProfileSyncServiceBookmarkTest() {
@@ -297,13 +297,10 @@ class ProfileSyncServiceBookmarkTest : public testing::Test {
virtual void SetUp() {
test_user_share_.SetUp();
- CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kEnableSyncedBookmarksFolder);
}
virtual void TearDown() {
test_user_share_.TearDown();
- *CommandLine::ForCurrentProcess() = original_command_line_;
}
// Load (or re-load) the bookmark model. |load| controls use of the
@@ -517,7 +514,7 @@ class ProfileSyncServiceBookmarkTest : public testing::Test {
protected:
BookmarkModel* model_;
- CommandLine original_command_line_;
+ ScopedCommandLineOverride override_;
TestUserShare test_user_share_;
scoped_ptr<BookmarkChangeProcessor> change_processor_;
StrictMock<MockUnrecoverableErrorHandler> mock_unrecoverable_error_handler_;

Powered by Google App Engine
This is Rietveld 408576698