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

Side by Side Diff: chrome/browser/search_engines/template_url_scraper_unittest.cc

Issue 149511: Refactorings surrounding HostResolver:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Merge in socks5_client_socket_unittest.cc Created 11 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/net/dns_master_unittest.cc ('k') | chrome/test/in_process_browser_test.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #include "chrome/browser/browser.h" 5 #include "chrome/browser/browser.h"
6 #include "chrome/browser/profile.h" 6 #include "chrome/browser/profile.h"
7 #include "chrome/browser/search_engines/template_url_model.h" 7 #include "chrome/browser/search_engines/template_url_model.h"
8 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" 8 #include "chrome/browser/search_engines/template_url_prepopulate_data.h"
9 #include "chrome/common/notification_registrar.h" 9 #include "chrome/common/notification_registrar.h"
10 #include "chrome/common/notification_source.h" 10 #include "chrome/common/notification_source.h"
11 #include "chrome/common/notification_type.h" 11 #include "chrome/common/notification_type.h"
12 #include "chrome/test/in_process_browser_test.h" 12 #include "chrome/test/in_process_browser_test.h"
13 #include "chrome/test/ui_test_utils.h" 13 #include "chrome/test/ui_test_utils.h"
14 #include "net/base/host_resolver_unittest.h" 14 #include "net/base/mock_host_resolver.h"
15 #include "net/base/net_util.h" 15 #include "net/base/net_util.h"
16 16
17 namespace { 17 namespace {
18 class TemplateURLScraperTest : public InProcessBrowserTest { 18 class TemplateURLScraperTest : public InProcessBrowserTest {
19 public: 19 public:
20 TemplateURLScraperTest() { 20 TemplateURLScraperTest() {
21 } 21 }
22 22
23 protected: 23 protected:
24 virtual void ConfigureHostMapper(net::RuleBasedHostMapper* host_mapper) { 24 virtual void ConfigureHostResolverProc(net::RuleBasedHostResolverProc* proc) {
25 InProcessBrowserTest::ConfigureHostMapper(host_mapper); 25 InProcessBrowserTest::ConfigureHostResolverProc(proc);
26 // We use foo.com in our tests. 26 // We use foo.com in our tests.
27 host_mapper->AddRule("*.foo.com", "localhost"); 27 proc->AddRule("*.foo.com", "localhost");
28 } 28 }
29 29
30 private: 30 private:
31 DISALLOW_COPY_AND_ASSIGN(TemplateURLScraperTest); 31 DISALLOW_COPY_AND_ASSIGN(TemplateURLScraperTest);
32 }; 32 };
33 33
34 class TemplateURLModelLoader : public NotificationObserver { 34 class TemplateURLModelLoader : public NotificationObserver {
35 public: 35 public:
36 explicit TemplateURLModelLoader(TemplateURLModel* model) : model_(model) { 36 explicit TemplateURLModelLoader(TemplateURLModel* model) : model_(model) {
37 registrar_.Add(this, NotificationType::TEMPLATE_URL_MODEL_LOADED, 37 registrar_.Add(this, NotificationType::TEMPLATE_URL_MODEL_LOADED,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 HTTPTestServer::CreateServerWithFileRootURL( 81 HTTPTestServer::CreateServerWithFileRootURL(
82 L"chrome/test/data/template_url_scraper/submit_handler", L"/", 82 L"chrome/test/data/template_url_scraper/submit_handler", L"/",
83 g_browser_process->io_thread()->message_loop())); 83 g_browser_process->io_thread()->message_loop()));
84 ui_test_utils::NavigateToURLBlockUntilNavigationsComplete( 84 ui_test_utils::NavigateToURLBlockUntilNavigationsComplete(
85 browser(), GURL("http://www.foo.com:1337/"), 2); 85 browser(), GURL("http://www.foo.com:1337/"), 2);
86 86
87 all_urls = template_urls->GetTemplateURLs(); 87 all_urls = template_urls->GetTemplateURLs();
88 EXPECT_EQ(1, all_urls.size() - prepopulate_urls.size()); 88 EXPECT_EQ(1, all_urls.size() - prepopulate_urls.size());
89 } 89 }
90 */ 90 */
OLDNEW
« no previous file with comments | « chrome/browser/net/dns_master_unittest.cc ('k') | chrome/test/in_process_browser_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698