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

Side by Side Diff: net/proxy/mojo_proxy_resolver_factory_impl_unittest.cc

Issue 2083463002: Replace //net TypeConverters with StructTraits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@type-converter-cleanup--gurl
Patch Set: rebase Created 4 years, 2 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "net/proxy/mojo_proxy_resolver_factory_impl.h" 5 #include "net/proxy/mojo_proxy_resolver_factory_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 instances_destroyed_++; 116 instances_destroyed_++;
117 waiter_.NotifyEvent(RESOLVER_DESTROYED); 117 waiter_.NotifyEvent(RESOLVER_DESTROYED);
118 } 118 }
119 119
120 void ReportResult(int32_t error) override { create_callback_.Run(error); } 120 void ReportResult(int32_t error) override { create_callback_.Run(error); }
121 121
122 void Alert(const mojo::String& message) override {} 122 void Alert(const mojo::String& message) override {}
123 123
124 void OnError(int32_t line_number, const mojo::String& message) override {} 124 void OnError(int32_t line_number, const mojo::String& message) override {}
125 125
126 void ResolveDns(interfaces::HostResolverRequestInfoPtr request_info, 126 void ResolveDns(std::unique_ptr<HostResolver::RequestInfo> request_info,
127 interfaces::HostResolverRequestClientPtr client) override {} 127 interfaces::HostResolverRequestClientPtr client) override {}
128 128
129 protected: 129 protected:
130 std::unique_ptr<TestProxyResolverFactory> mock_factory_owner_; 130 std::unique_ptr<TestProxyResolverFactory> mock_factory_owner_;
131 TestProxyResolverFactory* mock_factory_; 131 TestProxyResolverFactory* mock_factory_;
132 interfaces::ProxyResolverFactoryPtr factory_; 132 interfaces::ProxyResolverFactoryPtr factory_;
133 133
134 int instances_destroyed_ = 0; 134 int instances_destroyed_ = 0;
135 CompletionCallback create_callback_; 135 CompletionCallback create_callback_;
136 136
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 base::Bind(&MojoProxyResolverFactoryImplTest::OnConnectionError, 221 base::Bind(&MojoProxyResolverFactoryImplTest::OnConnectionError,
222 base::Unretained(this))); 222 base::Unretained(this)));
223 waiter_.WaitForEvent(RESOLVER_CREATED); 223 waiter_.WaitForEvent(RESOLVER_CREATED);
224 EXPECT_EQ(0, instances_destroyed_); 224 EXPECT_EQ(0, instances_destroyed_);
225 ASSERT_EQ(1u, mock_factory_->requests_handled()); 225 ASSERT_EQ(1u, mock_factory_->requests_handled());
226 factory_.reset(); 226 factory_.reset();
227 waiter_.WaitForEvent(CONNECTION_ERROR); 227 waiter_.WaitForEvent(CONNECTION_ERROR);
228 } 228 }
229 229
230 } // namespace net 230 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698