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

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

Issue 1846653004: Rename IGNORING_CACHE to BYPASSING_CACHE (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "content/browser/frame_host/navigation_controller_impl.h" 10 #include "content/browser/frame_host/navigation_controller_impl.h"
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 ASSERT_TRUE(main_request != NULL); 841 ASSERT_TRUE(main_request != NULL);
842 EXPECT_EQ(FrameMsg_Navigate_Type::RELOAD, 842 EXPECT_EQ(FrameMsg_Navigate_Type::RELOAD,
843 main_request->common_params().navigation_type); 843 main_request->common_params().navigation_type);
844 main_test_rfh()->PrepareForCommit(); 844 main_test_rfh()->PrepareForCommit();
845 EXPECT_FALSE(GetSpeculativeRenderFrameHost(node)); 845 EXPECT_FALSE(GetSpeculativeRenderFrameHost(node));
846 846
847 main_test_rfh()->SendNavigate(0, entry_id, false, kUrl); 847 main_test_rfh()->SendNavigate(0, entry_id, false, kUrl);
848 EXPECT_FALSE(GetSpeculativeRenderFrameHost(node)); 848 EXPECT_FALSE(GetSpeculativeRenderFrameHost(node));
849 849
850 // Now do a shift+reload. 850 // Now do a shift+reload.
851 controller().ReloadIgnoringCache(false); 851 controller().ReloadBypassingCache(false);
852 // A NavigationRequest should have been generated. 852 // A NavigationRequest should have been generated.
853 main_request = node->navigation_request(); 853 main_request = node->navigation_request();
854 ASSERT_TRUE(main_request != NULL); 854 ASSERT_TRUE(main_request != NULL);
855 EXPECT_EQ(FrameMsg_Navigate_Type::RELOAD_IGNORING_CACHE, 855 EXPECT_EQ(FrameMsg_Navigate_Type::RELOAD_BYPASSING_CACHE,
856 main_request->common_params().navigation_type); 856 main_request->common_params().navigation_type);
857 main_test_rfh()->PrepareForCommit(); 857 main_test_rfh()->PrepareForCommit();
858 EXPECT_FALSE(GetSpeculativeRenderFrameHost(node)); 858 EXPECT_FALSE(GetSpeculativeRenderFrameHost(node));
859 } 859 }
860 860
861 // PlzNavigate: Confirm that a speculative RenderFrameHost is used when 861 // PlzNavigate: Confirm that a speculative RenderFrameHost is used when
862 // navigating from one site to another. 862 // navigating from one site to another.
863 TEST_F(NavigatorTestWithBrowserSideNavigation, 863 TEST_F(NavigatorTestWithBrowserSideNavigation,
864 SpeculativeRendererWorksBaseCase) { 864 SpeculativeRendererWorksBaseCase) {
865 // Navigate to an initial site. 865 // Navigate to an initial site.
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 main_test_rfh()->PrepareForCommit(); 1160 main_test_rfh()->PrepareForCommit();
1161 1161
1162 // Claim that the navigation was within same page. 1162 // Claim that the navigation was within same page.
1163 int bad_msg_count = process()->bad_msg_count(); 1163 int bad_msg_count = process()->bad_msg_count();
1164 GetSpeculativeRenderFrameHost(node)->SendNavigateWithModificationCallback( 1164 GetSpeculativeRenderFrameHost(node)->SendNavigateWithModificationCallback(
1165 0, entry_id, true, kUrl2, base::Bind(SetWithinPage, kUrl1)); 1165 0, entry_id, true, kUrl2, base::Bind(SetWithinPage, kUrl1));
1166 EXPECT_EQ(process()->bad_msg_count(), bad_msg_count + 1); 1166 EXPECT_EQ(process()->bad_msg_count(), bad_msg_count + 1);
1167 } 1167 }
1168 1168
1169 } // namespace content 1169 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigator_impl.cc ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698