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

Side by Side Diff: ios/chrome/test/earl_grey/smoke_egtest.mm

Issue 2580333003: Upstream Chrome on iOS source code [10/11]. (Closed)
Patch Set: Created 4 years 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
(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
OLDNEW
« no previous file with comments | « ios/chrome/test/earl_grey/shell_test.mm ('k') | ios/chrome/test/ocmock/OCMockObject+BreakpadControllerTesting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698