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 "base/strings/sys_string_conversions.h" | 8 #include "base/strings/sys_string_conversions.h" |
9 #include "components/metrics/metrics_pref_names.h" | 9 #include "components/metrics/metrics_pref_names.h" |
10 #include "components/metrics/metrics_reporting_default_state.h" | 10 #include "components/metrics/metrics_reporting_default_state.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 id<GREYMatcher> termsOfServiceLink = | 113 id<GREYMatcher> termsOfServiceLink = |
114 grey_accessibilityLabel(@"Terms of Service"); | 114 grey_accessibilityLabel(@"Terms of Service"); |
115 [[EarlGrey selectElementWithMatcher:termsOfServiceLink] | 115 [[EarlGrey selectElementWithMatcher:termsOfServiceLink] |
116 performAction:grey_tap()]; | 116 performAction:grey_tap()]; |
117 | 117 |
118 [[EarlGrey selectElementWithMatcher:grey_text(l10n_util::GetNSString( | 118 [[EarlGrey selectElementWithMatcher:grey_text(l10n_util::GetNSString( |
119 IDS_IOS_FIRSTRUN_TERMS_TITLE))] | 119 IDS_IOS_FIRSTRUN_TERMS_TITLE))] |
120 assertWithMatcher:grey_sufficientlyVisible()]; | 120 assertWithMatcher:grey_sufficientlyVisible()]; |
121 | 121 |
122 [[EarlGrey selectElementWithMatcher:grey_accessibilityID(@"back_bar_button")] | 122 [[EarlGrey selectElementWithMatcher:grey_accessibilityID(@"ic_arrow_back")] |
123 performAction:grey_tap()]; | 123 performAction:grey_tap()]; |
124 | 124 |
125 // Ensure we went back to the First Run screen. | 125 // Ensure we went back to the First Run screen. |
126 [[EarlGrey selectElementWithMatcher:termsOfServiceLink] | 126 [[EarlGrey selectElementWithMatcher:termsOfServiceLink] |
127 assertWithMatcher:grey_sufficientlyVisible()]; | 127 assertWithMatcher:grey_sufficientlyVisible()]; |
128 } | 128 } |
129 | 129 |
130 // Toggle the UMA checkbox. | 130 // Toggle the UMA checkbox. |
131 - (void)testToggleMetricsOn { | 131 - (void)testToggleMetricsOn { |
132 [chrome_test_util::GetMainController() showFirstRunUI]; | 132 [chrome_test_util::GetMainController() showFirstRunUI]; |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 @"Sync shouldn't have finished its original setup yet"); | 219 @"Sync shouldn't have finished its original setup yet"); |
220 | 220 |
221 // Close Settings, user is still signed in and sync is now starting. | 221 // Close Settings, user is still signed in and sync is now starting. |
222 TapButtonWithLabelId(IDS_IOS_NAVIGATION_BAR_DONE_BUTTON); | 222 TapButtonWithLabelId(IDS_IOS_NAVIGATION_BAR_DONE_BUTTON); |
223 AssertAuthenticatedIdentityInActiveProfile(identity); | 223 AssertAuthenticatedIdentityInActiveProfile(identity); |
224 GREYAssertTrue(sync_service->HasFinishedInitialSetup(), | 224 GREYAssertTrue(sync_service->HasFinishedInitialSetup(), |
225 @"Sync should have finished its original setup"); | 225 @"Sync should have finished its original setup"); |
226 } | 226 } |
227 | 227 |
228 @end | 228 @end |
OLD | NEW |