OLD | NEW |
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/feature_list.h" | 7 #include "base/feature_list.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 ASSERT_TRUE(main_request != NULL); | 836 ASSERT_TRUE(main_request != NULL); |
837 EXPECT_EQ(FrameMsg_Navigate_Type::RELOAD_MAIN_RESOURCE, | 837 EXPECT_EQ(FrameMsg_Navigate_Type::RELOAD_MAIN_RESOURCE, |
838 main_request->common_params().navigation_type); | 838 main_request->common_params().navigation_type); |
839 main_test_rfh()->PrepareForCommit(); | 839 main_test_rfh()->PrepareForCommit(); |
840 EXPECT_FALSE(GetSpeculativeRenderFrameHost(node)); | 840 EXPECT_FALSE(GetSpeculativeRenderFrameHost(node)); |
841 | 841 |
842 main_test_rfh()->SendNavigate(entry_id, false, kUrl); | 842 main_test_rfh()->SendNavigate(entry_id, false, kUrl); |
843 EXPECT_FALSE(GetSpeculativeRenderFrameHost(node)); | 843 EXPECT_FALSE(GetSpeculativeRenderFrameHost(node)); |
844 | 844 |
845 // Now do a shift+reload. | 845 // Now do a shift+reload. |
846 controller().ReloadBypassingCache(false); | 846 controller().Reload(false, ReloadType::BYPASSING_CACHE); |
847 // A NavigationRequest should have been generated. | 847 // A NavigationRequest should have been generated. |
848 main_request = node->navigation_request(); | 848 main_request = node->navigation_request(); |
849 ASSERT_TRUE(main_request != NULL); | 849 ASSERT_TRUE(main_request != NULL); |
850 EXPECT_EQ(FrameMsg_Navigate_Type::RELOAD_BYPASSING_CACHE, | 850 EXPECT_EQ(FrameMsg_Navigate_Type::RELOAD_BYPASSING_CACHE, |
851 main_request->common_params().navigation_type); | 851 main_request->common_params().navigation_type); |
852 main_test_rfh()->PrepareForCommit(); | 852 main_test_rfh()->PrepareForCommit(); |
853 EXPECT_FALSE(GetSpeculativeRenderFrameHost(node)); | 853 EXPECT_FALSE(GetSpeculativeRenderFrameHost(node)); |
854 } | 854 } |
855 | 855 |
856 // PlzNavigate: Confirm that a speculative RenderFrameHost is used when | 856 // PlzNavigate: Confirm that a speculative RenderFrameHost is used when |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1229 | 1229 |
1230 // The first navigation commits. This should clear up the speculative RFH and | 1230 // The first navigation commits. This should clear up the speculative RFH and |
1231 // the ongoing NavigationRequest. | 1231 // the ongoing NavigationRequest. |
1232 speculative_rfh->SendNavigate(entry_id, true, kUrl2); | 1232 speculative_rfh->SendNavigate(entry_id, true, kUrl2); |
1233 EXPECT_FALSE(node->navigation_request()); | 1233 EXPECT_FALSE(node->navigation_request()); |
1234 EXPECT_FALSE(GetSpeculativeRenderFrameHost(node)); | 1234 EXPECT_FALSE(GetSpeculativeRenderFrameHost(node)); |
1235 EXPECT_EQ(speculative_rfh, main_test_rfh()); | 1235 EXPECT_EQ(speculative_rfh, main_test_rfh()); |
1236 } | 1236 } |
1237 | 1237 |
1238 } // namespace content | 1238 } // namespace content |
OLD | NEW |