| Index: chrome/browser/ssl/ssl_browser_tests.cc
|
| ===================================================================
|
| --- chrome/browser/ssl/ssl_browser_tests.cc (revision 64601)
|
| +++ chrome/browser/ssl/ssl_browser_tests.cc (working copy)
|
| @@ -5,6 +5,7 @@
|
| #include "base/time.h"
|
| #include "chrome/app/chrome_dll_resource.h"
|
| #include "chrome/browser/browser.h"
|
| +#include "chrome/browser/browser_navigator.h"
|
| #include "chrome/browser/prefs/pref_service.h"
|
| #include "chrome/browser/profile.h"
|
| #include "chrome/browser/tab_contents/interstitial_page.h"
|
| @@ -454,10 +455,12 @@
|
| // Create a new tab.
|
| GURL url = https_server_.GetURL(
|
| "files/ssl/page_displays_insecure_content.html");
|
| - Browser::AddTabWithURLParams params(url, PageTransition::TYPED);
|
| - params.index = 0;
|
| - params.instance = tab1->GetSiteInstance();
|
| - TabContents* tab2 = browser()->AddTabWithURL(¶ms);
|
| + browser::NavigateParams params(browser(), url, PageTransition::TYPED);
|
| + params.disposition = NEW_FOREGROUND_TAB;
|
| + params.tabstrip_index = 0;
|
| + params.source_contents = tab1;
|
| + browser::Navigate(¶ms);
|
| + TabContents* tab2 = params.target_contents;
|
| ui_test_utils::WaitForNavigation(&(tab2->controller()));
|
|
|
| // The new tab has insecure content.
|
| @@ -485,9 +488,11 @@
|
| // Create a new tab.
|
| GURL url =
|
| https_server_.GetURL("files/ssl/page_runs_insecure_content.html");
|
| - Browser::AddTabWithURLParams params(url, PageTransition::TYPED);
|
| - params.instance = tab1->GetSiteInstance();
|
| - TabContents* tab2 = browser()->AddTabWithURL(¶ms);
|
| + browser::NavigateParams params(browser(), url, PageTransition::TYPED);
|
| + params.disposition = NEW_FOREGROUND_TAB;
|
| + params.source_contents = tab1;
|
| + browser::Navigate(¶ms);
|
| + TabContents* tab2 = params.target_contents;
|
| ui_test_utils::WaitForNavigation(&(tab2->controller()));
|
|
|
| // The new tab has insecure content.
|
| @@ -629,13 +634,10 @@
|
| // 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");
|
| - Browser::AddTabWithURLParams params(url, PageTransition::TYPED);
|
| - TabContents* tab2 = browser()->AddTabWithURL(¶ms);
|
| + TabContents* tab2 =
|
| + browser()->AddSelectedTabWithURL(url, PageTransition::TYPED);
|
| ui_test_utils::WaitForNavigation(&(tab2->controller()));
|
|
|
| - // Ensure that the tab was created in the correct browser.
|
| - EXPECT_EQ(browser(), params.target);
|
| -
|
| // Close the first tab.
|
| browser()->CloseTabContents(tab1);
|
| }
|
|
|