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

Side by Side Diff: ios/chrome/browser/ui/fullscreen_controller_unittest.mm

Issue 2599313002: Create headerHeightForTab in TabHeadersDelegate. (Closed)
Patch Set: only fullscreencontroller and sideswipecontroller 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "base/mac/scoped_nsobject.h" 5 #include "base/mac/scoped_nsobject.h"
6 #import "ios/chrome/browser/ui/fullscreen_controller.h" 6 #import "ios/chrome/browser/ui/fullscreen_controller.h"
7 #import "ios/web/public/test/fakes/test_web_view_content_view.h" 7 #import "ios/web/public/test/fakes/test_web_view_content_view.h"
8 #import "ios/web/public/web_state/crw_web_view_scroll_view_proxy.h" 8 #import "ios/web/public/web_state/crw_web_view_scroll_view_proxy.h"
9 #import "ios/web/public/web_state/ui/crw_web_view_content_view.h" 9 #import "ios/web/public/web_state/ui/crw_web_view_content_view.h"
10 #import "ios/web/web_state/crw_web_view_proxy_impl.h" 10 #import "ios/web/web_state/crw_web_view_proxy_impl.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 54
55 - (BOOL)isTabWithIDCurrent:(NSString*)sessionID { 55 - (BOOL)isTabWithIDCurrent:(NSString*)sessionID {
56 return [self fakeIsTabWithIDCurrentFlag]; 56 return [self fakeIsTabWithIDCurrentFlag];
57 } 57 }
58 58
59 - (CGFloat)currentHeaderOffset { 59 - (CGFloat)currentHeaderOffset {
60 return currentPosition_; 60 return currentPosition_;
61 } 61 }
62 62
63 - (CGFloat)headerHeight { 63 - (CGFloat)headerHeightForCurrentTab {
64 return kHeaderHeight; 64 return kHeaderHeight;
65 } 65 }
66 66
67 - (CGFloat)headerHeightForTab:(Tab*)tab {
68 return kHeaderHeight;
69 }
70
67 @end 71 @end
68 72
69 namespace { 73 namespace {
70 74
71 NSString* const kFakeSessionId = @"fake-session-id"; 75 NSString* const kFakeSessionId = @"fake-session-id";
72 76
73 class FullscreenControllerTest : public PlatformTest { 77 class FullscreenControllerTest : public PlatformTest {
74 protected: 78 protected:
75 void SetUp() override { 79 void SetUp() override {
76 CGRect frame = CGRectMake(0.0, 0.0, 300.0, 900.0); 80 CGRect frame = CGRectMake(0.0, 0.0, 300.0, 900.0);
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 [controller_ webViewScrollViewDidEndDragging:webViewScrollViewProxy_ 373 [controller_ webViewScrollViewDidEndDragging:webViewScrollViewProxy_
370 willDecelerate:NO]; 374 willDecelerate:NO];
371 EXPECT_TRUE(IsHeaderVisible()); 375 EXPECT_TRUE(IsHeaderVisible());
372 376
373 // Hide the keyboard. 377 // Hide the keyboard.
374 [textField resignFirstResponder]; 378 [textField resignFirstResponder];
375 EXPECT_TRUE(IsHeaderVisible()); 379 EXPECT_TRUE(IsHeaderVisible());
376 } 380 }
377 381
378 } // namespace 382 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698