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

Unified Diff: chrome/test/base/ui_test_utils.cc

Issue 8983012: Get rid of content::NavigationController in cc file and use "using" instead. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/base/ui_test_utils.cc
===================================================================
--- chrome/test/base/ui_test_utils.cc (revision 116288)
+++ chrome/test/base/ui_test_utils.cc (working copy)
@@ -68,6 +68,7 @@
#include "ui/aura/root_window.h"
#endif
+using content::NavigationController;
using content::NavigationEntry;
using content::OpenURLParams;
using content::Referrer;
@@ -314,10 +315,10 @@
return true;
}
-void WaitForNavigations(content::NavigationController* controller,
+void WaitForNavigations(NavigationController* controller,
int number_of_navigations) {
TestNavigationObserver observer(
- content::Source<content::NavigationController>(controller), NULL,
+ content::Source<NavigationController>(controller), NULL,
number_of_navigations);
observer.WaitForObservation(
base::Bind(&ui_test_utils::RunMessageLoop),
@@ -341,7 +342,7 @@
void WaitForLoadStop(WebContents* tab) {
WindowedNotificationObserver load_stop_observer(
content::NOTIFICATION_LOAD_STOP,
- content::Source<content::NavigationController>(&tab->GetController()));
+ content::Source<NavigationController>(&tab->GetController()));
// In many cases, the load may have finished before we get here. Only wait if
// the tab still has a pending navigation.
if (!tab->IsLoading())
@@ -402,11 +403,11 @@
int browser_test_flags) {
if (disposition == CURRENT_TAB && browser->GetSelectedWebContents())
WaitForLoadStop(browser->GetSelectedWebContents());
- content::NavigationController* controller =
+ NavigationController* controller =
browser->GetSelectedWebContents() ?
&browser->GetSelectedWebContents()->GetController() : NULL;
TestNavigationObserver same_tab_observer(
- content::Source<content::NavigationController>(controller),
+ content::Source<NavigationController>(controller),
NULL,
number_of_navigations);
@@ -452,7 +453,7 @@
base::Unretained(MessageLoopForUI::current())));
return;
} else if (web_contents) {
- content::NavigationController* controller = &web_contents->GetController();
+ NavigationController* controller = &web_contents->GetController();
WaitForNavigations(controller, number_of_navigations);
return;
}
@@ -931,8 +932,7 @@
notification_registrar_.Add(
this,
content::NOTIFICATION_LOAD_STOP,
- content::Source<content::NavigationController>(
- &web_contents->GetController()));
+ content::Source<NavigationController>(&web_contents->GetController()));
}
void TitleWatcher::AlsoWaitForTitle(const string16& expected_title) {
@@ -957,8 +957,8 @@
WebContents* source_contents = content::Source<WebContents>(source).ptr();
ASSERT_EQ(web_contents_, source_contents);
} else if (type == content::NOTIFICATION_LOAD_STOP) {
- content::NavigationController* controller =
- content::Source<content::NavigationController>(source).ptr();
+ NavigationController* controller =
+ content::Source<NavigationController>(source).ptr();
ASSERT_EQ(&web_contents_->GetController(), controller);
} else {
FAIL() << "Unexpected notification received.";
« no previous file with comments | « chrome/test/base/test_tab_strip_model_observer.cc ('k') | content/browser/speech/speech_input_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698