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

Side by Side Diff: content/browser/frame_host/navigation_controller_impl_browsertest.cc

Issue 2780353005: Fix history navigations in PlzNavigate to use the proper load flags. (Closed)
Patch Set: Fixes based on review by csharrison@ 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_request.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/navigation_controller_impl.h" 5 #include "content/browser/frame_host/navigation_controller_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 6797 matching lines...) Expand 10 before | Expand all | Expand 10 after
6808 6808
6809 // For non-PlzNavigate case, this happens asynchronously. 6809 // For non-PlzNavigate case, this happens asynchronously.
6810 if (!IsBrowserSideNavigationEnabled()) 6810 if (!IsBrowserSideNavigationEnabled())
6811 same_tab_observer.Wait(); 6811 same_tab_observer.Wait();
6812 6812
6813 const NavigationController& controller = 6813 const NavigationController& controller =
6814 shell()->web_contents()->GetController(); 6814 shell()->web_contents()->GetController();
6815 ASSERT_EQ(controller.GetPendingEntry(), nullptr); 6815 ASSERT_EQ(controller.GetPendingEntry(), nullptr);
6816 } 6816 }
6817 6817
6818 // Verify that session history navigations (back/forward) correctly hit the
6819 // cache instead of going to the server. The test loads a page with no-cache
6820 // header, stops the server, and goes back expecting succesful navigation.
Charlie Harrison 2017/03/31 20:12:13 close but no cigar. s/succesful/successful/
nasko 2017/03/31 20:15:53 Done.
6821 IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest,
6822 HistoryNavigationUsesCache) {
6823 GURL no_cache_url(embedded_test_server()->GetURL(
6824 "/navigation_controller/page_with_no_cache_header.html"));
6825 GURL regular_url(embedded_test_server()->GetURL("/title2.html"));
6826
6827 NavigationController& controller = shell()->web_contents()->GetController();
6828
6829 EXPECT_TRUE(NavigateToURL(shell(), no_cache_url));
6830 EXPECT_TRUE(NavigateToURL(shell(), regular_url));
6831 EXPECT_EQ(2, controller.GetEntryCount());
6832
6833 EXPECT_TRUE(embedded_test_server()->ShutdownAndWaitUntilComplete());
6834
6835 TestNavigationObserver back_observer(shell()->web_contents());
6836 controller.GoBack();
6837 back_observer.Wait();
6838
6839 EXPECT_TRUE(back_observer.last_navigation_succeeded());
6840 }
6841
6818 } // namespace content 6842 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698