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

Unified Diff: chrome/browser/autofill/autofill_browsertest.cc

Issue 10702029: Move tab functions off Browser into browser_tabstrip and browser_tabrestore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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/browser/autofill/autofill_browsertest.cc
===================================================================
--- chrome/browser/autofill/autofill_browsertest.cc (revision 145001)
+++ chrome/browser/autofill/autofill_browsertest.cc (working copy)
@@ -19,6 +19,7 @@
#include "chrome/browser/translate/translate_infobar_delegate.h"
#include "chrome/browser/translate/translate_manager.h"
#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/common/chrome_notification_types.h"
@@ -132,14 +133,14 @@
const std::string& expected_value) {
std::string value;
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
- browser()->GetActiveWebContents()->GetRenderViewHost(), L"",
+ chrome::GetActiveWebContents(browser())->GetRenderViewHost(), L"",
L"window.domAutomationController.send("
L"document.getElementById('" + field_name + L"').value);", &value));
EXPECT_EQ(expected_value, value);
}
RenderViewHost* render_view_host() {
- return browser()->GetActiveWebContents()->GetRenderViewHost();
+ return chrome::GetActiveWebContents(browser())->GetRenderViewHost();
}
void SimulateURLFetch(bool success) {
@@ -184,7 +185,7 @@
void FocusFirstNameField() {
LOG(WARNING) << "Clicking on the tab.";
- ui_test_utils::SimulateMouseClick(browser()->GetActiveWebContents());
+ ui_test_utils::SimulateMouseClick(chrome::GetActiveWebContents(browser()));
LOG(WARNING) << "Focusing the first name field.";
bool result = false;
@@ -213,8 +214,8 @@
void SendKeyAndWait(ui::KeyboardCode key, int notification_type) {
ui_test_utils::WindowedNotificationObserver observer(
notification_type, content::Source<RenderViewHost>(render_view_host()));
- ui_test_utils::SimulateKeyPress(
- browser()->GetActiveWebContents(), key, false, false, false, false);
+ ui_test_utils::SimulateKeyPress(chrome::GetActiveWebContents(
+ browser()), key, false, false, false, false);
observer.Wait();
}
@@ -622,7 +623,7 @@
// Reload the page.
LOG(WARNING) << "Reloading the page.";
- WebContents* tab = browser()->GetActiveWebContents();
+ WebContents* tab = chrome::GetActiveWebContents(browser());
tab->GetController().Reload(false);
ui_test_utils::WaitForLoadStop(tab);
@@ -679,7 +680,7 @@
render_view_host(),
ChromeViewHostMsg_TranslateLanguageDetermined(0, "ja", true));
TranslateInfoBarDelegate* infobar =
- browser()->GetActiveTabContents()->infobar_tab_helper()->
+ chrome::GetActiveTabContents(browser())->infobar_tab_helper()->
GetInfoBarDelegateAt(0)->AsTranslateInfoBarDelegate();
ASSERT_TRUE(infobar != NULL);
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_browsertest.cc ('k') | chrome/browser/autofill/autofill_popup_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698