| 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 d841c9b770210d897876c4fd488ee24c368931bb..29097a8719709542a01dd3a865c1520adf70efe4 100644
|
| --- a/chrome/browser/importer/firefox_importer_browsertest.cc
|
| +++ b/chrome/browser/importer/firefox_importer_browsertest.cc
|
| @@ -67,31 +67,29 @@ const PasswordInfo kFirefoxPasswords[] = {
|
| };
|
|
|
| const KeywordInfo kFirefoxKeywords[] = {
|
| - { L"amazon.com",
|
| - "http://www.amazon.com/exec/obidos/external-search/?field-keywords="
|
| - "{searchTerms}&mode=blended" },
|
| - { L"answers.com",
|
| - "http://www.answers.com/main/ntquery?s={searchTerms}&gwp=13" },
|
| - { L"search.creativecommons.org",
|
| - "http://search.creativecommons.org/?q={searchTerms}" },
|
| - { L"search.ebay.com",
|
| - "http://search.ebay.com/search/search.dll?query={searchTerms}&"
|
| - "MfcISAPICommand=GetResult&ht=1&ebaytag1=ebayreg&srchdesc=n&"
|
| - "maxRecordsReturned=300&maxRecordsPerPage=50&SortProperty=MetaEndSort" },
|
| - { L"google.com",
|
| - "http://www.google.com/search?q={searchTerms}&ie=utf-8&oe=utf-8&aq=t" },
|
| - { L"en.wikipedia.org",
|
| - "http://en.wikipedia.org/wiki/Special:Search?search={searchTerms}" },
|
| - { L"search.yahoo.com",
|
| - "http://search.yahoo.com/search?p={searchTerms}&ei=UTF-8" },
|
| - { L"flickr.com",
|
| - "http://www.flickr.com/photos/tags/?q={searchTerms}" },
|
| - { L"imdb.com",
|
| - "http://www.imdb.com/find?q={searchTerms}" },
|
| - { L"webster.com",
|
| - "http://www.webster.com/cgi-bin/dictionary?va={searchTerms}" },
|
| - // Search keywords.
|
| - { L"\x4E2D\x6587", "http://www.google.com/" },
|
| + {L"amazon.com",
|
| + "http://www.amazon.com/exec/obidos/external-search/?field-keywords="
|
| + "{searchTerms}&mode=blended"},
|
| + {L"answers.com",
|
| + "http://www.answers.com/main/ntquery?s={searchTerms}&gwp=13"},
|
| + {L"search.creativecommons.org",
|
| + "http://search.creativecommons.org/?q={searchTerms}"},
|
| + {L"search.ebay.com",
|
| + "http://search.ebay.com/search/search.dll?query={searchTerms}&"
|
| + "MfcISAPICommand=GetResult&ht=1&ebaytag1=ebayreg&srchdesc=n&"
|
| + "maxRecordsReturned=300&maxRecordsPerPage=50&SortProperty=MetaEndSort"},
|
| + {L"google.com",
|
| + "http://www.google.com/search?q={searchTerms}&ie=utf-8&oe=utf-8&aq=t"},
|
| + {L"en.wikipedia.org",
|
| + "http://en.wikipedia.org/wiki/Special:Search?search={searchTerms}"},
|
| + {L"search.yahoo.com",
|
| + "http://search.yahoo.com/search?p={searchTerms}&ei=UTF-8"},
|
| + {L"flickr.com", "http://www.flickr.com/photos/tags/?q={searchTerms}"},
|
| + {L"imdb.com", "http://www.imdb.com/find?q={searchTerms}"},
|
| + {L"webster.com",
|
| + "http://www.webster.com/cgi-bin/dictionary?va={searchTerms}"},
|
| + // Search keywords.
|
| + {L"\x4E2D\x6587", "http://www.google.com/"},
|
| };
|
|
|
| class FirefoxObserver : public ProfileWriter,
|
| @@ -226,11 +224,10 @@ class FirefoxProfileImporterBrowserTest : public InProcessBrowserTest {
|
| InProcessBrowserTest::SetUp();
|
| }
|
|
|
| - void Firefox3xImporterBrowserTest(
|
| - std::string profile_dir,
|
| - importer::ImporterProgressObserver* observer,
|
| - ProfileWriter* writer,
|
| - bool import_search_plugins) {
|
| + void FirefoxImporterBrowserTest(std::string profile_dir,
|
| + importer::ImporterProgressObserver* observer,
|
| + ProfileWriter* writer,
|
| + bool import_search_plugins) {
|
| base::FilePath data_path;
|
| ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_path));
|
| data_path = data_path.AppendASCII(profile_dir);
|
| @@ -244,12 +241,6 @@ class FirefoxProfileImporterBrowserTest : public InProcessBrowserTest {
|
| base::CreateDirectory(search_engine_path);
|
| if (import_search_plugins) {
|
| ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_path));
|
| - data_path = data_path.AppendASCII("firefox3_searchplugins");
|
| - if (!base::PathExists(data_path)) {
|
| - // TODO(maruel): Create search test data that we can open source!
|
| - LOG(ERROR) << L"Missing internal test data";
|
| - return;
|
| - }
|
| ASSERT_TRUE(base::CopyDirectory(data_path, search_engine_path, false));
|
| }
|
|
|
| @@ -281,8 +272,8 @@ class FirefoxProfileImporterBrowserTest : public InProcessBrowserTest {
|
| IN_PROC_BROWSER_TEST_F(FirefoxProfileImporterBrowserTest,
|
| MAYBE_IMPORTER(Firefox30Importer)) {
|
| scoped_refptr<FirefoxObserver> observer(new FirefoxObserver());
|
| - Firefox3xImporterBrowserTest("firefox3_profile", observer.get(),
|
| - observer.get(), true);
|
| + FirefoxImporterBrowserTest(
|
| + "firefox3_profile", observer.get(), observer.get(), true);
|
| }
|
|
|
| IN_PROC_BROWSER_TEST_F(FirefoxProfileImporterBrowserTest,
|
| @@ -290,6 +281,14 @@ IN_PROC_BROWSER_TEST_F(FirefoxProfileImporterBrowserTest,
|
| bool import_search_engines = false;
|
| scoped_refptr<FirefoxObserver> observer(
|
| new FirefoxObserver(import_search_engines));
|
| - Firefox3xImporterBrowserTest("firefox35_profile", observer.get(),
|
| - observer.get(), import_search_engines);
|
| + FirefoxImporterBrowserTest("firefox35_profile",
|
| + observer.get(),
|
| + observer.get(),
|
| + import_search_engines);
|
| +}
|
| +
|
| +IN_PROC_BROWSER_TEST_F(FirefoxProfileImporterBrowserTest, FirefoxImporter) {
|
| + scoped_refptr<FirefoxObserver> observer(new FirefoxObserver());
|
| + FirefoxImporterBrowserTest(
|
| + "firefox_profile", observer.get(), observer.get(), true);
|
| }
|
|
|