Index: content/browser/frame_host/frame_tree_browsertest.cc |
diff --git a/content/browser/frame_host/frame_tree_browsertest.cc b/content/browser/frame_host/frame_tree_browsertest.cc |
index b9e3b43bd796c24b40ff46857c2b4f2dbdd0d546..f64e22733db5b3dfe059febad28daa4e5dc797b6 100644 |
--- a/content/browser/frame_host/frame_tree_browsertest.cc |
+++ b/content/browser/frame_host/frame_tree_browsertest.cc |
@@ -215,26 +215,25 @@ IN_PROC_BROWSER_TEST_F(FrameTreeBrowserTest, OriginSetOnNavigation) { |
// Extra '/' is added because the replicated origin is serialized in RFC 6454 |
// format, which dictates no trailing '/', whereas GURL::GetOrigin does put a |
// '/' at the end. |
- EXPECT_EQ(root->current_replication_state().origin.Serialize() + '/', |
+ EXPECT_EQ(root->current_origin().Serialize() + '/', |
main_url.GetOrigin().spec()); |
GURL frame_url(embedded_test_server()->GetURL("/title1.html")); |
NavigateFrameToURL(root->child_at(0), frame_url); |
- EXPECT_EQ( |
- root->child_at(0)->current_replication_state().origin.Serialize() + '/', |
- frame_url.GetOrigin().spec()); |
+ EXPECT_EQ(root->child_at(0)->current_origin().Serialize() + '/', |
+ frame_url.GetOrigin().spec()); |
GURL data_url("data:text/html,foo"); |
EXPECT_TRUE(NavigateToURL(shell(), data_url)); |
// Navigating to a data URL should set a unique origin. This is represented |
// as "null" per RFC 6454. |
- EXPECT_EQ(root->current_replication_state().origin.Serialize(), "null"); |
+ EXPECT_EQ(root->current_origin().Serialize(), "null"); |
// Re-navigating to a normal URL should update the origin. |
EXPECT_TRUE(NavigateToURL(shell(), main_url)); |
- EXPECT_EQ(root->current_replication_state().origin.Serialize() + '/', |
+ EXPECT_EQ(root->current_origin().Serialize() + '/', |
main_url.GetOrigin().spec()); |
} |
@@ -266,13 +265,10 @@ IN_PROC_BROWSER_TEST_F(FrameTreeBrowserTest, SandboxFlagsSetForChildFrames) { |
// Sandboxed frames should set a unique origin unless they have the |
// "allow-same-origin" directive. |
- EXPECT_EQ(root->child_at(0)->current_replication_state().origin.Serialize(), |
- "null"); |
- EXPECT_EQ(root->child_at(1)->current_replication_state().origin.Serialize(), |
- "null"); |
- EXPECT_EQ( |
- root->child_at(2)->current_replication_state().origin.Serialize() + "/", |
- main_url.GetOrigin().spec()); |
+ EXPECT_EQ(root->child_at(0)->current_origin().Serialize(), "null"); |
+ EXPECT_EQ(root->child_at(1)->current_origin().Serialize(), "null"); |
+ EXPECT_EQ(root->child_at(2)->current_origin().Serialize() + "/", |
+ main_url.GetOrigin().spec()); |
// Navigating to a different URL should not clear sandbox flags. |
GURL frame_url(embedded_test_server()->GetURL("/title1.html")); |
@@ -393,32 +389,29 @@ IN_PROC_BROWSER_TEST_F(CrossProcessFrameTreeBrowserTest, |
FrameTreeNode* root = static_cast<WebContentsImpl*>(shell()->web_contents()) |
->GetFrameTree()->root(); |
- EXPECT_EQ(root->current_replication_state().origin.Serialize() + '/', |
+ EXPECT_EQ(root->current_origin().Serialize() + '/', |
main_url.GetOrigin().spec()); |
// First frame is an about:blank frame. Check that its origin is correctly |
// inherited from the parent. |
- EXPECT_EQ( |
- root->child_at(0)->current_replication_state().origin.Serialize() + '/', |
- main_url.GetOrigin().spec()); |
+ EXPECT_EQ(root->child_at(0)->current_origin().Serialize() + '/', |
+ main_url.GetOrigin().spec()); |
// Second frame loads a same-site page. Its origin should also be the same |
// as the parent. |
- EXPECT_EQ( |
- root->child_at(1)->current_replication_state().origin.Serialize() + '/', |
- main_url.GetOrigin().spec()); |
+ EXPECT_EQ(root->child_at(1)->current_origin().Serialize() + '/', |
+ main_url.GetOrigin().spec()); |
// Load cross-site page into the first frame. |
GURL cross_site_url( |
embedded_test_server()->GetURL("foo.com", "/title2.html")); |
NavigateFrameToURL(root->child_at(0), cross_site_url); |
- EXPECT_EQ( |
- root->child_at(0)->current_replication_state().origin.Serialize() + '/', |
- cross_site_url.GetOrigin().spec()); |
+ EXPECT_EQ(root->child_at(0)->current_origin().Serialize() + '/', |
+ cross_site_url.GetOrigin().spec()); |
// The root's origin shouldn't have changed. |
- EXPECT_EQ(root->current_replication_state().origin.Serialize() + '/', |
+ EXPECT_EQ(root->current_origin().Serialize() + '/', |
main_url.GetOrigin().spec()); |
GURL data_url("data:text/html,foo"); |
@@ -426,8 +419,7 @@ IN_PROC_BROWSER_TEST_F(CrossProcessFrameTreeBrowserTest, |
// Navigating to a data URL should set a unique origin. This is represented |
// as "null" per RFC 6454. |
- EXPECT_EQ(root->child_at(1)->current_replication_state().origin.Serialize(), |
- "null"); |
+ EXPECT_EQ(root->child_at(1)->current_origin().Serialize(), "null"); |
} |
} // namespace content |