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

Side by Side Diff: content/public/test/browser_test_utils.cc

Issue 1544293002: Convert Pass()→std::move() in //content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/public/test/browser_test_utils.h" 5 #include "content/public/test/browser_test_utils.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility>
8 9
9 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
10 #include "base/bind.h" 11 #include "base/bind.h"
11 #include "base/command_line.h" 12 #include "base/command_line.h"
12 #include "base/json/json_reader.h" 13 #include "base/json/json_reader.h"
13 #include "base/macros.h" 14 #include "base/macros.h"
14 #include "base/process/kill.h" 15 #include "base/process/kill.h"
15 #include "base/rand_util.h" 16 #include "base/rand_util.h"
16 #include "base/strings/string_number_conversions.h" 17 #include "base/strings/string_number_conversions.h"
17 #include "base/strings/string_piece.h" 18 #include "base/strings/string_piece.h"
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 303
303 // Append the real part of the path to the new URL. 304 // Append the real part of the path to the new URL.
304 std::string path = params.substr(slash + 1); 305 std::string path = params.substr(slash + 1);
305 GURL redirect_target(redirect_server.Resolve(path)); 306 GURL redirect_target(redirect_server.Resolve(path));
306 DCHECK(redirect_target.is_valid()); 307 DCHECK(redirect_target.is_valid());
307 308
308 scoped_ptr<net::test_server::BasicHttpResponse> http_response( 309 scoped_ptr<net::test_server::BasicHttpResponse> http_response(
309 new net::test_server::BasicHttpResponse); 310 new net::test_server::BasicHttpResponse);
310 http_response->set_code(net::HTTP_MOVED_PERMANENTLY); 311 http_response->set_code(net::HTTP_MOVED_PERMANENTLY);
311 http_response->AddCustomHeader("Location", redirect_target.spec()); 312 http_response->AddCustomHeader("Location", redirect_target.spec());
312 return http_response.Pass(); 313 return std::move(http_response);
313 } 314 }
314 315
315 } // namespace 316 } // namespace
316 317
317 bool NavigateIframeToURL(WebContents* web_contents, 318 bool NavigateIframeToURL(WebContents* web_contents,
318 std::string iframe_id, 319 std::string iframe_id,
319 const GURL& url) { 320 const GURL& url) {
320 std::string script = base::StringPrintf( 321 std::string script = base::StringPrintf(
321 "setTimeout(\"" 322 "setTimeout(\""
322 "var iframes = document.getElementById('%s');iframes.src='%s';" 323 "var iframes = document.getElementById('%s');iframes.src='%s';"
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 void FrameWatcher::WaitFrames(int frames_to_wait) { 1097 void FrameWatcher::WaitFrames(int frames_to_wait) {
1097 if (frames_to_wait <= 0) 1098 if (frames_to_wait <= 0)
1098 return; 1099 return;
1099 base::RunLoop run_loop; 1100 base::RunLoop run_loop;
1100 base::AutoReset<base::Closure> reset_quit(&quit_, run_loop.QuitClosure()); 1101 base::AutoReset<base::Closure> reset_quit(&quit_, run_loop.QuitClosure());
1101 base::AutoReset<int> reset_frames_to_wait(&frames_to_wait_, frames_to_wait); 1102 base::AutoReset<int> reset_frames_to_wait(&frames_to_wait_, frames_to_wait);
1102 run_loop.Run(); 1103 run_loop.Run();
1103 } 1104 }
1104 1105
1105 } // namespace content 1106 } // namespace content
OLDNEW
« no previous file with comments | « content/public/renderer/media_stream_api.cc ('k') | content/public/test/mock_render_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698