| OLD | NEW |
| 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 <XCTest/XCTest.h> | 5 #import <XCTest/XCTest.h> |
| 6 | 6 |
| 7 #include "base/ios/block_types.h" | 7 #include "base/ios/block_types.h" |
| 8 #include "base/mac/foundation_util.h" | 8 #include "base/mac/foundation_util.h" |
| 9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
| 10 #import "base/test/ios/wait_util.h" | 10 #import "base/test/ios/wait_util.h" |
| 11 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" | 11 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
| 12 #include "ios/chrome/browser/pref_names.h" | 12 #include "ios/chrome/browser/pref_names.h" |
| 13 #import "ios/chrome/browser/tabs/tab.h" | 13 #import "ios/chrome/browser/tabs/tab.h" |
| 14 #import "ios/chrome/browser/tabs/tab_model.h" | 14 #import "ios/chrome/browser/tabs/tab_model.h" |
| 15 #import "ios/chrome/browser/ui/browser_view_controller.h" | 15 #import "ios/chrome/browser/ui/browser_view_controller.h" |
| 16 #import "ios/chrome/browser/ui/stack_view/card_view.h" | 16 #import "ios/chrome/browser/ui/stack_view/card_view.h" |
| 17 #import "ios/chrome/browser/ui/stack_view/stack_view_controller.h" | 17 #import "ios/chrome/browser/ui/stack_view/stack_view_controller.h" |
| 18 #import "ios/chrome/browser/ui/stack_view/stack_view_controller_private.h" | 18 #import "ios/chrome/browser/ui/stack_view/stack_view_controller_private.h" |
| 19 #import "ios/chrome/browser/ui/toolbar/toolbar_controller.h" | 19 #import "ios/chrome/browser/ui/toolbar/toolbar_controller.h" |
| 20 #include "ios/chrome/browser/ui/tools_menu/tools_menu_constants.h" | 20 #include "ios/chrome/browser/ui/tools_menu/tools_menu_constants.h" |
| 21 #import "ios/chrome/test/app/stack_view_test_util.h" | 21 #import "ios/chrome/test/app/stack_view_test_util.h" |
| 22 #import "ios/chrome/test/app/tab_test_util.h" | 22 #import "ios/chrome/test/app/tab_test_util.h" |
| 23 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" | 23 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" |
| 24 #import "ios/chrome/test/earl_grey/chrome_matchers.h" | 24 #import "ios/chrome/test/earl_grey/chrome_matchers.h" |
| 25 #import "ios/chrome/test/earl_grey/chrome_test_case.h" | 25 #import "ios/chrome/test/earl_grey/chrome_test_case.h" |
| 26 #include "ios/testing/earl_grey/disabled_test_macros.h" | |
| 27 #import "ios/testing/wait_util.h" | 26 #import "ios/testing/wait_util.h" |
| 28 | 27 |
| 29 #if !defined(__has_feature) || !__has_feature(objc_arc) | 28 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 30 #error "This file requires ARC support." | 29 #error "This file requires ARC support." |
| 31 #endif | 30 #endif |
| 32 | 31 |
| 33 namespace { | 32 namespace { |
| 34 // Returns a GREYMatcher that matches |view|. | 33 // Returns a GREYMatcher that matches |view|. |
| 35 // TODO(crbug.com/642619): Evaluate whether this should be shared code. | 34 // TODO(crbug.com/642619): Evaluate whether this should be shared code. |
| 36 id<GREYMatcher> ViewMatchingView(UIView* view) { | 35 id<GREYMatcher> ViewMatchingView(UIView* view) { |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 chrome_test_util::GetStackViewController(); | 271 chrome_test_util::GetStackViewController(); |
| 273 GREYAssert([stackViewController isCurrentSetIncognito], | 272 GREYAssert([stackViewController isCurrentSetIncognito], |
| 274 @"Incognito deck not selected."); | 273 @"Incognito deck not selected."); |
| 275 // Switch back to the main CardSet and verify that is selected. | 274 // Switch back to the main CardSet and verify that is selected. |
| 276 ShowDeckWithType(DeckType::NORMAL); | 275 ShowDeckWithType(DeckType::NORMAL); |
| 277 GREYAssert(![stackViewController isCurrentSetIncognito], | 276 GREYAssert(![stackViewController isCurrentSetIncognito], |
| 278 @"Normal deck not selected."); | 277 @"Normal deck not selected."); |
| 279 } | 278 } |
| 280 | 279 |
| 281 @end | 280 @end |
| OLD | NEW |