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

Side by Side Diff: ios/chrome/browser/tabs/tab_unittest.mm

Issue 2626733003: [ios] Removed -[CRWWebDelegate webDidAddPendingURL]. (Closed)
Patch Set: Created 3 years, 11 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/web_state/ui/crw_web_delegate.h » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 <UIKit/UIKit.h> 5 #import <UIKit/UIKit.h>
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/ios/block_types.h" 10 #include "base/ios/block_types.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 [tab_ close]; 219 [tab_ close];
220 220
221 BlockCleanupTest::TearDown(); 221 BlockCleanupTest::TearDown();
222 } 222 }
223 223
224 void BrowseTo(const GURL& userUrl, const GURL& redirectUrl, NSString* title) { 224 void BrowseTo(const GURL& userUrl, const GURL& redirectUrl, NSString* title) {
225 [[[(id)mock_web_controller_ expect] 225 [[[(id)mock_web_controller_ expect]
226 andReturnValue:OCMOCK_VALUE(kLoadRequested)] loadPhase]; 226 andReturnValue:OCMOCK_VALUE(kLoadRequested)] loadPhase];
227 web::Referrer empty_referrer; 227 web::Referrer empty_referrer;
228 [tab_ webWillAddPendingURL:userUrl transition:ui::PAGE_TRANSITION_TYPED]; 228 [tab_ webWillAddPendingURL:userUrl transition:ui::PAGE_TRANSITION_TYPED];
229 [tab_ webDidAddPendingURL]; 229 [tab_ webStateImpl]->OnProvisionalNavigationStarted(userUrl);
230 [tab_ webWillAddPendingURL:redirectUrl 230 [tab_ webWillAddPendingURL:redirectUrl
231 transition:ui::PAGE_TRANSITION_CLIENT_REDIRECT]; 231 transition:ui::PAGE_TRANSITION_CLIENT_REDIRECT];
232 [[tab_ navigationManager]->GetSessionController() 232 [[tab_ navigationManager]->GetSessionController()
233 addPendingEntry:redirectUrl 233 addPendingEntry:redirectUrl
234 referrer:empty_referrer 234 referrer:empty_referrer
235 transition:ui::PAGE_TRANSITION_CLIENT_REDIRECT 235 transition:ui::PAGE_TRANSITION_CLIENT_REDIRECT
236 rendererInitiated:YES]; 236 rendererInitiated:YES];
237 [tab_ webDidAddPendingURL]; 237 [tab_ webStateImpl]->OnProvisionalNavigationStarted(redirectUrl);
238 [[[(id)mock_web_controller_ expect] 238 [[[(id)mock_web_controller_ expect]
239 andReturnValue:OCMOCK_VALUE(kPageLoading)] loadPhase]; 239 andReturnValue:OCMOCK_VALUE(kPageLoading)] loadPhase];
240 [[tab_ navigationManager]->GetSessionController() commitPendingEntry]; 240 [[tab_ navigationManager]->GetSessionController() commitPendingEntry];
241 [[tab_ webController] webStateImpl]->OnNavigationCommitted(redirectUrl); 241 [[tab_ webController] webStateImpl]->OnNavigationCommitted(redirectUrl);
242 [tab_ webDidStartLoadingURL:redirectUrl shouldUpdateHistory:YES]; 242 [tab_ webDidStartLoadingURL:redirectUrl shouldUpdateHistory:YES];
243 [tab_ webController:mock_web_controller_ titleDidChange:title]; 243 [tab_ webController:mock_web_controller_ titleDidChange:title];
244 [[[(id)mock_web_controller_ expect] 244 [[[(id)mock_web_controller_ expect]
245 andReturnValue:OCMOCK_VALUE(kPageLoaded)] loadPhase]; 245 andReturnValue:OCMOCK_VALUE(kPageLoaded)] loadPhase];
246 [tab_ webStateImpl]->OnPageLoaded(redirectUrl, true); 246 [tab_ webStateImpl]->OnPageLoaded(redirectUrl, true);
247 } 247 }
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 EXPECT_FALSE([metadata shouldAutoOpenLinks]); 549 EXPECT_FALSE([metadata shouldAutoOpenLinks]);
550 } 550 }
551 551
552 class TestRequestGroupID : public BlockCleanupTest { 552 class TestRequestGroupID : public BlockCleanupTest {
553 public: 553 public:
554 void SetUp() override { BlockCleanupTest::SetUp(); } 554 void SetUp() override { BlockCleanupTest::SetUp(); }
555 void TearDown() override { BlockCleanupTest::TearDown(); } 555 void TearDown() override { BlockCleanupTest::TearDown(); }
556 }; 556 };
557 557
558 } // namespace 558 } // namespace
OLDNEW
« no previous file with comments | « ios/chrome/browser/tabs/tab.mm ('k') | ios/web/public/web_state/ui/crw_web_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698