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

Unified Diff: ios/showcase/tab/sc_tab_egtest.mm

Issue 2764063002: Add TabContainer to Showcase (Closed)
Patch Set: Other heuristic for back button Created 3 years, 9 months 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/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
« no previous file with comments | « ios/showcase/tab/sc_bottom_toolbar_tab_coordinator.mm ('k') | ios/showcase/tab/sc_top_toolbar_tab_coordinator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698