Index: chrome/browser/bookmarks/bookmark_model_unittest.cc |
diff --git a/chrome/browser/bookmarks/bookmark_model_unittest.cc b/chrome/browser/bookmarks/bookmark_model_unittest.cc |
index b3cb34c16cec26278458cac7dfaefd463ff38446..a738030a32d5c673df533764857c4edab8900e13 100644 |
--- a/chrome/browser/bookmarks/bookmark_model_unittest.cc |
+++ b/chrome/browser/bookmarks/bookmark_model_unittest.cc |
@@ -7,7 +7,6 @@ |
#include "base/base_paths.h" |
#include "base/basictypes.h" |
-#include "base/command_line.h" |
#include "base/compiler_specific.h" |
#include "base/file_util.h" |
#include "base/hash_tables.h" |
@@ -26,6 +25,7 @@ |
#include "chrome/common/chrome_paths.h" |
#include "chrome/common/chrome_switches.h" |
#include "chrome/test/base/model_test_utils.h" |
+#include "chrome/test/base/scoped_command_line_override.h" |
#include "chrome/test/base/testing_profile.h" |
#include "content/public/browser/notification_details.h" |
#include "content/public/browser/notification_registrar.h" |
@@ -88,16 +88,11 @@ class BookmarkModelTest : public testing::Test, |
}; |
BookmarkModelTest() |
- : model_(NULL), |
- original_command_line_(*CommandLine::ForCurrentProcess()) { |
+ : model_(NULL) { |
model_.AddObserver(this); |
ClearCounts(); |
} |
- virtual void TearDown() OVERRIDE { |
- *CommandLine::ForCurrentProcess() = original_command_line_; |
- } |
- |
void Loaded(BookmarkModel* model, bool ids_reassigned) OVERRIDE { |
// We never load from the db, so that this should never get invoked. |
NOTREACHED(); |
@@ -167,8 +162,6 @@ class BookmarkModelTest : public testing::Test, |
ObserverDetails observer_details_; |
private: |
- CommandLine original_command_line_; |
- |
int added_count_; |
int moved_count_; |
int removed_count_; |
@@ -1029,8 +1022,7 @@ TEST_F(BookmarkModelTest, NodeVisibility) { |
} |
TEST_F(BookmarkModelTest, SyncNodeVisibileIfFlagSet) { |
- CommandLine::ForCurrentProcess()->AppendSwitch( |
- switches::kEnableSyncedBookmarksFolder); |
+ ScopedCommandLineOverride override(switches::kEnableSyncedBookmarksFolder); |
EXPECT_TRUE(model_.synced_node()->IsVisible()); |
} |