| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 <EarlGrey/EarlGrey.h> | 5 #import <EarlGrey/EarlGrey.h> |
| 6 #import <UIKit/UIKit.h> | 6 #import <UIKit/UIKit.h> |
| 7 #import <XCTest/XCTest.h> | 7 #import <XCTest/XCTest.h> |
| 8 | 8 |
| 9 #import "ios/chrome/test/app/tab_test_util.h" | 9 #import "ios/chrome/test/app/tab_test_util.h" |
| 10 #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h" | 10 #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h" |
| 11 #import "ios/chrome/test/earl_grey/chrome_matchers.h" | 11 #import "ios/chrome/test/earl_grey/chrome_matchers.h" |
| 12 #import "ios/chrome/test/earl_grey/chrome_test_case.h" | 12 #import "ios/chrome/test/earl_grey/chrome_test_case.h" |
| 13 | 13 |
| 14 // Test case to verify that EarlGrey tests can be launched and perform basic UI | 14 // Test case to verify that EarlGrey tests can be launched and perform basic UI |
| 15 // interactions. | 15 // interactions. |
| 16 @interface SmokeTestCase : ChromeTestCase | 16 @interface SmokeTestCase : ChromeTestCase |
| 17 @end | 17 @end |
| 18 | 18 |
| 19 @implementation SmokeTestCase | 19 @implementation SmokeTestCase |
| 20 | 20 |
| 21 // Tests that the tools menu is tappable. | 21 // Tests that the tools menu is tappable. |
| 22 - (void)testTapToolsMenu { | 22 - (void)testTapToolsMenu { |
| 23 [[EarlGrey selectElementWithMatcher:chrome_test_util::toolsMenuButton()] | 23 [[EarlGrey selectElementWithMatcher:chrome_test_util::ToolsMenuButton()] |
| 24 performAction:grey_tap()]; | 24 performAction:grey_tap()]; |
| 25 } | 25 } |
| 26 | 26 |
| 27 // Tests that a tab can be opened. | 27 // Tests that a tab can be opened. |
| 28 - (void)testOpenTab { | 28 - (void)testOpenTab { |
| 29 [ChromeEarlGreyUI openNewTab]; | 29 [ChromeEarlGreyUI openNewTab]; |
| 30 GREYAssertEqual(2, chrome_test_util::GetMainTabCount(), @"Expected 2 tabs."); | 30 GREYAssertEqual(2, chrome_test_util::GetMainTabCount(), @"Expected 2 tabs."); |
| 31 } | 31 } |
| 32 @end | 32 @end |
| OLD | NEW |