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

Unified Diff: net/proxy/mojo_proxy_resolver_impl_unittest.cc

Issue 1157163003: Remove ProxyResolver::(Cancel)SetPacScript and LegacyProxyResolverFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v8-proxy-resolver-refactor
Patch Set: Created 5 years, 7 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 | « net/proxy/mojo_proxy_resolver_factory_impl_unittest.cc ('k') | net/proxy/multi_threaded_proxy_resolver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/mojo_proxy_resolver_impl_unittest.cc
diff --git a/net/proxy/mojo_proxy_resolver_impl_unittest.cc b/net/proxy/mojo_proxy_resolver_impl_unittest.cc
index 7747967db0773531140411a96e360ee789c3045a..b9fa785e9347a3c9de5b59b716483a881b831b58 100644
--- a/net/proxy/mojo_proxy_resolver_impl_unittest.cc
+++ b/net/proxy/mojo_proxy_resolver_impl_unittest.cc
@@ -92,12 +92,12 @@ void TestRequestClient::OnConnectionError() {
event_waiter_.NotifyEvent(CONNECTION_ERROR);
}
-class CallbackMockProxyResolver : public MockAsyncProxyResolverExpectsBytes {
+class CallbackMockProxyResolver : public MockAsyncProxyResolver {
public:
CallbackMockProxyResolver() {}
~CallbackMockProxyResolver() override;
- // MockAsyncProxyResolverExpectsBytes overrides.
+ // MockAsyncProxyResolver overrides.
int GetProxyForURL(const GURL& url,
ProxyInfo* results,
const CompletionCallback& callback,
@@ -131,12 +131,12 @@ int CallbackMockProxyResolver::GetProxyForURL(
sync_result_.reset();
return OK;
}
- return MockAsyncProxyResolverExpectsBytes::GetProxyForURL(
- url, results, callback, request_handle, net_log);
+ return MockAsyncProxyResolver::GetProxyForURL(url, results, callback,
+ request_handle, net_log);
}
void CallbackMockProxyResolver::CancelRequest(RequestHandle request_handle) {
- MockAsyncProxyResolverExpectsBytes::CancelRequest(request_handle);
+ MockAsyncProxyResolver::CancelRequest(request_handle);
if (!cancel_callback_.is_null()) {
cancel_callback_.Run();
cancel_callback_.Reset();
@@ -191,7 +191,7 @@ TEST_F(MojoProxyResolverImplTest, GetProxyForUrl) {
resolver_->GetProxyForUrl("http://example.com", client_ptr.Pass());
ASSERT_EQ(1u, mock_proxy_resolver_->pending_requests().size());
- scoped_refptr<MockAsyncProxyResolverBase::Request> request =
+ scoped_refptr<MockAsyncProxyResolver::Request> request =
mock_proxy_resolver_->pending_requests()[0];
EXPECT_EQ(GURL("http://example.com"), request->url());
@@ -263,7 +263,7 @@ TEST_F(MojoProxyResolverImplTest, GetProxyForUrlFailure) {
resolver_->GetProxyForUrl("http://example.com", client_ptr.Pass());
ASSERT_EQ(1u, mock_proxy_resolver_->pending_requests().size());
- scoped_refptr<MockAsyncProxyResolverBase::Request> request =
+ scoped_refptr<MockAsyncProxyResolver::Request> request =
mock_proxy_resolver_->pending_requests()[0];
EXPECT_EQ(GURL("http://example.com"), request->url());
request->CompleteNow(ERR_FAILED);
@@ -284,10 +284,10 @@ TEST_F(MojoProxyResolverImplTest, GetProxyForUrlMultiple) {
resolver_->GetProxyForUrl("http://example.com", client_ptr1.Pass());
resolver_->GetProxyForUrl("https://example.com", client_ptr2.Pass());
ASSERT_EQ(2u, mock_proxy_resolver_->pending_requests().size());
- scoped_refptr<MockAsyncProxyResolverBase::Request> request1 =
+ scoped_refptr<MockAsyncProxyResolver::Request> request1 =
mock_proxy_resolver_->pending_requests()[0];
EXPECT_EQ(GURL("http://example.com"), request1->url());
- scoped_refptr<MockAsyncProxyResolverBase::Request> request2 =
+ scoped_refptr<MockAsyncProxyResolver::Request> request2 =
mock_proxy_resolver_->pending_requests()[1];
EXPECT_EQ(GURL("https://example.com"), request2->url());
request1->results()->UsePacString("HTTPS proxy.example.com:12345");
@@ -323,7 +323,7 @@ TEST_F(MojoProxyResolverImplTest, DestroyClient) {
resolver_->GetProxyForUrl("http://example.com", client_ptr.Pass());
ASSERT_EQ(1u, mock_proxy_resolver_->pending_requests().size());
- scoped_refptr<MockAsyncProxyResolverBase::Request> request =
+ scoped_refptr<MockAsyncProxyResolver::Request> request =
mock_proxy_resolver_->pending_requests()[0];
EXPECT_EQ(GURL("http://example.com"), request->url());
request->results()->UsePacString("PROXY proxy.example.com:8080");
@@ -337,7 +337,7 @@ TEST_F(MojoProxyResolverImplTest, DestroyService) {
resolver_->GetProxyForUrl("http://example.com", client_ptr.Pass());
ASSERT_EQ(1u, mock_proxy_resolver_->pending_requests().size());
- scoped_refptr<MockAsyncProxyResolverBase::Request> request =
+ scoped_refptr<MockAsyncProxyResolver::Request> request =
mock_proxy_resolver_->pending_requests()[0];
resolver_impl_.reset();
client.event_waiter().WaitForEvent(TestRequestClient::CONNECTION_ERROR);
« no previous file with comments | « net/proxy/mojo_proxy_resolver_factory_impl_unittest.cc ('k') | net/proxy/multi_threaded_proxy_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698