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 "ios/chrome/browser/ui/toolbar/web_toolbar_controller.h" | 5 #import "ios/chrome/browser/ui/toolbar/web_toolbar_controller.h" |
6 | 6 |
7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <memory> | 10 #include <memory> |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 [[[delegate stub] andReturnValue:OCMOCK_VALUE(model_for_mock)] | 70 [[[delegate stub] andReturnValue:OCMOCK_VALUE(model_for_mock)] |
71 toolbarModelIOS]; | 71 toolbarModelIOS]; |
72 | 72 |
73 id urlLoader = [OCMockObject niceMockForProtocol:@protocol(UrlLoader)]; | 73 id urlLoader = [OCMockObject niceMockForProtocol:@protocol(UrlLoader)]; |
74 | 74 |
75 // Create the WebToolbarController using the test objects. | 75 // Create the WebToolbarController using the test objects. |
76 web_toolbar_controller_ = [[WebToolbarController alloc] | 76 web_toolbar_controller_ = [[WebToolbarController alloc] |
77 initWithDelegate:delegate | 77 initWithDelegate:delegate |
78 urlLoader:urlLoader | 78 urlLoader:urlLoader |
79 browserState:chrome_browser_state_.get() | 79 browserState:chrome_browser_state_.get() |
80 preloadProvider:nil]; | 80 preloadProvider:nil |
| 81 dispatcher:nil]; |
81 [web_toolbar_controller_ setUnitTesting:YES]; | 82 [web_toolbar_controller_ setUnitTesting:YES]; |
82 } | 83 } |
83 void TearDown() override { | 84 void TearDown() override { |
84 web_toolbar_controller_ = nil; | 85 web_toolbar_controller_ = nil; |
85 BlockCleanupTest::TearDown(); | 86 BlockCleanupTest::TearDown(); |
86 } | 87 } |
87 | 88 |
88 web::TestWebThreadBundle thread_bundle_; | 89 web::TestWebThreadBundle thread_bundle_; |
89 std::unique_ptr<TestChromeBrowserState> chrome_browser_state_; | 90 std::unique_ptr<TestChromeBrowserState> chrome_browser_state_; |
90 TestToolbarModel* toolbar_model_; // weak. Owned by toolbar_model_ios_. | 91 TestToolbarModel* toolbar_model_; // weak. Owned by toolbar_model_ios_. |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 CGRect initialRect = initialIt->second; | 217 CGRect initialRect = initialIt->second; |
217 CGRect layoutRect = postLayoutIt->second; | 218 CGRect layoutRect = postLayoutIt->second; |
218 EXPECT_EQ(initialRect.origin.x, layoutRect.origin.x); | 219 EXPECT_EQ(initialRect.origin.x, layoutRect.origin.x); |
219 EXPECT_EQ(initialRect.origin.y, layoutRect.origin.y); | 220 EXPECT_EQ(initialRect.origin.y, layoutRect.origin.y); |
220 EXPECT_EQ(initialRect.size.width, layoutRect.size.width); | 221 EXPECT_EQ(initialRect.size.width, layoutRect.size.width); |
221 EXPECT_EQ(initialRect.size.height, layoutRect.size.height); | 222 EXPECT_EQ(initialRect.size.height, layoutRect.size.height); |
222 initialIt++; | 223 initialIt++; |
223 } | 224 } |
224 } | 225 } |
225 } // namespace | 226 } // namespace |
OLD | NEW |