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

Unified Diff: chrome/browser/importer/firefox_importer_browsertest.cc

Issue 616763002: Importing certain bookmarks from firefox and HTML file as search engines. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed dependency issue. Created 5 years, 11 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
Index: chrome/browser/importer/firefox_importer_browsertest.cc
diff --git a/chrome/browser/importer/firefox_importer_browsertest.cc b/chrome/browser/importer/firefox_importer_browsertest.cc
index 0076597829199f53f9f44a4cb58d14d5ce481185..2044a52d71537868007e7da37afc17947cd80b6d 100644
--- a/chrome/browser/importer/firefox_importer_browsertest.cc
+++ b/chrome/browser/importer/firefox_importer_browsertest.cc
@@ -106,6 +106,11 @@ const KeywordInfo kFirefoxKeywords[] = {
"http://www.webster.com/cgi-bin/dictionary?va={searchTerms}"},
// Search keywords.
{L"\x4E2D\x6587", L"\x4E2D\x6587", "http://www.google.com/"},
+ {L"keyword", L"keyword", "http://example.{searchTerms}.com/"},
+ // in_process_importer_bridge.cc:CreateTemplateURL() will return NULL for
+ // the following bookmark. Consequently, it won't be imported as a search
+ // engine.
+ {L"", L"", "http://%x.example.{searchTerms}.com/"},
};
const AutofillFormDataInfo kFirefoxAutofillEntries[] = {
@@ -143,7 +148,11 @@ class FirefoxObserver : public ProfileWriter,
EXPECT_EQ(arraysize(kFirefoxBookmarks), bookmark_count_);
EXPECT_EQ(1U, history_count_);
EXPECT_EQ(arraysize(kFirefoxPasswords), password_count_);
- EXPECT_EQ(arraysize(kFirefoxKeywords), keyword_count_);
+ // The following test case from |kFirefoxKeywords| won't be imported:
+ // "http://%x.example.{searchTerms}.com/"}.
+ // Hence, value of |keyword_count_| should be lower than size of
+ // |kFirefoxKeywords| by 1.
+ EXPECT_EQ(arraysize(kFirefoxKeywords) - 1, keyword_count_);
}
bool BookmarkModelIsLoaded() const override {
« no previous file with comments | « chrome/browser/importer/external_process_importer_client.cc ('k') | chrome/browser/importer/in_process_importer_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698