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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/test/earl_grey/smoke_egtest.mm
diff --git a/ios/chrome/test/earl_grey/smoke_egtest.mm b/ios/chrome/test/earl_grey/smoke_egtest.mm
new file mode 100644
index 0000000000000000000000000000000000000000..bb62090f1ab87fda0d425abee54c6851b6d854e6
--- /dev/null
+++ b/ios/chrome/test/earl_grey/smoke_egtest.mm
@@ -0,0 +1,46 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import <EarlGrey/EarlGrey.h>
+#import <UIKit/UIKit.h>
+#import <XCTest/XCTest.h>
+
+#import "ios/chrome/app/main_application_delegate_testing.h"
+#import "ios/chrome/app/main_controller.h"
+#import "ios/chrome/app/main_controller_private.h"
+#import "ios/chrome/browser/ui/browser_view_controller.h"
+#include "ios/chrome/grit/ios_strings.h"
+#import "ios/chrome/test/earl_grey/chrome_test_case.h"
+#include "ui/base/l10n/l10n_util.h"
+
+@interface BrowserViewController (TabStripTest)
+- (int)currentTabModelCount;
+@end
+@implementation BrowserViewController (TabStripTest)
+- (int)currentTabModelCount {
+ return [self tabModel].count;
+}
+@end
+
+@interface SmokeTestCase : ChromeTestCase
+@end
+
+@implementation SmokeTestCase
+
+// These aren't 'real' tests so please don't copy these. They are just to get
+// plumbing working for EG/XCTests.
+- (void)testTapToolsMenu {
+ NSString* menu = l10n_util::GetNSString(IDS_IOS_TOOLBAR_SETTINGS);
+ [[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(menu)]
+ performAction:grey_tap()];
+}
+
+- (void)testTabs {
+ MainController* mainController =
+ [MainApplicationDelegate sharedMainController];
+ BrowserViewController* bvc =
+ [[mainController browserViewInformation] currentBVC];
+ XCTAssertEqual(1, [bvc currentTabModelCount]);
+}
+@end
« 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