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

Unified Diff: chrome/test/in_process_browser_test.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/in_process_browser_test.h ('k') | chrome/test/unit/chrome_test_suite.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/in_process_browser_test.cc
===================================================================
--- chrome/test/in_process_browser_test.cc (revision 20760)
+++ chrome/test/in_process_browser_test.cc (working copy)
@@ -26,7 +26,7 @@
#include "chrome/common/main_function_params.h"
#include "chrome/test/testing_browser_process.h"
#include "chrome/test/ui_test_utils.h"
-#include "net/base/host_resolver_unittest.h"
+#include "net/base/mock_host_resolver.h"
#include "sandbox/src/dep.h"
extern int BrowserMain(const MainFunctionParams&);
@@ -140,10 +140,11 @@
params.ui_task =
NewRunnableMethod(this, &InProcessBrowserTest::RunTestOnMainThreadLoop);
- scoped_refptr<net::RuleBasedHostMapper> host_mapper(
- new net::RuleBasedHostMapper());
- ConfigureHostMapper(host_mapper.get());
- net::ScopedHostMapper scoped_host_mapper(host_mapper.get());
+ scoped_refptr<net::RuleBasedHostResolverProc> host_resolver_proc(
+ new net::RuleBasedHostResolverProc(NULL));
+ ConfigureHostResolverProc(host_resolver_proc);
+ net::ScopedDefaultHostResolverProc scoped_host_resolver_proc(
+ host_resolver_proc);
BrowserMain(params);
}
@@ -241,12 +242,12 @@
MessageLoopForUI::current()->Quit();
}
-void InProcessBrowserTest::ConfigureHostMapper(
- net::RuleBasedHostMapper* host_mapper) {
- host_mapper->AllowDirectLookup("*.google.com");
+void InProcessBrowserTest::ConfigureHostResolverProc(
+ net::RuleBasedHostResolverProc* host_resolver_proc) {
+ host_resolver_proc->AllowDirectLookup("*.google.com");
// See http://en.wikipedia.org/wiki/Web_Proxy_Autodiscovery_Protocol
// We don't want the test code to use it.
- host_mapper->AddSimulatedFailure("wpad");
+ host_resolver_proc->AddSimulatedFailure("wpad");
}
void InProcessBrowserTest::TimedOut() {
« no previous file with comments | « chrome/test/in_process_browser_test.h ('k') | chrome/test/unit/chrome_test_suite.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698