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 <EarlGrey/EarlGrey.h> | 5 #import <EarlGrey/EarlGrey.h> |
6 #import <XCTest/XCTest.h> | 6 #import <XCTest/XCTest.h> |
7 | 7 |
8 #include "components/strings/grit/components_strings.h" | 8 #include "components/strings/grit/components_strings.h" |
9 #import "ios/chrome/browser/ui/commands/generic_chrome_command.h" | 9 #import "ios/chrome/browser/ui/commands/generic_chrome_command.h" |
10 #include "ios/chrome/browser/ui/commands/ios_command_ids.h" | 10 #include "ios/chrome/browser/ui/commands/ios_command_ids.h" |
11 #import "ios/chrome/browser/ui/ntp/new_tab_page_controller.h" | 11 #import "ios/chrome/browser/ui/ntp/new_tab_page_controller.h" |
12 #include "ios/chrome/browser/ui/ui_util.h" | 12 #include "ios/chrome/browser/ui/ui_util.h" |
13 #include "ios/chrome/grit/ios_strings.h" | 13 #include "ios/chrome/grit/ios_strings.h" |
14 #import "ios/chrome/test/app/chrome_test_util.h" | 14 #import "ios/chrome/test/app/chrome_test_util.h" |
15 #import "ios/chrome/test/app/tab_test_util.h" | 15 #import "ios/chrome/test/app/tab_test_util.h" |
16 #import "ios/chrome/test/earl_grey/accessibility_util.h" | 16 #import "ios/chrome/test/earl_grey/accessibility_util.h" |
17 #import "ios/chrome/test/earl_grey/chrome_matchers.h" | 17 #import "ios/chrome/test/earl_grey/chrome_matchers.h" |
18 #import "ios/chrome/test/earl_grey/chrome_test_case.h" | 18 #import "ios/chrome/test/earl_grey/chrome_test_case.h" |
19 #import "ios/testing/earl_grey/disabled_test_macros.h" | |
20 #import "ios/testing/wait_util.h" | 19 #import "ios/testing/wait_util.h" |
21 #include "ui/base/l10n/l10n_util.h" | 20 #include "ui/base/l10n/l10n_util.h" |
22 | 21 |
23 #if !defined(__has_feature) || !__has_feature(objc_arc) | 22 #if !defined(__has_feature) || !__has_feature(objc_arc) |
24 #error "This file requires ARC support." | 23 #error "This file requires ARC support." |
25 #endif | 24 #endif |
26 | 25 |
27 @implementation NewTabPageController (ExposedForTesting) | 26 @implementation NewTabPageController (ExposedForTesting) |
28 - (GoogleLandingController*)googleLandingController { | 27 - (GoogleLandingController*)googleLandingController { |
29 return googleLandingController_; | 28 return googleLandingController_; |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 AssertNTPScrolledToTop(YES); | 303 AssertNTPScrolledToTop(YES); |
305 | 304 |
306 // Check that tab switcher and tools menu buttons are not on screen. | 305 // Check that tab switcher and tools menu buttons are not on screen. |
307 [[EarlGrey selectElementWithMatcher:chrome_test_util::ShowTabsButton()] | 306 [[EarlGrey selectElementWithMatcher:chrome_test_util::ShowTabsButton()] |
308 assertWithMatcher:grey_notVisible()]; | 307 assertWithMatcher:grey_notVisible()]; |
309 [[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(toolsMenuLabel)] | 308 [[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(toolsMenuLabel)] |
310 assertWithMatcher:grey_notVisible()]; | 309 assertWithMatcher:grey_notVisible()]; |
311 } | 310 } |
312 | 311 |
313 @end | 312 @end |
OLD | NEW |