| 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, CommitNavigationParams> |
| 244 HistoryNavigationParams> nav_params; | 244 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 4264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4519 { | 4519 { |
| 4520 LoadCommittedDetails details; | 4520 LoadCommittedDetails details; |
| 4521 controller_impl().RendererDidNavigate(main_test_rfh(), params, &details); | 4521 controller_impl().RendererDidNavigate(main_test_rfh(), params, &details); |
| 4522 EXPECT_EQ(PAGE_TYPE_ERROR, | 4522 EXPECT_EQ(PAGE_TYPE_ERROR, |
| 4523 controller_impl().GetLastCommittedEntry()->GetPageType()); | 4523 controller_impl().GetLastCommittedEntry()->GetPageType()); |
| 4524 EXPECT_EQ(NAVIGATION_TYPE_IN_PAGE, details.type); | 4524 EXPECT_EQ(NAVIGATION_TYPE_IN_PAGE, details.type); |
| 4525 } | 4525 } |
| 4526 } | 4526 } |
| 4527 | 4527 |
| 4528 } // namespace content | 4528 } // namespace content |
| OLD | NEW |