summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ssl/ssl_browser_tests.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ssl/ssl_browser_tests.cc')
-rw-r--r--chrome/browser/ssl/ssl_browser_tests.cc26
1 files changed, 12 insertions, 14 deletions
diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc
index a897e1b..aad8854 100644
--- a/chrome/browser/ssl/ssl_browser_tests.cc
+++ b/chrome/browser/ssl/ssl_browser_tests.cc
@@ -329,9 +329,8 @@ 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 = browser()->AddTabWithURL(
- url, GURL(), PageTransition::TYPED, -1, TabStripModel::ADD_SELECTED, NULL,
- std::string(), NULL);
+ TabContents* tab2 =
+ browser()->AddSelectedTabWithURL(url, PageTransition::TYPED);
ui_test_utils::WaitForLoadStop(&(tab2->controller()));
// Verify our assumption that there was no prior navigation.
@@ -450,9 +449,10 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestDisplaysInsecureContentTwoTabs) {
// Create a new tab.
GURL url = https_server_.GetURL(
"files/ssl/page_displays_insecure_content.html");
- TabContents* tab2 = browser()->AddTabWithURL(url, GURL(),
- PageTransition::TYPED, 0, TabStripModel::ADD_SELECTED,
- tab1->GetSiteInstance(), std::string(), NULL);
+ Browser::AddTabWithURLParams params(url, PageTransition::TYPED);
+ params.index = 0;
+ params.instance = tab1->GetSiteInstance();
+ TabContents* tab2 = browser()->AddTabWithURL(&params);
ui_test_utils::WaitForNavigation(&(tab2->controller()));
// The new tab has insecure content.
@@ -480,9 +480,9 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestRunsInsecureContentTwoTabs) {
// Create a new tab.
GURL url =
https_server_.GetURL("files/ssl/page_runs_insecure_content.html");
- TabContents* tab2 = browser()->AddTabWithURL(url, GURL(),
- PageTransition::TYPED, 0, TabStripModel::ADD_SELECTED,
- tab1->GetSiteInstance(), std::string(), NULL);
+ Browser::AddTabWithURLParams params(url, PageTransition::TYPED);
+ params.instance = tab1->GetSiteInstance();
+ TabContents* tab2 = browser()->AddTabWithURL(&params);
ui_test_utils::WaitForNavigation(&(tab2->controller()));
// The new tab has insecure content.
@@ -623,15 +623,13 @@ 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.
- Browser* browser_used = NULL;
GURL url = test_server()->GetURL("files/ssl/google.html");
- TabContents* tab2 = browser()->AddTabWithURL(
- url, GURL(), PageTransition::TYPED, 0, TabStripModel::ADD_SELECTED, NULL,
- std::string(), &browser_used);
+ Browser::AddTabWithURLParams params(url, PageTransition::TYPED);
+ TabContents* tab2 = browser()->AddTabWithURL(&params);
ui_test_utils::WaitForNavigation(&(tab2->controller()));
// Ensure that the tab was created in the correct browser.
- EXPECT_EQ(browser(), browser_used);
+ EXPECT_EQ(browser(), params.target);
// Close the first tab.
browser()->CloseTabContents(tab1);