Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: content/browser/frame_host/navigation_controller_impl_unittest.cc

Issue 1018383002: Make NavigationParams clearer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Charlie's comments Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 4264 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_entry_impl.h » ('j') | content/browser/frame_host/navigation_entry_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698