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

Side by Side Diff: ios/web/web_state/ui/crw_web_controller_container_view_unittest.mm

Issue 2752113002: Moved WebView(ScrollView)Proxy files to ui subdirectory. (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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/web_state/ui/crw_web_controller_container_view.h"
6
5 #import "base/mac/scoped_nsobject.h" 7 #import "base/mac/scoped_nsobject.h"
6 #import "ios/web/web_state/crw_web_view_proxy_impl.h" 8 #import "ios/web/web_state/ui/crw_web_view_proxy_impl.h"
7 #import "ios/web/web_state/ui/crw_web_controller_container_view.h"
8 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
9 #import "testing/gtest_mac.h" 10 #import "testing/gtest_mac.h"
10 #include "testing/platform_test.h" 11 #include "testing/platform_test.h"
12 #import "third_party/ocmock/OCMock/OCMock.h"
11 #include "third_party/ocmock/gtest_support.h" 13 #include "third_party/ocmock/gtest_support.h"
12 #import "third_party/ocmock/OCMock/OCMock.h"
13 14
14 namespace { 15 namespace {
15 // The frame of CRWWebControllerContainerViewTest's |container_view_|. 16 // The frame of CRWWebControllerContainerViewTest's |container_view_|.
16 const CGRect kContainerViewFrame = CGRectMake(0.0f, 0.0f, 200.0f, 300.0f); 17 const CGRect kContainerViewFrame = CGRectMake(0.0f, 0.0f, 200.0f, 300.0f);
17 // TestToolbarView's frame height. 18 // TestToolbarView's frame height.
18 const CGFloat kTestToolbarViewHeight = 50.0f; 19 const CGFloat kTestToolbarViewHeight = 50.0f;
19 } 20 }
20 21
21 // Test view to use as a toolbar. 22 // Test view to use as a toolbar.
22 @interface TestToolbarView : UIView 23 @interface TestToolbarView : UIView
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // Check the toolbar's frame. 92 // Check the toolbar's frame.
92 CGRect expected_toolbar_frame = CGRectMake( 93 CGRect expected_toolbar_frame = CGRectMake(
93 CGRectGetMinX([container_view_ bounds]), 94 CGRectGetMinX([container_view_ bounds]),
94 CGRectGetMaxY([container_view_ bounds]) - kTestToolbarViewHeight, 95 CGRectGetMaxY([container_view_ bounds]) - kTestToolbarViewHeight,
95 CGRectGetWidth(kContainerViewFrame), kTestToolbarViewHeight); 96 CGRectGetWidth(kContainerViewFrame), kTestToolbarViewHeight);
96 CGRect toolbar_container_frame = 97 CGRect toolbar_container_frame =
97 [container_view_ convertRect:[toolbar bounds] fromView:toolbar]; 98 [container_view_ convertRect:[toolbar bounds] fromView:toolbar];
98 EXPECT_TRUE(CGRectEqualToRect(expected_toolbar_frame, 99 EXPECT_TRUE(CGRectEqualToRect(expected_toolbar_frame,
99 toolbar_container_frame)); 100 toolbar_container_frame));
100 } 101 }
OLDNEW
« no previous file with comments | « ios/web/web_state/ui/crw_web_controller_container_view.mm ('k') | ios/web/web_state/ui/crw_web_view_proxy_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698