Index: content/browser/renderer_host/resource_dispatcher_host_browsertest.cc |
=================================================================== |
--- content/browser/renderer_host/resource_dispatcher_host_browsertest.cc (revision 145001) |
+++ content/browser/renderer_host/resource_dispatcher_host_browsertest.cc (working copy) |
@@ -6,6 +6,7 @@ |
#include "base/synchronization/waitable_event.h" |
#include "base/utf_string_conversions.h" |
#include "chrome/browser/ui/browser.h" |
+#include "chrome/browser/ui/browser_tabstrip.h" |
#include "chrome/test/base/in_process_browser_test.h" |
#include "chrome/test/base/ui_test_utils.h" |
#include "content/browser/download/download_manager_impl.h" |
@@ -76,7 +77,7 @@ |
} |
content::RenderViewHost* render_view_host() { |
- return browser()->GetActiveWebContents()->GetRenderViewHost(); |
+ return chrome::GetActiveWebContents(browser())->GetRenderViewHost(); |
} |
GURL GetMockURL(const std::string& file) { |
@@ -88,7 +89,7 @@ |
int expected_navigations) { |
string16 expected_title16(ASCIIToUTF16(expected_title)); |
ui_test_utils::TitleWatcher title_watcher( |
- browser()->GetActiveWebContents(), expected_title16); |
+ chrome::GetActiveWebContents(browser()), expected_title16); |
ui_test_utils::NavigateToURLBlockUntilNavigationsComplete( |
browser(), url, expected_navigations); |
EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle()); |
@@ -217,7 +218,7 @@ |
// Let's check the XMLHttpRequest ran successfully. |
bool success = false; |
EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool( |
- browser()->GetActiveWebContents()->GetRenderViewHost(), |
+ chrome::GetActiveWebContents(browser())->GetRenderViewHost(), |
L"", |
L"window.domAutomationController.send(DidSyncRequestSucceed());", |
&success)); |
@@ -235,7 +236,7 @@ |
// Let's check the XMLHttpRequest ran successfully. |
bool success = false; |
EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool( |
- browser()->GetActiveWebContents()->GetRenderViewHost(), |
+ chrome::GetActiveWebContents(browser())->GetRenderViewHost(), |
L"", |
L"window.domAutomationController.send(DidSucceed());", |
&success)); |
@@ -386,7 +387,7 @@ |
browser(), failed_url, 2); |
EXPECT_NE(ASCIIToUTF16("set cookie on unload"), |
- browser()->GetActiveWebContents()->GetTitle()); |
+ chrome::GetActiveWebContents(browser())->GetTitle()); |
// Check that the cookie was set, meaning that the onunload handler ran. |
EXPECT_EQ("onunloadCookie=foo", GetCookies(url)); |
@@ -402,7 +403,7 @@ |
// off the navigation, and wait to see that the tab loads. |
string16 expected_title16(ASCIIToUTF16("Title Of Awesomeness")); |
ui_test_utils::TitleWatcher title_watcher( |
- browser()->GetActiveWebContents(), expected_title16); |
+ chrome::GetActiveWebContents(browser()), expected_title16); |
bool success; |
GURL test_url(test_server()->GetURL("files/title2.html")); |
@@ -410,7 +411,7 @@ |
test_url.possibly_invalid_spec() + "';" + |
"window.domAutomationController.send(true);"; |
EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool( |
- browser()->GetActiveWebContents()->GetRenderViewHost(), |
+ chrome::GetActiveWebContents(browser())->GetRenderViewHost(), |
L"", ASCIIToWide(redirect_script), &success)); |
EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle()); |
} |