diff options
Diffstat (limited to 'chrome/browser/browser_uitest.cc')
-rw-r--r-- | chrome/browser/browser_uitest.cc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/chrome/browser/browser_uitest.cc b/chrome/browser/browser_uitest.cc index 8ec30a2..5d2c448 100644 --- a/chrome/browser/browser_uitest.cc +++ b/chrome/browser/browser_uitest.cc @@ -10,7 +10,7 @@ #include "base/sys_info.h" #include "base/test/test_file_util.h" #include "base/values.h" -#include "chrome/app/chrome_dll_resource.h" +#include "chrome/app/chrome_command_ids.h" #include "chrome/browser/browser.h" #include "chrome/browser/platform_util.h" #include "chrome/common/chrome_switches.h" @@ -159,9 +159,11 @@ TEST_F(BrowserTest, MAYBE_OtherRedirectsDontForkProcess) { // Use JavaScript URL to almost fork a new tab, but not quite. (Leave the // opener non-null.) Should not fork a process. - std::string url_prefix("javascript:(function(){w=window.open();"); - GURL dont_fork_url(url_prefix + - "w.document.location=\"http://localhost:1337\";})()"); + std::string url_str = "javascript:(function(){w=window.open(); "; + url_str += "w.document.location=\""; + url_str += test_server.GetURL("").spec(); + url_str += "\";})()"; + GURL dont_fork_url(url_str); // Make sure that a new tab but not new process has been created. ASSERT_TRUE(tab->NavigateToURLAsync(dont_fork_url)); @@ -172,8 +174,11 @@ TEST_F(BrowserTest, MAYBE_OtherRedirectsDontForkProcess) { ASSERT_EQ(orig_tab_count + 1, new_tab_count); // Same thing if the current tab tries to redirect itself. - GURL dont_fork_url2(url_prefix + - "document.location=\"http://localhost:1337\";})()"); + url_str = "javascript:(function(){w=window.open(); "; + url_str += "document.location=\""; + url_str += test_server.GetURL("").spec(); + url_str += "\";})()"; + GURL dont_fork_url2(url_str); // Make sure that no new process has been created. ASSERT_TRUE(tab->NavigateToURLAsync(dont_fork_url2)); |