Index: ios/showcase/tab/sc_tab_egtest.mm |
diff --git a/ios/showcase/tab/sc_tab_egtest.mm b/ios/showcase/tab/sc_tab_egtest.mm |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c1ab075365431d781e220d5f1ddba0d375a33960 |
--- /dev/null |
+++ b/ios/showcase/tab/sc_tab_egtest.mm |
@@ -0,0 +1,37 @@ |
+// Copyright 2017 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 "ios/showcase/test/showcase_matchers.h" |
+#import "ios/showcase/test/showcase_test_case.h" |
+ |
+#if !defined(__has_feature) || !__has_feature(objc_arc) |
+#error "This file requires ARC support." |
+#endif |
+ |
+// Tests for the tab container view controller. |
+@interface SCTabTestCase : ShowcaseTestCase |
+@end |
+ |
+@implementation SCTabTestCase |
+ |
+// Tests launching TopToolbarTabViewController. |
+- (void)testLaunchWithTopToolbar { |
+ [[EarlGrey selectElementWithMatcher:grey_text(@"TopToolbarTabViewController")] |
+ performAction:grey_tap()]; |
+ [[EarlGrey selectElementWithMatcher:showcase_matchers::FirstLevelBackButton()] |
+ performAction:grey_tap()]; |
+} |
+ |
+// Tests launching BottomToolbarTabViewController. |
+- (void)testLaunchWithBottomToolbar { |
+ [[EarlGrey |
+ selectElementWithMatcher:grey_text(@"BottomToolbarTabViewController")] |
+ performAction:grey_tap()]; |
+ [[EarlGrey selectElementWithMatcher:showcase_matchers::FirstLevelBackButton()] |
+ performAction:grey_tap()]; |
+} |
+ |
+@end |