| Index: chrome/browser/content_settings/content_settings_browsertest.cc
|
| diff --git a/chrome/browser/content_settings/content_settings_browsertest.cc b/chrome/browser/content_settings/content_settings_browsertest.cc
|
| index 5e92eafd847634096ed758927692b400f758276f..dd9551b0197896c6e031fb8de0528c9d6775005f 100644
|
| --- a/chrome/browser/content_settings/content_settings_browsertest.cc
|
| +++ b/chrome/browser/content_settings/content_settings_browsertest.cc
|
| @@ -11,7 +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/tab_contents/tab_contents_wrapper.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"
|
| #include "chrome/test/base/ui_test_utils.h"
|
| @@ -31,7 +31,7 @@ IN_PROC_BROWSER_TEST_F(InProcessBrowserTest, RedirectLoopCookies) {
|
|
|
| ui_test_utils::NavigateToURL(browser(), test_url);
|
|
|
| - TabContentsWrapper* tab_contents = browser()->GetSelectedTabContentsWrapper();
|
| + TabContents* tab_contents = browser()->GetActiveTabContents();
|
| ASSERT_EQ(UTF8ToUTF16(test_url.spec() + " failed to load"),
|
| tab_contents->web_contents()->GetTitle());
|
|
|
| @@ -47,7 +47,7 @@ IN_PROC_BROWSER_TEST_F(InProcessBrowserTest, ContentSettingsBlockDataURLs) {
|
|
|
| ui_test_utils::NavigateToURL(browser(), url);
|
|
|
| - TabContentsWrapper* tab_contents = browser()->GetSelectedTabContentsWrapper();
|
| + TabContents* tab_contents = browser()->GetActiveTabContents();
|
| ASSERT_EQ(UTF8ToUTF16("Data URL"), tab_contents->web_contents()->GetTitle());
|
|
|
| EXPECT_TRUE(tab_contents->content_settings()->IsContentBlocked(
|
| @@ -72,7 +72,7 @@ IN_PROC_BROWSER_TEST_F(InProcessBrowserTest, RedirectCrossOrigin) {
|
|
|
| ui_test_utils::NavigateToURL(browser(), test_url);
|
|
|
| - TabContentsWrapper* tab_contents = browser()->GetSelectedTabContentsWrapper();
|
| + TabContents* tab_contents = browser()->GetActiveTabContents();
|
|
|
| EXPECT_TRUE(tab_contents->content_settings()->IsContentBlocked(
|
| CONTENT_SETTINGS_TYPE_COOKIES));
|
| @@ -109,10 +109,10 @@ IN_PROC_BROWSER_TEST_F(ClickToPlayPluginTest, Basic) {
|
|
|
| string16 expected_title(ASCIIToUTF16("OK"));
|
| ui_test_utils::TitleWatcher title_watcher(
|
| - browser()->GetSelectedWebContents(), expected_title);
|
| + browser()->GetActiveWebContents(), expected_title);
|
|
|
| content::RenderViewHost* host =
|
| - browser()->GetSelectedWebContents()->GetRenderViewHost();
|
| + browser()->GetActiveWebContents()->GetRenderViewHost();
|
| host->Send(new ChromeViewMsg_LoadBlockedPlugins(
|
| host->GetRoutingID(), std::string()));
|
|
|
| @@ -130,20 +130,20 @@ IN_PROC_BROWSER_TEST_F(ClickToPlayPluginTest, LoadAllBlockedPlugins) {
|
|
|
| string16 expected_title1(ASCIIToUTF16("1"));
|
| ui_test_utils::TitleWatcher title_watcher1(
|
| - browser()->GetSelectedWebContents(), expected_title1);
|
| + browser()->GetActiveWebContents(), expected_title1);
|
|
|
| content::RenderViewHost* host =
|
| - browser()->GetSelectedWebContents()->GetRenderViewHost();
|
| + browser()->GetActiveWebContents()->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()->GetSelectedWebContents(), expected_title2);
|
| + browser()->GetActiveWebContents(), expected_title2);
|
|
|
| ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
|
| - browser()->GetSelectedWebContents()->GetRenderViewHost(),
|
| + browser()->GetActiveWebContents()->GetRenderViewHost(),
|
| L"", L"window.inject()"));
|
|
|
| EXPECT_EQ(expected_title2, title_watcher2.WaitAndGetTitle());
|
| @@ -159,15 +159,15 @@ IN_PROC_BROWSER_TEST_F(ClickToPlayPluginTest, NoCallbackAtLoad) {
|
|
|
| // Inject the callback function into the HTML page generated by the browser.
|
| ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
|
| - browser()->GetSelectedWebContents()->GetRenderViewHost(),
|
| + browser()->GetActiveWebContents()->GetRenderViewHost(),
|
| L"", L"CallOnStartup = function() { document.title = \"OK\"; }"));
|
|
|
| string16 expected_title(ASCIIToUTF16("OK"));
|
| ui_test_utils::TitleWatcher title_watcher(
|
| - browser()->GetSelectedWebContents(), expected_title);
|
| + browser()->GetActiveWebContents(), expected_title);
|
|
|
| content::RenderViewHost* host =
|
| - browser()->GetSelectedWebContents()->GetRenderViewHost();
|
| + browser()->GetActiveWebContents()->GetRenderViewHost();
|
| host->Send(new ChromeViewMsg_LoadBlockedPlugins(
|
| host->GetRoutingID(), std::string()));
|
|
|
|
|