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

Side by Side Diff: ios/web/public/test/fakes/crw_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
« no previous file with comments | « ios/chrome/browser/tabs/tab.mm ('k') | ios/web/public/test/fakes/test_web_state_observer.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #import "ios/web/public/test/fakes/crw_test_web_state_observer.h" 5 #import "ios/web/public/test/fakes/crw_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/web_state/navigation_context_impl.h" 9 #include "ios/web/web_state/navigation_context_impl.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 _commitNavigationInfo = base::MakeUnique<web::TestCommitNavigationInfo>(); 125 _commitNavigationInfo = base::MakeUnique<web::TestCommitNavigationInfo>();
126 _commitNavigationInfo->web_state = webState; 126 _commitNavigationInfo->web_state = webState;
127 _commitNavigationInfo->load_details = load_details; 127 _commitNavigationInfo->load_details = load_details;
128 } 128 }
129 129
130 - (void)webState:(web::WebState*)webState 130 - (void)webState:(web::WebState*)webState
131 didFinishNavigation:(web::NavigationContext*)navigation { 131 didFinishNavigation:(web::NavigationContext*)navigation {
132 _didFinishNavigationInfo = 132 _didFinishNavigationInfo =
133 base::MakeUnique<web::TestDidFinishNavigationInfo>(); 133 base::MakeUnique<web::TestDidFinishNavigationInfo>();
134 _didFinishNavigationInfo->web_state = webState; 134 _didFinishNavigationInfo->web_state = webState;
135 if (navigation->IsSamePage()) { 135 if (navigation->IsSameDocument()) {
136 ASSERT_FALSE(navigation->IsErrorPage()); 136 ASSERT_FALSE(navigation->IsErrorPage());
137 _didFinishNavigationInfo->context = 137 _didFinishNavigationInfo->context =
138 web::NavigationContextImpl::CreateSamePageNavigationContext( 138 web::NavigationContextImpl::CreateSamePageNavigationContext(
139 navigation->GetWebState(), navigation->GetUrl()); 139 navigation->GetWebState(), navigation->GetUrl());
140 } else if (navigation->IsErrorPage()) { 140 } else if (navigation->IsErrorPage()) {
141 ASSERT_FALSE(navigation->IsSamePage()); 141 ASSERT_FALSE(navigation->IsSameDocument());
142 _didFinishNavigationInfo->context = 142 _didFinishNavigationInfo->context =
143 web::NavigationContextImpl::CreateErrorPageNavigationContext( 143 web::NavigationContextImpl::CreateErrorPageNavigationContext(
144 navigation->GetWebState(), navigation->GetUrl()); 144 navigation->GetWebState(), navigation->GetUrl());
145 } else { 145 } else {
146 _didFinishNavigationInfo->context = 146 _didFinishNavigationInfo->context =
147 web::NavigationContextImpl::CreateNavigationContext( 147 web::NavigationContextImpl::CreateNavigationContext(
148 navigation->GetWebState(), navigation->GetUrl()); 148 navigation->GetWebState(), navigation->GetUrl());
149 } 149 }
150 } 150 }
151 151
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 _stopLoadingInfo = base::MakeUnique<web::TestStopLoadingInfo>(); 221 _stopLoadingInfo = base::MakeUnique<web::TestStopLoadingInfo>();
222 _stopLoadingInfo->web_state = webState; 222 _stopLoadingInfo->web_state = webState;
223 } 223 }
224 224
225 - (void)webStateDidStartLoading:(web::WebState*)webState { 225 - (void)webStateDidStartLoading:(web::WebState*)webState {
226 _startLoadingInfo = base::MakeUnique<web::TestStartLoadingInfo>(); 226 _startLoadingInfo = base::MakeUnique<web::TestStartLoadingInfo>();
227 _startLoadingInfo->web_state = webState; 227 _startLoadingInfo->web_state = webState;
228 } 228 }
229 229
230 @end 230 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/tabs/tab.mm ('k') | ios/web/public/test/fakes/test_web_state_observer.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698