diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-18 16:17:49 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-18 16:17:49 +0000 |
commit | 3c9e187bd8ec34ebf2a91a37c868584c465647e8 (patch) | |
tree | 84c9540d220fa155cf2af8c944638c0719dee670 /chrome/browser/ssl | |
parent | 3e35b224fd0c36f17f432f23e2eb3729667210b1 (diff) | |
download | chromium_src-3c9e187bd8ec34ebf2a91a37c868584c465647e8.zip chromium_src-3c9e187bd8ec34ebf2a91a37c868584c465647e8.tar.gz chromium_src-3c9e187bd8ec34ebf2a91a37c868584c465647e8.tar.bz2 |
Make pink's TabContentsWrapper change compile on Windows.
Code by pinkerton@, with modifications by evanm and myself to get it to build on windows/linux/chromeos.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/4694008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66626 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ssl')
-rw-r--r-- | chrome/browser/ssl/ssl_browser_tests.cc | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc index fcaaaed..424413f 100644 --- a/chrome/browser/ssl/ssl_browser_tests.cc +++ b/chrome/browser/ssl/ssl_browser_tests.cc @@ -9,6 +9,7 @@ #include "chrome/browser/tab_contents/interstitial_page.h" #include "chrome/browser/tab_contents/navigation_entry.h" #include "chrome/browser/tab_contents/tab_contents.h" +#include "chrome/browser/tab_contents_wrapper.h" #include "chrome/browser/tabs/tab_strip_model.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_navigator.h" @@ -396,7 +397,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestHTTPSErrorWithNoNavEntry) { ASSERT_TRUE(https_server_expired_.Start()); GURL url = https_server_expired_.GetURL("files/ssl/google.htm"); - TabContents* tab2 = + TabContentsWrapper* tab2 = browser()->AddSelectedTabWithURL(url, PageTransition::TYPED); ui_test_utils::WaitForLoadStop(&(tab2->controller())); @@ -404,7 +405,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestHTTPSErrorWithNoNavEntry) { EXPECT_FALSE(browser()->command_updater()->IsCommandEnabled(IDC_BACK)); // We should have an interstitial page showing. - ASSERT_TRUE(tab2->interstitial_page()); + ASSERT_TRUE(tab2->tab_contents()->interstitial_page()); } // @@ -526,10 +527,10 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestDisplaysInsecureContentTwoTabs) { ui_test_utils::NavigateToURL(browser(), https_server_.GetURL("files/ssl/blank_page.html")); - TabContents* tab1 = browser()->GetSelectedTabContents(); + TabContentsWrapper* tab1 = browser()->GetSelectedTabContentsWrapper(); // This tab should be fine. - CheckAuthenticatedState(tab1, false); + CheckAuthenticatedState(tab1->tab_contents(), false); // Create a new tab. std::string replacement_path; @@ -544,14 +545,14 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestDisplaysInsecureContentTwoTabs) { params.tabstrip_index = 0; params.source_contents = tab1; browser::Navigate(¶ms); - TabContents* tab2 = params.target_contents; + TabContentsWrapper* tab2 = params.target_contents; ui_test_utils::WaitForNavigation(&(tab2->controller())); // The new tab has insecure content. - CheckAuthenticatedState(tab2, true); + CheckAuthenticatedState(tab2->tab_contents(), true); // The original tab should not be contaminated. - CheckAuthenticatedState(tab1, false); + CheckAuthenticatedState(tab1->tab_contents(), false); } // Visits two pages from the same origin: one that runs insecure content and one @@ -564,10 +565,10 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestRunsInsecureContentTwoTabs) { ui_test_utils::NavigateToURL(browser(), https_server_.GetURL("files/ssl/blank_page.html")); - TabContents* tab1 = browser()->GetSelectedTabContents(); + TabContentsWrapper* tab1 = browser()->GetSelectedTabContentsWrapper(); // This tab should be fine. - CheckAuthenticatedState(tab1, false); + CheckAuthenticatedState(tab1->tab_contents(), false); std::string replacement_path; ASSERT_TRUE(GetFilePathWithHostAndPortReplacement( @@ -581,15 +582,15 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestRunsInsecureContentTwoTabs) { params.disposition = NEW_FOREGROUND_TAB; params.source_contents = tab1; browser::Navigate(¶ms); - TabContents* tab2 = params.target_contents; + TabContentsWrapper* tab2 = params.target_contents; ui_test_utils::WaitForNavigation(&(tab2->controller())); // The new tab has insecure content. - CheckAuthenticationBrokenState(tab2, 0, true, false); + CheckAuthenticationBrokenState(tab2->tab_contents(), 0, true, false); // Which means the origin for the first tab has also been contaminated with // insecure content. - CheckAuthenticationBrokenState(tab1, 0, true, false); + CheckAuthenticationBrokenState(tab1->tab_contents(), 0, true, false); } // Visits a page with an image over http. Visits another page over https @@ -743,7 +744,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestCloseTabWithUnsafePopup) { // Let's add another tab to make sure the browser does not exit when we close // the first tab. GURL url = test_server()->GetURL("files/ssl/google.html"); - TabContents* tab2 = + TabContentsWrapper* tab2 = browser()->AddSelectedTabWithURL(url, PageTransition::TYPED); ui_test_utils::WaitForNavigation(&(tab2->controller())); |