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

Side by Side Diff: ios/web/navigation/navigation_manager_impl_unittest.mm

Issue 2755823002: Moved |openedByDOM| to WebState's CreateParams and public interface. (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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/navigation/navigation_manager_impl.h" 5 #import "ios/web/navigation/navigation_manager_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "base/mac/scoped_nsobject.h" 8 #import "base/mac/scoped_nsobject.h"
9 #import "ios/web/navigation/crw_session_controller+private_constructors.h" 9 #import "ios/web/navigation/crw_session_controller+private_constructors.h"
10 #import "ios/web/navigation/navigation_manager_delegate.h" 10 #import "ios/web/navigation/navigation_manager_delegate.h"
(...skipping 16 matching lines...) Expand all
27 WebState* GetWebState() override { return nullptr; } 27 WebState* GetWebState() override { return nullptr; }
28 }; 28 };
29 } // namespace 29 } // namespace
30 30
31 // Test fixture for NavigationManagerImpl testing. 31 // Test fixture for NavigationManagerImpl testing.
32 class NavigationManagerTest : public PlatformTest { 32 class NavigationManagerTest : public PlatformTest {
33 protected: 33 protected:
34 NavigationManagerTest() : manager_(new NavigationManagerImpl()) { 34 NavigationManagerTest() : manager_(new NavigationManagerImpl()) {
35 manager_->SetDelegate(&delegate_); 35 manager_->SetDelegate(&delegate_);
36 manager_->SetBrowserState(&browser_state_); 36 manager_->SetBrowserState(&browser_state_);
37 controller_.reset([[CRWSessionController alloc] 37 controller_.reset(
38 initWithBrowserState:&browser_state_ 38 [[CRWSessionController alloc] initWithBrowserState:&browser_state_]);
39 openedByDOM:NO]);
40 manager_->SetSessionController(controller_.get()); 39 manager_->SetSessionController(controller_.get());
41 } 40 }
42 CRWSessionController* session_controller() { return controller_.get(); } 41 CRWSessionController* session_controller() { return controller_.get(); }
43 NavigationManagerImpl* navigation_manager() { return manager_.get(); } 42 NavigationManagerImpl* navigation_manager() { return manager_.get(); }
44 43
45 private: 44 private:
46 TestBrowserState browser_state_; 45 TestBrowserState browser_state_;
47 TestNavigationManagerDelegate delegate_; 46 TestNavigationManagerDelegate delegate_;
48 std::unique_ptr<NavigationManagerImpl> manager_; 47 std::unique_ptr<NavigationManagerImpl> manager_;
49 base::scoped_nsobject<CRWSessionController> controller_; 48 base::scoped_nsobject<CRWSessionController> controller_;
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 608
610 GURL url_before_reload = navigation_manager()->GetVisibleItem()->GetURL(); 609 GURL url_before_reload = navigation_manager()->GetVisibleItem()->GetURL();
611 navigation_manager()->Reload(web::ReloadType::NORMAL, 610 navigation_manager()->Reload(web::ReloadType::NORMAL,
612 false /* check_for_repost */); 611 false /* check_for_repost */);
613 612
614 EXPECT_EQ(url_before_reload, 613 EXPECT_EQ(url_before_reload,
615 navigation_manager()->GetVisibleItem()->GetURL()); 614 navigation_manager()->GetVisibleItem()->GetURL());
616 } 615 }
617 616
618 } // namespace web 617 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/navigation/navigation_manager_impl.mm ('k') | ios/web/navigation/session_storage_builder.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698