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

Side by Side Diff: ios/web/public/test/fakes/test_web_state_observer.mm

Issue 2734293002: s/IsSamePage/IsSameDocument for NavigationContext. (Closed)
Patch Set: Created 3 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "ios/web/public/test/fakes/test_web_state_observer.h" 5 #include "ios/web/public/test/fakes/test_web_state_observer.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "ios/web/public/web_state/navigation_context.h" 8 #include "ios/web/public/web_state/navigation_context.h"
9 #include "ios/web/public/web_state/web_state.h" 9 #include "ios/web/public/web_state/web_state.h"
10 #include "ios/web/web_state/navigation_context_impl.h" 10 #include "ios/web/web_state/navigation_context_impl.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 void TestWebStateObserver::NavigationItemChanged() { 61 void TestWebStateObserver::NavigationItemChanged() {
62 navigation_item_changed_info_ = 62 navigation_item_changed_info_ =
63 base::MakeUnique<web::TestNavigationItemChangedInfo>(); 63 base::MakeUnique<web::TestNavigationItemChangedInfo>();
64 navigation_item_changed_info_->web_state = web_state(); 64 navigation_item_changed_info_->web_state = web_state();
65 } 65 }
66 66
67 void TestWebStateObserver::DidFinishNavigation(NavigationContext* context) { 67 void TestWebStateObserver::DidFinishNavigation(NavigationContext* context) {
68 did_finish_navigation_info_ = 68 did_finish_navigation_info_ =
69 base::MakeUnique<web::TestDidFinishNavigationInfo>(); 69 base::MakeUnique<web::TestDidFinishNavigationInfo>();
70 did_finish_navigation_info_->web_state = web_state(); 70 did_finish_navigation_info_->web_state = web_state();
71 if (context->IsSamePage()) { 71 if (context->IsSameDocument()) {
72 ASSERT_FALSE(context->IsErrorPage()); 72 ASSERT_FALSE(context->IsErrorPage());
73 did_finish_navigation_info_->context = 73 did_finish_navigation_info_->context =
74 NavigationContextImpl::CreateSamePageNavigationContext( 74 NavigationContextImpl::CreateSamePageNavigationContext(
75 context->GetWebState(), context->GetUrl()); 75 context->GetWebState(), context->GetUrl());
76 } else if (context->IsErrorPage()) { 76 } else if (context->IsErrorPage()) {
77 ASSERT_FALSE(context->IsSamePage()); 77 ASSERT_FALSE(context->IsSameDocument());
78 did_finish_navigation_info_->context = 78 did_finish_navigation_info_->context =
79 NavigationContextImpl::CreateErrorPageNavigationContext( 79 NavigationContextImpl::CreateErrorPageNavigationContext(
80 context->GetWebState(), context->GetUrl()); 80 context->GetWebState(), context->GetUrl());
81 } else { 81 } else {
82 did_finish_navigation_info_->context = 82 did_finish_navigation_info_->context =
83 NavigationContextImpl::CreateNavigationContext(context->GetWebState(), 83 NavigationContextImpl::CreateNavigationContext(context->GetWebState(),
84 context->GetUrl()); 84 context->GetUrl());
85 } 85 }
86 } 86 }
87 87
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 start_loading_info_ = base::MakeUnique<web::TestStartLoadingInfo>(); 138 start_loading_info_ = base::MakeUnique<web::TestStartLoadingInfo>();
139 start_loading_info_->web_state = web_state(); 139 start_loading_info_->web_state = web_state();
140 } 140 }
141 141
142 void TestWebStateObserver::DidStopLoading() { 142 void TestWebStateObserver::DidStopLoading() {
143 stop_loading_info_ = base::MakeUnique<web::TestStopLoadingInfo>(); 143 stop_loading_info_ = base::MakeUnique<web::TestStopLoadingInfo>();
144 stop_loading_info_->web_state = web_state(); 144 stop_loading_info_->web_state = web_state();
145 } 145 }
146 146
147 } // namespace web 147 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/public/test/fakes/crw_test_web_state_observer.mm ('k') | ios/web/public/web_state/navigation_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698