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

Unified Diff: content/browser/renderer_host/resource_dispatcher_host_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: 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());
}
« no previous file with comments | « content/browser/renderer_host/render_view_host_manager_browsertest.cc ('k') | content/browser/session_history_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698