Chromium Code Reviews| Index: content/browser/frame_host/render_frame_host_manager_browsertest.cc |
| diff --git a/content/browser/frame_host/render_frame_host_manager_browsertest.cc b/content/browser/frame_host/render_frame_host_manager_browsertest.cc |
| index 3875c9c56d7648883a8dbcd904e24a20ded78700..09f369cf40b79ea7304d25f100ff4b2f39eb3710 100644 |
| --- a/content/browser/frame_host/render_frame_host_manager_browsertest.cc |
| +++ b/content/browser/frame_host/render_frame_host_manager_browsertest.cc |
| @@ -253,7 +253,8 @@ IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, |
| } |
| // Test for crbug.com/24447. Following a cross-site link with just |
| -// target=_blank should not create a new SiteInstance. |
| +// target=_blank should not create a new SiteInstance, unless we |
| +// are running in --site-per-process mode. |
| IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, |
| DontSwapProcessWithOnlyTargetBlank) { |
| StartServer(); |
| @@ -288,10 +289,14 @@ IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, |
| EXPECT_EQ("/files/title2.html", |
| new_shell->web_contents()->GetLastCommittedURL().path()); |
| - // Should have the same SiteInstance. |
| + // Should have the same SiteInstance unless we're in site-per-process mode. |
| scoped_refptr<SiteInstance> blank_site_instance( |
| new_shell->web_contents()->GetSiteInstance()); |
| - EXPECT_EQ(orig_site_instance, blank_site_instance); |
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
|
Charlie Reis
2014/10/07 22:40:38
nit: Let's invert this so that _EQ comes before _N
|
| + switches::kSitePerProcess)) |
| + EXPECT_NE(orig_site_instance, blank_site_instance); |
| + else |
| + EXPECT_EQ(orig_site_instance, blank_site_instance); |
| } |
| // Test for crbug.com/24447. Following a cross-site link with rel=noreferrer |