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

Side by Side Diff: content/test/content_browser_test_utils.cc

Issue 12832004: content: Move all listeners of NOTIFICATION_RENDER_VIEW_HOST_CREATED out of content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 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 | Annotate | Revision Log
« no previous file with comments | « content/public/test/test_navigation_observer.cc ('k') | no next file » | 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) 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/test/content_browser_test_utils.h" 5 #include "content/test/content_browser_test_utils.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 21 matching lines...) Expand all
32 return net::FilePathToFileURL(GetTestFilePath(dir, file)); 32 return net::FilePathToFileURL(GetTestFilePath(dir, file));
33 } 33 }
34 34
35 void NavigateToURLBlockUntilNavigationsComplete(Shell* window, 35 void NavigateToURLBlockUntilNavigationsComplete(Shell* window,
36 const GURL& url, 36 const GURL& url,
37 int number_of_navigations) { 37 int number_of_navigations) {
38 WaitForLoadStop(window->web_contents()); 38 WaitForLoadStop(window->web_contents());
39 NavigationController* controller = &window->web_contents()->GetController(); 39 NavigationController* controller = &window->web_contents()->GetController();
40 TestNavigationObserver same_tab_observer( 40 TestNavigationObserver same_tab_observer(
41 Source<NavigationController>(controller), 41 Source<NavigationController>(controller),
42 NULL,
43 number_of_navigations); 42 number_of_navigations);
44 43
45 window->LoadURL(url); 44 window->LoadURL(url);
46 45
47 base::RunLoop run_loop; 46 base::RunLoop run_loop;
48 same_tab_observer.WaitForObservation( 47 same_tab_observer.WaitForObservation(
49 base::Bind(&RunThisRunLoop, base::Unretained(&run_loop)), 48 base::Bind(&RunThisRunLoop, base::Unretained(&run_loop)),
50 GetQuitTaskForRunLoop(&run_loop)); 49 GetQuitTaskForRunLoop(&run_loop));
51 } 50 }
52 51
(...skipping 30 matching lines...) Expand all
83 } 82 }
84 83
85 void ShellAddedObserver::ShellCreated(Shell* shell) { 84 void ShellAddedObserver::ShellCreated(Shell* shell) {
86 DCHECK(!shell_); 85 DCHECK(!shell_);
87 shell_ = shell; 86 shell_ = shell;
88 if (runner_) 87 if (runner_)
89 runner_->QuitClosure().Run(); 88 runner_->QuitClosure().Run();
90 } 89 }
91 90
92 } // namespace content 91 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/test_navigation_observer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698