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

Unified Diff: net/proxy/proxy_resolver_v8_unittest.cc

Issue 118100: Avoid doing concurrent DNS resolves of the same hostname (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Get compiling on mac Created 11 years, 6 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
Index: net/proxy/proxy_resolver_v8_unittest.cc
===================================================================
--- net/proxy/proxy_resolver_v8_unittest.cc (revision 18213)
+++ net/proxy/proxy_resolver_v8_unittest.cc (working copy)
@@ -6,6 +6,7 @@
#include "base/string_util.h"
#include "base/path_service.h"
#include "googleurl/src/gurl.h"
+#include "net/base/host_resolver.h"
#include "net/base/net_errors.h"
#include "net/proxy/proxy_resolver_v8.h"
#include "net/proxy/proxy_info.h"
@@ -377,8 +378,9 @@
TEST(ProxyResolverV8DefaultBindingsTest, DnsResolve) {
// Get a hold of a DefaultJSBindings* (it is a hidden impl class).
- net::ProxyResolverV8 resolver;
- net::ProxyResolverV8::JSBindings* bindings = resolver.js_bindings();
+ net::HostResolver host_resolver;
+ scoped_ptr<net::ProxyResolverV8::JSBindings> bindings(
+ net::ProxyResolverV8::CreateDefaultBindings(&host_resolver, NULL));
// Considered an error.
EXPECT_EQ("", bindings->DnsResolve(""));
@@ -428,8 +430,9 @@
TEST(ProxyResolverV8DefaultBindingsTest, MyIpAddress) {
// Get a hold of a DefaultJSBindings* (it is a hidden impl class).
- net::ProxyResolverV8 resolver;
- net::ProxyResolverV8::JSBindings* bindings = resolver.js_bindings();
+ net::HostResolver host_resolver;
+ scoped_ptr<net::ProxyResolverV8::JSBindings> bindings(
+ net::ProxyResolverV8::CreateDefaultBindings(&host_resolver, NULL));
// Our ip address is always going to be 127.0.0.1, since we are using a
// mock host mapper when running in unit-test mode.

Powered by Google App Engine
This is Rietveld 408576698