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

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

Issue 2546533007: Store the last committed origin in RenderFrameHostImpl. (Closed)
Patch Set: Rebase (and remove DCHECK) Created 4 years 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
Index: content/browser/frame_host/navigation_controller_impl_unittest.cc
diff --git a/content/browser/frame_host/navigation_controller_impl_unittest.cc b/content/browser/frame_host/navigation_controller_impl_unittest.cc
index 309cb28c997871984c59182bcf409405f6d643fb..7303a6c8aba1e874dd6a4ff1db016758d5d7dc87 100644
--- a/content/browser/frame_host/navigation_controller_impl_unittest.cc
+++ b/content/browser/frame_host/navigation_controller_impl_unittest.cc
@@ -3853,8 +3853,8 @@ TEST_F(NavigationControllerTest, IsInPageNavigationWithUniversalFileAccess) {
const GURL file_url("file:///foo/index.html");
const url::Origin file_origin(file_url);
main_test_rfh()->NavigateAndCommitRendererInitiated(true, file_url);
- EXPECT_TRUE(file_origin.IsSameOriginWith(
- main_test_rfh()->frame_tree_node()->current_origin()));
+ EXPECT_TRUE(
+ file_origin.IsSameOriginWith(main_test_rfh()->GetLastCommittedOrigin()));
EXPECT_EQ(0, rph->bad_msg_count());
EXPECT_TRUE(controller.IsURLInPageNavigation(
different_origin_url, url::Origin(different_origin_url), true,
@@ -3880,8 +3880,8 @@ TEST_F(NavigationControllerTest, IsInPageNavigationWithUniversalFileAccess) {
// At this point, we should still consider the current origin to be file://,
// so that a file URL would still be in-page. See https://crbug.com/553418.
- EXPECT_TRUE(file_origin.IsSameOriginWith(
- main_test_rfh()->frame_tree_node()->current_origin()));
+ EXPECT_TRUE(
+ file_origin.IsSameOriginWith(main_test_rfh()->GetLastCommittedOrigin()));
EXPECT_TRUE(controller.IsURLInPageNavigation(file_url, url::Origin(file_url),
true, main_test_rfh()));
EXPECT_EQ(0, rph->bad_msg_count());

Powered by Google App Engine
This is Rietveld 408576698