Chromium Code Reviews| Index: chrome/utility/importer/bookmarks_file_importer_unittest.cc |
| diff --git a/chrome/utility/importer/bookmarks_file_importer_unittest.cc b/chrome/utility/importer/bookmarks_file_importer_unittest.cc |
| index 5939c056ff195d04f6d91f5fdf9a91f46a99bbad..8cf2deca7261a53cb2844691b2aa0a6b112360dd 100644 |
| --- a/chrome/utility/importer/bookmarks_file_importer_unittest.cc |
| +++ b/chrome/utility/importer/bookmarks_file_importer_unittest.cc |
| @@ -7,12 +7,19 @@ |
| #include "testing/gtest/include/gtest/gtest.h" |
| #include "url/gurl.h" |
| +namespace bookmark_html_reader { |
| + |
| +bool CanImportURLAsSearchEngine(const GURL& url, base::string16* decoded_url); |
| + |
| +} // namespace namespace bookmark_html_reader |
|
Ilya Sherman
2014/09/30 20:54:13
nit: Why is this needed? Can you #include the app
Tapu Ghose
2014/10/07 02:02:44
Removed.
|
| + |
| namespace internal { |
| bool CanImportURL(const GURL& url); |
| } // namespace internal |
| + |
|
Ilya Sherman
2014/09/30 20:54:12
nit: Please revert this diff.
Tapu Ghose
2014/10/07 02:02:44
Done.
|
| TEST(BookmarksFileImporterTest, CanImportURL) { |
| struct TestCase { |
| const std::string url; |
| @@ -38,6 +45,23 @@ TEST(BookmarksFileImporterTest, CanImportURL) { |
| for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); ++i) { |
| EXPECT_EQ(test_cases[i].can_be_imported, |
| - internal::CanImportURL(GURL(test_cases[i].url))); |
| + internal::CanImportURL(GURL(test_cases[i].url))); |
|
Ilya Sherman
2014/09/30 20:54:12
nit: Please revert this diff.
Tapu Ghose
2014/10/07 02:02:44
Done.
|
| + } |
| +} |
| + |
| +TEST(BookmarksFileImporterTest, CanImportURLAsSearchEngine) { |
| + struct TestCase { |
| + const std::string url; |
| + const bool can_be_imported_as_search_engine; |
| + } test_cases[] = { |
| + { "http://www.example.%s.com", true }, |
| + { "wyciwyg://example.%s.com", false }, |
| + }; |
| + |
| + base::string16 decoded_url; |
| + for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); ++i) { |
| + EXPECT_EQ(test_cases[i].can_be_imported_as_search_engine, |
| + bookmark_html_reader::CanImportURLAsSearchEngine( |
| + GURL(test_cases[i].url), &decoded_url)); |
| } |
|
Ilya Sherman
2014/09/30 20:54:13
This test code belongs in the bookmark_html_reader
Tapu Ghose
2014/10/07 02:02:44
Removed. Corresponding test code is added to bookm
|
| } |