diff options
author | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-16 11:19:39 +0000 |
---|---|---|
committer | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-16 11:19:39 +0000 |
commit | 961d1f88a188152331294e3ee099d2e57d4e5a1d (patch) | |
tree | 309348fb381cbffff17fa8407b1a2a63e988659e /chrome/browser/importer | |
parent | ac480ee572c8cc26c31fbce55d7b959f57abc9b6 (diff) | |
download | chromium_src-961d1f88a188152331294e3ee099d2e57d4e5a1d.zip chromium_src-961d1f88a188152331294e3ee099d2e57d4e5a1d.tar.gz chromium_src-961d1f88a188152331294e3ee099d2e57d4e5a1d.tar.bz2 |
Fix a subtle issue/bug for unit tests to use IsChromeFirstRun. Once first_run was set to 1 from one unit test,
there is no way for other unit tests to change the first_run state regardless first_run_sentinel exists or not.
In this case, IsChromeFirstRun already return true which may not be desirable for some unit test such as Toolbar5ImporterTest::BookmarkParse.
The issue won't cause any problem if all unit tests were run separately instead of in a single unit_test.exe.
But the change itself is minimal, and allow future unit tests for IsChromeFirstRun itself.
Bug=None
Test=None
Review URL: http://codereview.chromium.org/3038024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56197 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/importer')
-rw-r--r-- | chrome/browser/importer/toolbar_importer_unittest.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/importer/toolbar_importer_unittest.cc b/chrome/browser/importer/toolbar_importer_unittest.cc index 79b09fb..6b042de 100644 --- a/chrome/browser/importer/toolbar_importer_unittest.cc +++ b/chrome/browser/importer/toolbar_importer_unittest.cc @@ -320,7 +320,7 @@ static const char* kBadBookmarkNoLabels = // Test doesn't work if the importer thinks this is the first run of Chromium. // Mark this as a subsequent run of the browser. - FirstRun::CreateSentinel(); + FirstRun::first_run_ = FirstRun::FIRST_RUN_FALSE; // Test case 1 is parsing a basic bookmark with a single label. bookmark_xml = kGoodBookmark; |