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

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

Issue 1545233002: Convert Pass()→std::move() in //net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 | « net/proxy/proxy_resolver_v8_tracing.cc ('k') | net/proxy/proxy_resolver_v8_tracing_wrapper.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/proxy_resolver_v8_tracing.h" 5 #include "net/proxy/proxy_resolver_v8_tracing.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility>
8 9
9 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
10 #include "base/path_service.h" 11 #include "base/path_service.h"
11 #include "base/run_loop.h" 12 #include "base/run_loop.h"
12 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
13 #include "base/synchronization/waitable_event.h" 14 #include "base/synchronization/waitable_event.h"
14 #include "base/threading/platform_thread.h" 15 #include "base/threading/platform_thread.h"
15 #include "base/threading/thread_checker.h" 16 #include "base/threading/thread_checker.h"
16 #include "base/values.h" 17 #include "base/values.h"
17 #include "net/base/net_errors.h" 18 #include "net/base/net_errors.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 136
136 scoped_ptr<ProxyResolverV8Tracing> CreateResolver( 137 scoped_ptr<ProxyResolverV8Tracing> CreateResolver(
137 scoped_ptr<ProxyResolverV8Tracing::Bindings> bindings, 138 scoped_ptr<ProxyResolverV8Tracing::Bindings> bindings,
138 const char* filename) { 139 const char* filename) {
139 scoped_ptr<ProxyResolverV8Tracing> resolver; 140 scoped_ptr<ProxyResolverV8Tracing> resolver;
140 scoped_ptr<ProxyResolverV8TracingFactory> factory( 141 scoped_ptr<ProxyResolverV8TracingFactory> factory(
141 ProxyResolverV8TracingFactory::Create()); 142 ProxyResolverV8TracingFactory::Create());
142 TestCompletionCallback callback; 143 TestCompletionCallback callback;
143 scoped_ptr<ProxyResolverFactory::Request> request; 144 scoped_ptr<ProxyResolverFactory::Request> request;
144 factory->CreateProxyResolverV8Tracing(LoadScriptData(filename), 145 factory->CreateProxyResolverV8Tracing(LoadScriptData(filename),
145 bindings.Pass(), &resolver, 146 std::move(bindings), &resolver,
146 callback.callback(), &request); 147 callback.callback(), &request);
147 EXPECT_EQ(OK, callback.WaitForResult()); 148 EXPECT_EQ(OK, callback.WaitForResult());
148 EXPECT_TRUE(resolver); 149 EXPECT_TRUE(resolver);
149 return resolver.Pass(); 150 return resolver;
150 } 151 }
151 152
152 TEST_F(ProxyResolverV8TracingTest, Simple) { 153 TEST_F(ProxyResolverV8TracingTest, Simple) {
153 MockCachingHostResolver host_resolver; 154 MockCachingHostResolver host_resolver;
154 MockBindings mock_bindings(&host_resolver); 155 MockBindings mock_bindings(&host_resolver);
155 156
156 scoped_ptr<ProxyResolverV8Tracing> resolver = 157 scoped_ptr<ProxyResolverV8Tracing> resolver =
157 CreateResolver(mock_bindings.CreateBindings(), "simple.js"); 158 CreateResolver(mock_bindings.CreateBindings(), "simple.js");
158 159
159 TestCompletionCallback callback; 160 TestCompletionCallback callback;
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 proxy_uri.substr(0, proxy_uri.find(':') + 1)); 1015 proxy_uri.substr(0, proxy_uri.find(':') + 1));
1015 } else { 1016 } else {
1016 NOTREACHED(); 1017 NOTREACHED();
1017 } 1018 }
1018 } 1019 }
1019 } 1020 }
1020 1021
1021 } // namespace 1022 } // namespace
1022 1023
1023 } // namespace net 1024 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_resolver_v8_tracing.cc ('k') | net/proxy/proxy_resolver_v8_tracing_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698