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

Unified Diff: chrome/browser/importer/safari_importer_unittest.mm

Issue 326024: Mac: remove some now-dead code and add a comment. (Closed)
Patch Set: Further changes as requested by Jeremy. Created 11 years, 2 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
« no previous file with comments | « chrome/browser/importer/safari_importer.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/importer/safari_importer_unittest.mm
diff --git a/chrome/browser/importer/safari_importer_unittest.mm b/chrome/browser/importer/safari_importer_unittest.mm
index f9ea7384ac5aedc9d6e50e3b01fda77a4639b96e..cc5e18942a2c97fbf1c8710609b2f8abbdb8548f 100644
--- a/chrome/browser/importer/safari_importer_unittest.mm
+++ b/chrome/browser/importer/safari_importer_unittest.mm
@@ -107,7 +107,6 @@ TEST_F(SafariImporterTest, BookmarkImport) {
EXPECT_EQ(entry.title, kImportedBookmarksData[i].title);
}
}
-
}
TEST_F(SafariImporterTest, FavIconImport) {
@@ -148,25 +147,15 @@ TEST_F(SafariImporterTest, FavIconImport) {
TEST_F(SafariImporterTest, CanImport) {
uint16 items = NONE;
EXPECT_TRUE(SafariImporter::CanImport(GetTestSafariLibraryPath(), &items));
- // We can't check the exact value of items because the HOME_PAGE bit depends
- // on the defaults of the current machine.
- EXPECT_EQ(items & HISTORY, HISTORY);
- EXPECT_EQ(items & FAVORITES, FAVORITES);
+ EXPECT_EQ(items, HISTORY | FAVORITES);
EXPECT_EQ(items & COOKIES, NONE);
EXPECT_EQ(items & PASSWORDS, NONE);
EXPECT_EQ(items & SEARCH_ENGINES, NONE);
+ EXPECT_EQ(items & HOME_PAGE, NONE);
// Check that we don't import anything from a bogus library directory.
FilePath fake_library_dir;
file_util::CreateNewTempDirectory("FakeSafariLibrary", &fake_library_dir);
FileAutoDeleter deleter(fake_library_dir);
-
- // Despite the fact that we're pointing to an empty library directory,
- // CanImport may still return true on systems where the Safari defaults
- // are defined. This means that we can't make assumptions about the return
- // value here.
- SafariImporter::CanImport(fake_library_dir, &items);
- EXPECT_EQ(items & ~HOME_PAGE, NONE); // See comment above about HOME_PAGE.
-
-
+ EXPECT_FALSE(SafariImporter::CanImport(fake_library_dir, &items));
}
« no previous file with comments | « chrome/browser/importer/safari_importer.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698