| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/profiles/profile.h" | 5 #include "chrome/browser/profiles/profile.h" |
| 6 #include "chrome/browser/search_engines/template_url_service.h" |
| 6 #include "chrome/browser/search_engines/template_url_service_factory.h" | 7 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 7 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
| 8 #include "chrome/test/base/in_process_browser_test.h" | 9 #include "chrome/test/base/in_process_browser_test.h" |
| 9 #include "chrome/test/base/ui_test_utils.h" | 10 #include "chrome/test/base/ui_test_utils.h" |
| 10 #include "components/search_engines/template_url_prepopulate_data.h" | 11 #include "components/search_engines/template_url_prepopulate_data.h" |
| 11 #include "components/search_engines/template_url_service.h" | |
| 12 #include "net/base/net_util.h" | 12 #include "net/base/net_util.h" |
| 13 #include "net/dns/mock_host_resolver.h" | 13 #include "net/dns/mock_host_resolver.h" |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 class TemplateURLScraperTest : public InProcessBrowserTest { | 16 class TemplateURLScraperTest : public InProcessBrowserTest { |
| 17 public: | 17 public: |
| 18 TemplateURLScraperTest() { | 18 TemplateURLScraperTest() { |
| 19 } | 19 } |
| 20 | 20 |
| 21 private: | 21 private: |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 HTTPTestServer::CreateServerWithFileRootURL( | 68 HTTPTestServer::CreateServerWithFileRootURL( |
| 69 L"chrome/test/data/template_url_scraper/submit_handler", L"/", | 69 L"chrome/test/data/template_url_scraper/submit_handler", L"/", |
| 70 g_browser_process->io_thread()->message_loop())); | 70 g_browser_process->io_thread()->message_loop())); |
| 71 ui_test_utils::NavigateToURLBlockUntilNavigationsComplete( | 71 ui_test_utils::NavigateToURLBlockUntilNavigationsComplete( |
| 72 browser(), GURL("http://www.foo.com:1337/"), 2); | 72 browser(), GURL("http://www.foo.com:1337/"), 2); |
| 73 | 73 |
| 74 all_urls = template_urls->GetTemplateURLs(); | 74 all_urls = template_urls->GetTemplateURLs(); |
| 75 EXPECT_EQ(1, all_urls.size() - prepopulate_urls.size()); | 75 EXPECT_EQ(1, all_urls.size() - prepopulate_urls.size()); |
| 76 } | 76 } |
| 77 */ | 77 */ |
| OLD | NEW |