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

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

Issue 2590863002: Removing obsolete code. (Closed)
Patch Set: Created 3 years, 12 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/test_web_view_content_view.h" 7 #import "ios/web/public/test/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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 namespace { 69 namespace {
70 70
71 NSString* const kFakeSessionId = @"fake-session-id"; 71 NSString* const kFakeSessionId = @"fake-session-id";
72 72
73 class FullscreenControllerTest : public PlatformTest { 73 class FullscreenControllerTest : public PlatformTest {
74 protected: 74 protected:
75 void SetUp() override { 75 void SetUp() override {
76 CGRect frame = CGRectMake(0.0, 0.0, 300.0, 900.0); 76 CGRect frame = CGRectMake(0.0, 0.0, 300.0, 900.0);
77 PlatformTest::SetUp(); 77 PlatformTest::SetUp();
78 78
79 [FullScreenController setHideOmniboxDelaySeconds:0.0];
80
81 scrollview_.reset([[UIScrollView alloc] initWithFrame:frame]); 79 scrollview_.reset([[UIScrollView alloc] initWithFrame:frame]);
82 scrollview_.get().contentInset = UIEdgeInsetsZero; 80 scrollview_.get().contentInset = UIEdgeInsetsZero;
83 [GetWindow() addSubview:scrollview_]; 81 [GetWindow() addSubview:scrollview_];
84 82
85 CGRect contentSize = CGRectMake(0.0, 0.0, frame.size.width, kContentHeight); 83 CGRect contentSize = CGRectMake(0.0, 0.0, frame.size.width, kContentHeight);
86 scrollview_.get().contentSize = contentSize.size; 84 scrollview_.get().contentSize = contentSize.size;
87 mockWebController_.reset( 85 mockWebController_.reset(
88 [[OCMockObject niceMockForClass:[CRWWebController class]] retain]); 86 [[OCMockObject niceMockForClass:[CRWWebController class]] retain]);
89 mockDelegate_.reset([[MockFullScreenControllerDelegate alloc] init]); 87 mockDelegate_.reset([[MockFullScreenControllerDelegate alloc] init]);
90 mockWebView_.reset([[UIView alloc] init]); 88 mockWebView_.reset([[UIView alloc] init]);
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 [controller_ webViewScrollViewDidEndDragging:webViewScrollViewProxy_ 369 [controller_ webViewScrollViewDidEndDragging:webViewScrollViewProxy_
372 willDecelerate:NO]; 370 willDecelerate:NO];
373 EXPECT_TRUE(IsHeaderVisible()); 371 EXPECT_TRUE(IsHeaderVisible());
374 372
375 // Hide the keyboard. 373 // Hide the keyboard.
376 [textField resignFirstResponder]; 374 [textField resignFirstResponder];
377 EXPECT_TRUE(IsHeaderVisible()); 375 EXPECT_TRUE(IsHeaderVisible());
378 } 376 }
379 377
380 } // namespace 378 } // namespace
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/fullscreen_controller.mm ('k') | ios/chrome/browser/ui/stack_view/stack_view_controller_perftest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698