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

Unified Diff: chrome/browser/content_settings/content_settings_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
« no previous file with comments | « chrome/browser/collected_cookies_browsertest.cc ('k') | chrome/browser/crash_recovery_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/content_settings/content_settings_browsertest.cc
===================================================================
--- chrome/browser/content_settings/content_settings_browsertest.cc (revision 145001)
+++ chrome/browser/content_settings/content_settings_browsertest.cc (working copy)
@@ -11,6 +11,7 @@
#include "chrome/browser/content_settings/tab_specific_content_settings.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/common/render_messages.h"
#include "chrome/test/base/in_process_browser_test.h"
@@ -31,7 +32,7 @@
ui_test_utils::NavigateToURL(browser(), test_url);
- TabContents* tab_contents = browser()->GetActiveTabContents();
+ TabContents* tab_contents = chrome::GetActiveTabContents(browser());
ASSERT_EQ(UTF8ToUTF16(test_url.spec() + " failed to load"),
tab_contents->web_contents()->GetTitle());
@@ -47,7 +48,7 @@
ui_test_utils::NavigateToURL(browser(), url);
- TabContents* tab_contents = browser()->GetActiveTabContents();
+ TabContents* tab_contents = chrome::GetActiveTabContents(browser());
ASSERT_EQ(UTF8ToUTF16("Data URL"), tab_contents->web_contents()->GetTitle());
EXPECT_TRUE(tab_contents->content_settings()->IsContentBlocked(
@@ -72,7 +73,7 @@
ui_test_utils::NavigateToURL(browser(), test_url);
- TabContents* tab_contents = browser()->GetActiveTabContents();
+ TabContents* tab_contents = chrome::GetActiveTabContents(browser());
EXPECT_TRUE(tab_contents->content_settings()->IsContentBlocked(
CONTENT_SETTINGS_TYPE_COOKIES));
@@ -109,10 +110,10 @@
string16 expected_title(ASCIIToUTF16("OK"));
ui_test_utils::TitleWatcher title_watcher(
- browser()->GetActiveWebContents(), expected_title);
+ chrome::GetActiveWebContents(browser()), expected_title);
content::RenderViewHost* host =
- browser()->GetActiveWebContents()->GetRenderViewHost();
+ chrome::GetActiveWebContents(browser())->GetRenderViewHost();
host->Send(new ChromeViewMsg_LoadBlockedPlugins(
host->GetRoutingID(), std::string()));
@@ -130,20 +131,20 @@
string16 expected_title1(ASCIIToUTF16("1"));
ui_test_utils::TitleWatcher title_watcher1(
- browser()->GetActiveWebContents(), expected_title1);
+ chrome::GetActiveWebContents(browser()), expected_title1);
content::RenderViewHost* host =
- browser()->GetActiveWebContents()->GetRenderViewHost();
+ chrome::GetActiveWebContents(browser())->GetRenderViewHost();
host->Send(new ChromeViewMsg_LoadBlockedPlugins(
host->GetRoutingID(), std::string()));
EXPECT_EQ(expected_title1, title_watcher1.WaitAndGetTitle());
string16 expected_title2(ASCIIToUTF16("2"));
ui_test_utils::TitleWatcher title_watcher2(
- browser()->GetActiveWebContents(), expected_title2);
+ chrome::GetActiveWebContents(browser()), expected_title2);
ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
- browser()->GetActiveWebContents()->GetRenderViewHost(),
+ chrome::GetActiveWebContents(browser())->GetRenderViewHost(),
L"", L"window.inject()"));
EXPECT_EQ(expected_title2, title_watcher2.WaitAndGetTitle());
@@ -159,15 +160,15 @@
// Inject the callback function into the HTML page generated by the browser.
ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
- browser()->GetActiveWebContents()->GetRenderViewHost(),
+ chrome::GetActiveWebContents(browser())->GetRenderViewHost(),
L"", L"CallOnStartup = function() { document.title = \"OK\"; }"));
string16 expected_title(ASCIIToUTF16("OK"));
ui_test_utils::TitleWatcher title_watcher(
- browser()->GetActiveWebContents(), expected_title);
+ chrome::GetActiveWebContents(browser()), expected_title);
content::RenderViewHost* host =
- browser()->GetActiveWebContents()->GetRenderViewHost();
+ chrome::GetActiveWebContents(browser())->GetRenderViewHost();
host->Send(new ChromeViewMsg_LoadBlockedPlugins(
host->GetRoutingID(), std::string()));
« no previous file with comments | « chrome/browser/collected_cookies_browsertest.cc ('k') | chrome/browser/crash_recovery_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698