Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Unified Diff: content/browser/frame_host/navigator_impl_unittest.cc

Issue 1797363002: "Top Document Isolation" mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Suppress tests under --site-per-process Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/browsing_instance.cc ('k') | content/browser/frame_host/render_frame_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigator_impl_unittest.cc
diff --git a/content/browser/frame_host/navigator_impl_unittest.cc b/content/browser/frame_host/navigator_impl_unittest.cc
index a592e01a9f14c7e8ca0b1ddfe875b347bfaa9648..5b6993e533afc8c0bb2ad59c3de2c5ce133c19eb 100644
--- a/content/browser/frame_host/navigator_impl_unittest.cc
+++ b/content/browser/frame_host/navigator_impl_unittest.cc
@@ -43,9 +43,8 @@ namespace content {
class NavigatorTestWithBrowserSideNavigation
: public RenderViewHostImplTestHarness {
public:
- // Re-defines the private RenderFrameHostManager::SiteInstanceDescriptor here
- // to allow access to it from tests.
- typedef RenderFrameHostManager::SiteInstanceDescriptor SiteInstanceDescriptor;
+ using SiteInstanceDescriptor = RenderFrameHostManager::SiteInstanceDescriptor;
+ using SiteInstanceRelation = RenderFrameHostManager::SiteInstanceRelation;
void SetUp() override {
#if !defined(OS_ANDROID)
@@ -1049,7 +1048,8 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
// current one.
GURL kUrlSameSiteAs1("http://www.a.com/foo");
{
- SiteInstanceDescriptor descriptor(browser_context(), kUrlSameSiteAs1, true);
+ SiteInstanceDescriptor descriptor(browser_context(), kUrlSameSiteAs1,
+ SiteInstanceRelation::RELATED);
scoped_refptr<SiteInstance> converted_instance =
ConvertToSiteInstance(rfhm, descriptor, nullptr);
EXPECT_EQ(current_instance, converted_instance);
@@ -1060,7 +1060,8 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
GURL kUrlSameSiteAs2("http://www.b.com/foo");
scoped_refptr<SiteInstance> related_instance;
{
- SiteInstanceDescriptor descriptor(browser_context(), kUrlSameSiteAs2, true);
+ SiteInstanceDescriptor descriptor(browser_context(), kUrlSameSiteAs2,
+ SiteInstanceRelation::RELATED);
related_instance = ConvertToSiteInstance(rfhm, descriptor, nullptr);
// Should return a new instance, related to the current, set to the new site
// URL.
@@ -1076,7 +1077,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
// current one, several times, with and without candidate sites.
{
SiteInstanceDescriptor descriptor(browser_context(), kUrlSameSiteAs1,
- false);
+ SiteInstanceRelation::UNRELATED);
scoped_refptr<SiteInstance> converted_instance_1 =
ConvertToSiteInstance(rfhm, descriptor, nullptr);
// Should return a new instance, unrelated to the current one, set to the
@@ -1114,7 +1115,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
// related_instance and using it as a candidate.
{
SiteInstanceDescriptor descriptor(browser_context(), kUrlSameSiteAs2,
- false);
+ SiteInstanceRelation::UNRELATED);
scoped_refptr<SiteInstance> converted_instance_1 =
ConvertToSiteInstance(rfhm, descriptor, related_instance.get());
// Should return a new instance, unrelated to the current, set to the
« no previous file with comments | « content/browser/browsing_instance.cc ('k') | content/browser/frame_host/render_frame_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698