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

Side by Side Diff: content/browser/resolve_proxy_msg_helper_unittest.cc

Issue 1768153002: base: eliminate TupleTraits and TupleTypes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « base/tuple.h ('k') | ppapi/proxy/nacl_message_scanner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/browser/resolve_proxy_msg_helper.h" 5 #include "content/browser/resolve_proxy_msg_helper.h"
6 6
7 #include "content/browser/browser_thread_impl.h" 7 #include "content/browser/browser_thread_impl.h"
8 #include "content/common/view_messages.h" 8 #include "content/common/view_messages.h"
9 #include "ipc/ipc_test_sink.h" 9 #include "ipc/ipc_test_sink.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 } 83 }
84 84
85 net::MockAsyncProxyResolverFactory* resolver_factory_; 85 net::MockAsyncProxyResolverFactory* resolver_factory_;
86 net::MockAsyncProxyResolver resolver_; 86 net::MockAsyncProxyResolver resolver_;
87 scoped_ptr<net::ProxyService> service_; 87 scoped_ptr<net::ProxyService> service_;
88 scoped_refptr<ResolveProxyMsgHelper> helper_; 88 scoped_refptr<ResolveProxyMsgHelper> helper_;
89 scoped_ptr<PendingResult> pending_result_; 89 scoped_ptr<PendingResult> pending_result_;
90 90
91 private: 91 private:
92 bool OnMessageReceived(const IPC::Message& msg) override { 92 bool OnMessageReceived(const IPC::Message& msg) override {
93 base::TupleTypes<ViewHostMsg_ResolveProxy::ReplyParam>::ValueTuple 93 ViewHostMsg_ResolveProxy::ReplyParam reply_data;
94 reply_data;
95 EXPECT_TRUE(ViewHostMsg_ResolveProxy::ReadReplyParam(&msg, &reply_data)); 94 EXPECT_TRUE(ViewHostMsg_ResolveProxy::ReadReplyParam(&msg, &reply_data));
96 DCHECK(!pending_result_.get()); 95 DCHECK(!pending_result_.get());
97 pending_result_.reset( 96 pending_result_.reset(
98 new PendingResult(base::get<0>(reply_data), base::get<1>(reply_data))); 97 new PendingResult(base::get<0>(reply_data), base::get<1>(reply_data)));
99 test_sink_.ClearMessages(); 98 test_sink_.ClearMessages();
100 return true; 99 return true;
101 } 100 }
102 101
103 base::MessageLoopForIO message_loop_; 102 base::MessageLoopForIO message_loop_;
104 BrowserThreadImpl io_thread_; 103 BrowserThreadImpl io_thread_;
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 256
258 EXPECT_EQ(0u, resolver_.pending_requests().size()); 257 EXPECT_EQ(0u, resolver_.pending_requests().size());
259 258
260 EXPECT_TRUE(pending_result() == NULL); 259 EXPECT_TRUE(pending_result() == NULL);
261 260
262 // It should also be the case that msg1, msg2, msg3 were deleted by the 261 // It should also be the case that msg1, msg2, msg3 were deleted by the
263 // cancellation. (Else will show up as a leak in Valgrind). 262 // cancellation. (Else will show up as a leak in Valgrind).
264 } 263 }
265 264
266 } // namespace content 265 } // namespace content
OLDNEW
« no previous file with comments | « base/tuple.h ('k') | ppapi/proxy/nacl_message_scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698