| Index: chrome/browser/browser_keyevents_browsertest.cc
|
| ===================================================================
|
| --- chrome/browser/browser_keyevents_browsertest.cc (revision 145001)
|
| +++ chrome/browser/browser_keyevents_browsertest.cc (working copy)
|
| @@ -11,6 +11,7 @@
|
| #include "base/utf_string_conversions.h"
|
| #include "base/values.h"
|
| #include "chrome/browser/ui/browser.h"
|
| +#include "chrome/browser/ui/browser_tabstrip.h"
|
| #include "chrome/common/chrome_notification_types.h"
|
| #include "chrome/common/chrome_paths.h"
|
| #include "chrome/test/base/in_process_browser_test.h"
|
| @@ -146,7 +147,7 @@
|
| ASSERT_LT(tab_index, browser()->tab_count());
|
| bool actual;
|
| ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
|
| - browser()->GetWebContentsAt(tab_index)->GetRenderViewHost(),
|
| + chrome::GetWebContentsAt(browser(), tab_index)->GetRenderViewHost(),
|
| L"",
|
| base::StringPrintf(kSuppressEventJS, type, GetBoolString(!suppress)),
|
| &actual));
|
| @@ -172,7 +173,7 @@
|
| void GetResultLength(int tab_index, int* length) {
|
| ASSERT_LT(tab_index, browser()->tab_count());
|
| ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractInt(
|
| - browser()->GetWebContentsAt(tab_index)->GetRenderViewHost(),
|
| + chrome::GetWebContentsAt(browser(), tab_index)->GetRenderViewHost(),
|
| L"", kGetResultLengthJS, length));
|
| }
|
|
|
| @@ -184,7 +185,7 @@
|
| for (int i = 0; i < actual_length; ++i) {
|
| std::string actual;
|
| ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
|
| - browser()->GetWebContentsAt(tab_index)->GetRenderViewHost(),
|
| + chrome::GetWebContentsAt(browser(), tab_index)->GetRenderViewHost(),
|
| L"", base::StringPrintf(kGetResultJS, i), &actual));
|
|
|
| // If more events were received than expected, then the additional events
|
| @@ -200,7 +201,7 @@
|
| ASSERT_LT(tab_index, browser()->tab_count());
|
| std::string actual;
|
| ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
|
| - browser()->GetWebContentsAt(tab_index)->GetRenderViewHost(),
|
| + chrome::GetWebContentsAt(browser(), tab_index)->GetRenderViewHost(),
|
| L"", kGetFocusedElementJS, &actual));
|
| ASSERT_EQ(WideToUTF8(focused), actual);
|
| }
|
| @@ -209,7 +210,7 @@
|
| ASSERT_LT(tab_index, browser()->tab_count());
|
| bool actual;
|
| ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
|
| - browser()->GetWebContentsAt(tab_index)->GetRenderViewHost(),
|
| + chrome::GetWebContentsAt(browser(), tab_index)->GetRenderViewHost(),
|
| L"",
|
| base::StringPrintf(kSetFocusedElementJS, focused),
|
| &actual));
|
| @@ -221,7 +222,7 @@
|
| ASSERT_LT(tab_index, browser()->tab_count());
|
| std::string actual;
|
| ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
|
| - browser()->GetWebContentsAt(tab_index)->GetRenderViewHost(),
|
| + chrome::GetWebContentsAt(browser(), tab_index)->GetRenderViewHost(),
|
| L"",
|
| base::StringPrintf(kGetTextBoxValueJS, id),
|
| &actual));
|
| @@ -233,7 +234,7 @@
|
| ASSERT_LT(tab_index, browser()->tab_count());
|
| std::string actual;
|
| ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
|
| - browser()->GetWebContentsAt(tab_index)->GetRenderViewHost(),
|
| + chrome::GetWebContentsAt(browser(), tab_index)->GetRenderViewHost(),
|
| L"",
|
| base::StringPrintf(kSetTextBoxValueJS, id, value),
|
| &actual));
|
| @@ -244,7 +245,7 @@
|
| ASSERT_LT(tab_index, browser()->tab_count());
|
| bool actual;
|
| ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
|
| - browser()->GetWebContentsAt(tab_index)->GetRenderViewHost(),
|
| + chrome::GetWebContentsAt(browser(), tab_index)->GetRenderViewHost(),
|
| L"", base::StringPrintf(kStartTestJS, result_length), &actual));
|
| ASSERT_TRUE(actual);
|
| }
|
| @@ -264,7 +265,7 @@
|
| // because the test finished message might be arrived before returning
|
| // from the SendKeyPressSync() method.
|
| TestFinishObserver finish_observer(
|
| - browser()->GetWebContentsAt(tab_index)->GetRenderViewHost());
|
| + chrome::GetWebContentsAt(browser(), tab_index)->GetRenderViewHost());
|
|
|
| ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
|
| browser(), test.key, test.ctrl, test.shift, test.alt, test.command));
|
| @@ -737,7 +738,7 @@
|
|
|
| ui_test_utils::WindowedNotificationObserver wait_for_tab_closed(
|
| content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
|
| - content::Source<content::WebContents>(browser()->GetWebContentsAt(1)));
|
| + content::Source<content::WebContents>(chrome::GetWebContentsAt(browser(), 1)));
|
|
|
| // Press Ctrl/Cmd+W, which will close the tab.
|
| #if defined(OS_MACOSX)
|
|
|