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

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

Issue 2710063002: Revert of Add DidSaveScrollOrScaleState flag to prevent restoreScrollPosition... (Closed)
Patch Set: rebase update Created 3 years, 8 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 | « no previous file | content/common/page_state_serialization.h » ('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 49223604d465f724c11fa6746744337c4ce76d5b..3228b0100a50b4a4965f5568ff69c49658e9088a 100644
--- a/content/browser/frame_host/navigation_controller_impl_browsertest.cc
+++ b/content/browser/frame_host/navigation_controller_impl_browsertest.cc
@@ -1340,7 +1340,9 @@ IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest,
}
// Verify that reloading a page with url anchor scrolls to correct position.
-IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest, ReloadWithUrlAnchor) {
+// Disabled due to flakiness: https://crbug.com/672545.
+IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest,
+ DISABLED_ReloadWithUrlAnchor) {
GURL url1(embedded_test_server()->GetURL(
"/navigation_controller/reload-with-url-anchor.html#d2"));
EXPECT_TRUE(NavigateToURL(shell(), url1));
@@ -1358,41 +1360,6 @@ IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest, ReloadWithUrlAnchor) {
EXPECT_EQ(100, value);
}
-// Verify that reloading a page with url anchor and scroll scrolls to correct
-// position.
-IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest,
- ReloadWithUrlAnchorAndScroll) {
- GURL url1(embedded_test_server()->GetURL(
- "/navigation_controller/reload-with-url-anchor.html#d2"));
- EXPECT_TRUE(NavigateToURL(shell(), url1));
-
- std::string script_scroll_down = "window.scroll(0, 10)";
- EXPECT_TRUE(ExecuteScript(shell(), script_scroll_down));
-
- std::string get_div_scroll_top =
- "domAutomationController.send(document.getElementById('div').scrollTop)";
- std::string get_window_scroll_y =
- "domAutomationController.send(window.scrollY)";
- int div_scroll_top = 0;
- int window_scroll_y = 0;
- EXPECT_TRUE(
- ExecuteScriptAndExtractInt(shell(), get_div_scroll_top, &div_scroll_top));
- EXPECT_TRUE(ExecuteScriptAndExtractInt(shell(), get_window_scroll_y,
- &window_scroll_y));
- EXPECT_EQ(100, div_scroll_top);
- EXPECT_EQ(10, window_scroll_y);
-
- // Reload.
- ReloadBlockUntilNavigationsComplete(shell(), 1);
-
- EXPECT_TRUE(
- ExecuteScriptAndExtractInt(shell(), get_div_scroll_top, &div_scroll_top));
- EXPECT_TRUE(ExecuteScriptAndExtractInt(shell(), get_window_scroll_y,
- &window_scroll_y));
- EXPECT_EQ(100, div_scroll_top);
- EXPECT_EQ(10, window_scroll_y);
-}
-
// Verify that empty GURL navigations are not classified as SAME_PAGE.
// See https://crbug.com/534980.
IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest,
« no previous file with comments | « no previous file | content/common/page_state_serialization.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698