| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/file_util.h" | 5 #include "base/file_util.h" |
| 6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
| 7 #include "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 | 173 |
| 174 virtual void AddKeywords(ScopedVector<TemplateURL> template_urls, | 174 virtual void AddKeywords(ScopedVector<TemplateURL> template_urls, |
| 175 bool unique_on_host_and_path) OVERRIDE { | 175 bool unique_on_host_and_path) OVERRIDE { |
| 176 for (size_t i = 0; i < template_urls.size(); ++i) { | 176 for (size_t i = 0; i < template_urls.size(); ++i) { |
| 177 // The order might not be deterministic, look in the expected list for | 177 // The order might not be deterministic, look in the expected list for |
| 178 // that template URL. | 178 // that template URL. |
| 179 bool found = false; | 179 bool found = false; |
| 180 base::string16 keyword = template_urls[i]->keyword(); | 180 base::string16 keyword = template_urls[i]->keyword(); |
| 181 for (size_t j = 0; j < arraysize(kFirefoxKeywords); ++j) { | 181 for (size_t j = 0; j < arraysize(kFirefoxKeywords); ++j) { |
| 182 if (template_urls[i]->keyword() == | 182 if (template_urls[i]->keyword() == |
| 183 WideToUTF16Hack(kFirefoxKeywords[j].keyword)) { | 183 base::WideToUTF16Hack(kFirefoxKeywords[j].keyword)) { |
| 184 EXPECT_EQ(kFirefoxKeywords[j].url, template_urls[i]->url()); | 184 EXPECT_EQ(kFirefoxKeywords[j].url, template_urls[i]->url()); |
| 185 found = true; | 185 found = true; |
| 186 break; | 186 break; |
| 187 } | 187 } |
| 188 } | 188 } |
| 189 EXPECT_TRUE(found); | 189 EXPECT_TRUE(found); |
| 190 ++keyword_count_; | 190 ++keyword_count_; |
| 191 } | 191 } |
| 192 } | 192 } |
| 193 | 193 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 } | 286 } |
| 287 | 287 |
| 288 IN_PROC_BROWSER_TEST_F(FirefoxProfileImporterBrowserTest, | 288 IN_PROC_BROWSER_TEST_F(FirefoxProfileImporterBrowserTest, |
| 289 MAYBE_IMPORTER(Firefox35Importer)) { | 289 MAYBE_IMPORTER(Firefox35Importer)) { |
| 290 bool import_search_engines = false; | 290 bool import_search_engines = false; |
| 291 scoped_refptr<FirefoxObserver> observer( | 291 scoped_refptr<FirefoxObserver> observer( |
| 292 new FirefoxObserver(import_search_engines)); | 292 new FirefoxObserver(import_search_engines)); |
| 293 Firefox3xImporterBrowserTest("firefox35_profile", observer.get(), | 293 Firefox3xImporterBrowserTest("firefox35_profile", observer.get(), |
| 294 observer.get(), import_search_engines); | 294 observer.get(), import_search_engines); |
| 295 } | 295 } |
| OLD | NEW |