| 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<FrameMsg_Navigate_Params> nav_params; | 243 Tuple<CommonNavigationParams, StartNavigationParams, CommitNavigationParams, |
| 244 HistoryNavigationParams> nav_params; |
| 244 FrameMsg_Navigate::Read(message, &nav_params); | 245 FrameMsg_Navigate::Read(message, &nav_params); |
| 245 return get<0>(nav_params).common_params.url; | 246 return get<0>(nav_params).url; |
| 246 } | 247 } |
| 247 | 248 |
| 248 protected: | 249 protected: |
| 249 GURL navigated_url_; | 250 GURL navigated_url_; |
| 250 size_t navigation_entry_committed_counter_; | 251 size_t navigation_entry_committed_counter_; |
| 251 }; | 252 }; |
| 252 | 253 |
| 253 void RegisterForAllNavNotifications(TestNotificationTracker* tracker, | 254 void RegisterForAllNavNotifications(TestNotificationTracker* tracker, |
| 254 NavigationController* controller) { | 255 NavigationController* controller) { |
| 255 tracker->ListenFor(NOTIFICATION_NAV_LIST_PRUNED, | 256 tracker->ListenFor(NOTIFICATION_NAV_LIST_PRUNED, |
| (...skipping 4279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4535 { | 4536 { |
| 4536 LoadCommittedDetails details; | 4537 LoadCommittedDetails details; |
| 4537 controller_impl().RendererDidNavigate(main_test_rfh(), params, &details); | 4538 controller_impl().RendererDidNavigate(main_test_rfh(), params, &details); |
| 4538 EXPECT_EQ(PAGE_TYPE_ERROR, | 4539 EXPECT_EQ(PAGE_TYPE_ERROR, |
| 4539 controller_impl().GetLastCommittedEntry()->GetPageType()); | 4540 controller_impl().GetLastCommittedEntry()->GetPageType()); |
| 4540 EXPECT_EQ(NAVIGATION_TYPE_IN_PAGE, details.type); | 4541 EXPECT_EQ(NAVIGATION_TYPE_IN_PAGE, details.type); |
| 4541 } | 4542 } |
| 4542 } | 4543 } |
| 4543 | 4544 |
| 4544 } // namespace content | 4545 } // namespace content |
| OLD | NEW |