OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |