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

Unified Diff: chrome/browser/bookmarks/bookmark_html_writer_unittest.cc

Issue 6979007: Many fixes to bookmark importing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Happy tests =) Created 9 years, 7 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 | « no previous file | chrome/browser/importer/external_process_importer_bridge.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bookmarks/bookmark_html_writer_unittest.cc
diff --git a/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc b/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc
index e696aacc8aa2370d3914964e15cc647e83c89961..2f8046546611a5380a0b30b222cb674d46d4f13e 100644
--- a/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc
@@ -50,14 +50,13 @@ class BookmarkHTMLWriterTest : public TestingBrowserProcessTest {
}
// Converts a BookmarkEntry to a string suitable for assertion testing.
- string16 BookmarkEntryToString(
- const ProfileWriter::BookmarkEntry& entry) {
+ string16 BookmarkEntryToString(const ProfileWriter::BookmarkEntry& entry) {
string16 result;
result.append(ASCIIToUTF16("on_toolbar="));
if (entry.in_toolbar)
- result.append(ASCIIToUTF16("false"));
- else
result.append(ASCIIToUTF16("true"));
+ else
+ result.append(ASCIIToUTF16("false"));
result.append(ASCIIToUTF16(" url=") + UTF8ToUTF16(entry.url.spec()));
@@ -87,9 +86,6 @@ class BookmarkHTMLWriterTest : public TestingBrowserProcessTest {
ProfileWriter::BookmarkEntry entry;
entry.in_toolbar = on_toolbar;
entry.url = url;
- // The first path element should always be 'x', as that is what we passed
- // to the importer.
- entry.path.push_back(ASCIIToUTF16("x"));
if (!f1.empty()) {
entry.path.push_back(f1);
if (!f2.empty()) {
@@ -225,8 +221,6 @@ TEST_F(BookmarkHTMLWriterTest, Test) {
std::vector<history::ImportedFaviconUsage> favicons;
Firefox2Importer::ImportBookmarksFile(path_,
std::set<GURL>(),
- false,
- ASCIIToUTF16("x"),
NULL,
&parsed_bookmarks,
NULL,
@@ -249,13 +243,13 @@ TEST_F(BookmarkHTMLWriterTest, Test) {
// Windows and ChromeOS builds use Sentence case.
string16 bookmark_folder_name =
l10n_util::GetStringUTF16(IDS_BOOMARK_BAR_FOLDER_NAME);
- AssertBookmarkEntryEquals(parsed_bookmarks[0], false, url1, url1_title, t1,
+ AssertBookmarkEntryEquals(parsed_bookmarks[0], true, url1, url1_title, t1,
bookmark_folder_name, f1_title, string16());
- AssertBookmarkEntryEquals(parsed_bookmarks[1], false, url2, url2_title, t2,
+ AssertBookmarkEntryEquals(parsed_bookmarks[1], true, url2, url2_title, t2,
bookmark_folder_name, f1_title, f2_title);
- AssertBookmarkEntryEquals(parsed_bookmarks[2], false, url3, url3_title, t3,
+ AssertBookmarkEntryEquals(parsed_bookmarks[2], true, url3, url3_title, t3,
bookmark_folder_name, string16(), string16());
- AssertBookmarkEntryEquals(parsed_bookmarks[3], false, url4, url4_title, t4,
+ AssertBookmarkEntryEquals(parsed_bookmarks[3], true, url4, url4_title, t4,
bookmark_folder_name, string16(), string16());
AssertBookmarkEntryEquals(parsed_bookmarks[4], false, url1, url1_title, t1,
string16(), string16(), string16());
« no previous file with comments | « no previous file | chrome/browser/importer/external_process_importer_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698