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

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

Issue 1949213002: Don't update subframes on parent frame commits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 7 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/frame_host/navigation_controller_impl.cc ('k') | content/renderer/history_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigation_controller_impl_browsertest.cc
diff --git a/content/browser/frame_host/navigation_controller_impl_browsertest.cc b/content/browser/frame_host/navigation_controller_impl_browsertest.cc
index 8fc6ec99bb8c6def3a697740ff1ec3739b2e5cd8..06085ab3fb6cc7c3c006bd02102be0a31041b4b0 100644
--- a/content/browser/frame_host/navigation_controller_impl_browsertest.cc
+++ b/content/browser/frame_host/navigation_controller_impl_browsertest.cc
@@ -3503,6 +3503,7 @@ IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest, ReloadOriginalRequest) {
// navigation history of a subframe when it is loaded, and 2) that that initial
// "about:blank" returns if it is navigated to as part of a history navigation.
// See http://crbug.com/542299 and https://github.com/whatwg/html/issues/546 .
+// TODO(avi, creis): This test is partially neutered; fix it.
IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest,
BackToAboutBlankIframe) {
GURL original_url(embedded_test_server()->GetURL(
@@ -3562,6 +3563,13 @@ IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest,
EXPECT_EQ(frame_url, frame->current_url());
+ // At this point the rest of the test is inapplicable. The bug that it tests
+ // to be gone had to be reintroduced.
+ //
+ // See the discussion in NavigationControllerImpl::FindFramesToNavigate for
+ // more information.
+
+#if 0
// Go back. Because the old state had an empty frame, that should be restored
// even though it was replaced in the second navigation entry.
@@ -3575,12 +3583,14 @@ IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest,
EXPECT_EQ(0, controller.GetLastCommittedEntryIndex());
EXPECT_EQ(GURL(url::kAboutBlankURL), frame->current_url());
+#endif
}
// This test is similar to "BackToAboutBlankIframe" above, except that a
// fragment navigation is used rather than pushState (both create an in-page
// navigation, so we need to test both), and an initial 'src' is given to the
// iframe to test proper restoration in that case.
+// TODO(avi, creis): This test is partially neutered; fix it.
IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest,
BackToIframeWithContent) {
GURL links_url(embedded_test_server()->GetURL(
@@ -3645,6 +3655,13 @@ IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest,
EXPECT_EQ(frame_url_2, frame->current_url());
+ // At this point the rest of the test is inapplicable. The bug that it tests
+ // to be gone had to be reintroduced.
+ //
+ // See the discussion in NavigationControllerImpl::FindFramesToNavigate for
+ // more information.
+
+#if 0
// Go back two entries. The original frame URL should be back.
TestFrameNavigationObserver observer(frame);
@@ -3657,6 +3674,7 @@ IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest,
EXPECT_EQ(0, controller.GetLastCommittedEntryIndex());
EXPECT_EQ(frame_url_1, frame->current_url());
+#endif
}
// Ensure that we do not corrupt a NavigationEntry's PageState if a subframe
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl.cc ('k') | content/renderer/history_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698