OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #import <EarlGrey/EarlGrey.h> |
| 6 #import <UIKit/UIKit.h> |
| 7 #import <XCTest/XCTest.h> |
| 8 |
| 9 #import "ios/chrome/app/main_application_delegate_testing.h" |
| 10 #import "ios/chrome/app/main_controller.h" |
| 11 #import "ios/chrome/app/main_controller_private.h" |
| 12 #import "ios/chrome/browser/ui/browser_view_controller.h" |
| 13 #include "ios/chrome/grit/ios_strings.h" |
| 14 #import "ios/chrome/test/earl_grey/chrome_test_case.h" |
| 15 #include "ui/base/l10n/l10n_util.h" |
| 16 |
| 17 @interface BrowserViewController (TabStripTest) |
| 18 - (int)currentTabModelCount; |
| 19 @end |
| 20 @implementation BrowserViewController (TabStripTest) |
| 21 - (int)currentTabModelCount { |
| 22 return [self tabModel].count; |
| 23 } |
| 24 @end |
| 25 |
| 26 @interface SmokeTestCase : ChromeTestCase |
| 27 @end |
| 28 |
| 29 @implementation SmokeTestCase |
| 30 |
| 31 // These aren't 'real' tests so please don't copy these. They are just to get |
| 32 // plumbing working for EG/XCTests. |
| 33 - (void)testTapToolsMenu { |
| 34 NSString* menu = l10n_util::GetNSString(IDS_IOS_TOOLBAR_SETTINGS); |
| 35 [[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(menu)] |
| 36 performAction:grey_tap()]; |
| 37 } |
| 38 |
| 39 - (void)testTabs { |
| 40 MainController* mainController = |
| 41 [MainApplicationDelegate sharedMainController]; |
| 42 BrowserViewController* bvc = |
| 43 [[mainController browserViewInformation] currentBVC]; |
| 44 XCTAssertEqual(1, [bvc currentTabModelCount]); |
| 45 } |
| 46 @end |
OLD | NEW |