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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/macros.h" | 6 #include "base/macros.h" |
7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
8 #include "content/browser/frame_host/navigation_controller_impl.h" | 8 #include "content/browser/frame_host/navigation_controller_impl.h" |
9 #include "content/browser/frame_host/navigation_entry_impl.h" | 9 #include "content/browser/frame_host/navigation_entry_impl.h" |
10 #include "content/browser/frame_host/navigation_request.h" | 10 #include "content/browser/frame_host/navigation_request.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 scoped_ptr<NavigationEntryImpl> entry( | 61 scoped_ptr<NavigationEntryImpl> entry( |
62 NavigationEntryImpl::FromNavigationEntry( | 62 NavigationEntryImpl::FromNavigationEntry( |
63 NavigationController::CreateNavigationEntry( | 63 NavigationController::CreateNavigationEntry( |
64 url, | 64 url, |
65 referrer, | 65 referrer, |
66 transition_type, | 66 transition_type, |
67 false, | 67 false, |
68 std::string(), | 68 std::string(), |
69 controller().GetBrowserContext()))); | 69 controller().GetBrowserContext()))); |
70 static_cast<NavigatorImpl*>(node->navigator())->RequestNavigation( | 70 static_cast<NavigatorImpl*>(node->navigator())->RequestNavigation( |
71 node, *entry, reload_type, base::TimeTicks::Now()); | 71 node, *entry->root_node()->frame_entry, *entry, reload_type, |
| 72 base::TimeTicks::Now()); |
72 } | 73 } |
73 | 74 |
74 NavigationRequest* GetNavigationRequestForFrameTreeNode( | 75 NavigationRequest* GetNavigationRequestForFrameTreeNode( |
75 FrameTreeNode* frame_tree_node) { | 76 FrameTreeNode* frame_tree_node) { |
76 return static_cast<NavigatorImpl*>(frame_tree_node->navigator()) | 77 return static_cast<NavigatorImpl*>(frame_tree_node->navigator()) |
77 ->GetNavigationRequestForNodeForTesting(frame_tree_node); | 78 ->GetNavigationRequestForNodeForTesting(frame_tree_node); |
78 } | 79 } |
79 | 80 |
80 TestRenderFrameHost* GetSpeculativeRenderFrameHost(FrameTreeNode* node) { | 81 TestRenderFrameHost* GetSpeculativeRenderFrameHost(FrameTreeNode* node) { |
81 return static_cast<TestRenderFrameHost*>( | 82 return static_cast<TestRenderFrameHost*>( |
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 main_rfh->SendRendererInitiatedNavigationRequest(kUrl2, true); | 1003 main_rfh->SendRendererInitiatedNavigationRequest(kUrl2, true); |
1003 navigation_request = GetNavigationRequestForFrameTreeNode(node); | 1004 navigation_request = GetNavigationRequestForFrameTreeNode(node); |
1004 ASSERT_TRUE(navigation_request); | 1005 ASSERT_TRUE(navigation_request); |
1005 EXPECT_EQ(NavigationRequest::RESPONSE_STARTED, | 1006 EXPECT_EQ(NavigationRequest::RESPONSE_STARTED, |
1006 navigation_request->state()); | 1007 navigation_request->state()); |
1007 EXPECT_FALSE(navigation_request->loader_for_testing()); | 1008 EXPECT_FALSE(navigation_request->loader_for_testing()); |
1008 EXPECT_FALSE(GetSpeculativeRenderFrameHost(node)); | 1009 EXPECT_FALSE(GetSpeculativeRenderFrameHost(node)); |
1009 } | 1010 } |
1010 | 1011 |
1011 } // namespace content | 1012 } // namespace content |
OLD | NEW |