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

Side by Side Diff: ios/chrome/browser/ui/tab_switcher/tab_switcher_controller_egtest.mm

Issue 2660143002: Removing iPad Tab Switcher experimental flag. (Closed)
Patch Set: Rebased. Created 3 years, 10 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 unified diff | Download patch
OLDNEW
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 #include "base/test/scoped_command_line.h"
10 #import "ios/chrome/app/main_controller_private.h" 9 #import "ios/chrome/app/main_controller_private.h"
11 #include "ios/chrome/browser/chrome_switches.h" 10 #include "ios/chrome/browser/chrome_switches.h"
12 #import "ios/chrome/browser/ui/commands/generic_chrome_command.h" 11 #import "ios/chrome/browser/ui/commands/generic_chrome_command.h"
13 #include "ios/chrome/browser/ui/commands/ios_command_ids.h" 12 #include "ios/chrome/browser/ui/commands/ios_command_ids.h"
14 #import "ios/chrome/browser/ui/tools_menu/tools_menu_view_controller.h" 13 #import "ios/chrome/browser/ui/tools_menu/tools_menu_view_controller.h"
15 #import "ios/chrome/browser/ui/ui_util.h" 14 #import "ios/chrome/browser/ui/ui_util.h"
16 #include "ios/chrome/grit/ios_strings.h" 15 #include "ios/chrome/grit/ios_strings.h"
17 #import "ios/chrome/test/app/chrome_test_util.h" 16 #import "ios/chrome/test/app/chrome_test_util.h"
18 #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h" 17 #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h"
19 #import "ios/chrome/test/earl_grey/chrome_matchers.h" 18 #import "ios/chrome/test/earl_grey/chrome_matchers.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 GenericChromeCommand* command = 78 GenericChromeCommand* command =
80 [[GenericChromeCommand alloc] initWithTag:IDC_TOGGLE_TAB_SWITCHER]; 79 [[GenericChromeCommand alloc] initWithTag:IDC_TOGGLE_TAB_SWITCHER];
81 chrome_test_util::RunCommandWithActiveViewController(command); 80 chrome_test_util::RunCommandWithActiveViewController(command);
82 } 81 }
83 82
84 } // namespace 83 } // namespace
85 84
86 @interface TabSwitcherControllerTestCase : ChromeTestCase 85 @interface TabSwitcherControllerTestCase : ChromeTestCase
87 @end 86 @end
88 87
89 @implementation TabSwitcherControllerTestCase { 88 @implementation TabSwitcherControllerTestCase
90 std::unique_ptr<base::test::ScopedCommandLine> scoped_command_line_;
91 }
92
93 - (void)setUp {
94 [super setUp];
95 scoped_command_line_.reset(new base::test::ScopedCommandLine());
96 scoped_command_line_->GetProcessCommandLine()->AppendSwitch(
97 switches::kEnableTabSwitcher);
98 }
99 89
100 // Checks that the tab switcher is not presented. 90 // Checks that the tab switcher is not presented.
101 - (void)assertTabSwitcherIsInactive { 91 - (void)assertTabSwitcherIsInactive {
102 [[GREYUIThreadExecutor sharedInstance] drainUntilIdle]; 92 [[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
103 MainController* main_controller = chrome_test_util::GetMainController(); 93 MainController* main_controller = chrome_test_util::GetMainController();
104 GREYAssertTrue(![main_controller isTabSwitcherActive], 94 GREYAssertTrue(![main_controller isTabSwitcherActive],
105 @"Tab Switcher should be inactive"); 95 @"Tab Switcher should be inactive");
106 } 96 }
107 97
108 // Checks that the tab switcher is active. 98 // Checks that the tab switcher is active.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 205
216 // Press the :: icon to exit the tab switcher. 206 // Press the :: icon to exit the tab switcher.
217 [[EarlGrey selectElementWithMatcher:TabSwitcherCloseButton()] 207 [[EarlGrey selectElementWithMatcher:TabSwitcherCloseButton()]
218 performAction:grey_tap()]; 208 performAction:grey_tap()];
219 209
220 // Verify that we've left the tab switcher. 210 // Verify that we've left the tab switcher.
221 [self assertTabSwitcherIsInactive]; 211 [self assertTabSwitcherIsInactive];
222 } 212 }
223 213
224 @end 214 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/no_tabs/no_tabs_toolbar_controller.mm ('k') | ios/chrome/browser/ui/tabs/tab_strip_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698