OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 switches::kEnableBrowserSideNavigation)) { | 233 switches::kEnableBrowserSideNavigation)) { |
234 FrameTreeNode* root = contents()->GetFrameTree()->root(); | 234 FrameTreeNode* root = contents()->GetFrameTree()->root(); |
235 NavigationRequest* navigation_request = static_cast<NavigatorImpl*>( | 235 NavigationRequest* navigation_request = static_cast<NavigatorImpl*>( |
236 root->navigator())->GetNavigationRequestForNodeForTesting(root); | 236 root->navigator())->GetNavigationRequestForNodeForTesting(root); |
237 CHECK(navigation_request); | 237 CHECK(navigation_request); |
238 return navigation_request->common_params().url; | 238 return navigation_request->common_params().url; |
239 } | 239 } |
240 const IPC::Message* message = | 240 const IPC::Message* message = |
241 process()->sink().GetFirstMessageMatching(FrameMsg_Navigate::ID); | 241 process()->sink().GetFirstMessageMatching(FrameMsg_Navigate::ID); |
242 CHECK(message); | 242 CHECK(message); |
243 Tuple<CommonNavigationParams, StartNavigationParams, CommitNavigationParams, | 243 Tuple<CommonNavigationParams, StartNavigationParams, |
244 HistoryNavigationParams> nav_params; | 244 RequestNavigationParams> nav_params; |
245 FrameMsg_Navigate::Read(message, &nav_params); | 245 FrameMsg_Navigate::Read(message, &nav_params); |
246 return get<0>(nav_params).url; | 246 return get<0>(nav_params).url; |
247 } | 247 } |
248 | 248 |
249 protected: | 249 protected: |
250 GURL navigated_url_; | 250 GURL navigated_url_; |
251 size_t navigation_entry_committed_counter_; | 251 size_t navigation_entry_committed_counter_; |
252 }; | 252 }; |
253 | 253 |
254 void RegisterForAllNavNotifications(TestNotificationTracker* tracker, | 254 void RegisterForAllNavNotifications(TestNotificationTracker* tracker, |
(...skipping 4268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4523 { | 4523 { |
4524 LoadCommittedDetails details; | 4524 LoadCommittedDetails details; |
4525 controller_impl().RendererDidNavigate(main_test_rfh(), params, &details); | 4525 controller_impl().RendererDidNavigate(main_test_rfh(), params, &details); |
4526 EXPECT_EQ(PAGE_TYPE_ERROR, | 4526 EXPECT_EQ(PAGE_TYPE_ERROR, |
4527 controller_impl().GetLastCommittedEntry()->GetPageType()); | 4527 controller_impl().GetLastCommittedEntry()->GetPageType()); |
4528 EXPECT_EQ(NAVIGATION_TYPE_IN_PAGE, details.type); | 4528 EXPECT_EQ(NAVIGATION_TYPE_IN_PAGE, details.type); |
4529 } | 4529 } |
4530 } | 4530 } |
4531 | 4531 |
4532 } // namespace content | 4532 } // namespace content |
OLD | NEW |