| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/ui/cocoa/profiles/profile_signin_confirmation_view_contr
oller.h" | 5 #import "chrome/browser/ui/cocoa/profiles/profile_signin_confirmation_view_contr
oller.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include "base/mac/scoped_nsobject.h" | 9 #include "base/mac/scoped_nsobject.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 } | 158 } |
| 159 | 159 |
| 160 IN_PROC_BROWSER_TEST_F(ProfileSigninConfirmationViewControllerTest, | 160 IN_PROC_BROWSER_TEST_F(ProfileSigninConfirmationViewControllerTest, |
| 161 DoNotOfferNewProfile) { | 161 DoNotOfferNewProfile) { |
| 162 SetupDialog(/*offerProfileCreation = */ false); | 162 SetupDialog(/*offerProfileCreation = */ false); |
| 163 // Create Profile button shouldn't exist. | 163 // Create Profile button shouldn't exist. |
| 164 EXPECT_NSEQ(nil, [controller_ createProfileButton]); | 164 EXPECT_NSEQ(nil, [controller_ createProfileButton]); |
| 165 // Explanation shouldn't mention creating a new profile. | 165 // Explanation shouldn't mention creating a new profile. |
| 166 NSString* explanationWithoutCreateProfile = base::SysUTF16ToNSString( | 166 NSString* explanationWithoutCreateProfile = base::SysUTF16ToNSString( |
| 167 l10n_util::GetStringFUTF16( | 167 l10n_util::GetStringFUTF16( |
| 168 IDS_ENTERPRISE_SIGNIN_EXPLANATION_WITHOUT_PROFILE_CREATION_NEW_STYLE, | 168 IDS_ENTERPRISE_SIGNIN_EXPLANATION_WITHOUT_PROFILE_CREATION, |
| 169 base::UTF8ToUTF16(username()), learn_more())); | 169 base::UTF8ToUTF16(username()), learn_more())); |
| 170 EXPECT_NSEQ(explanationWithoutCreateProfile, | 170 EXPECT_NSEQ(explanationWithoutCreateProfile, |
| 171 [[[controller_ explanationField] textStorage] string]); | 171 [[[controller_ explanationField] textStorage] string]); |
| 172 } | 172 } |
| 173 | 173 |
| 174 IN_PROC_BROWSER_TEST_F(ProfileSigninConfirmationViewControllerTest, | 174 IN_PROC_BROWSER_TEST_F(ProfileSigninConfirmationViewControllerTest, |
| 175 OfferNewProfile) { | 175 OfferNewProfile) { |
| 176 SetupDialog(/*offerProfileCreation = */ true); | 176 SetupDialog(/*offerProfileCreation = */ true); |
| 177 // Create Profile button should exist and be visible. | 177 // Create Profile button should exist and be visible. |
| 178 EXPECT_NSNE(nil, [controller_ createProfileButton]); | 178 EXPECT_NSNE(nil, [controller_ createProfileButton]); |
| 179 EXPECT_TRUE([[[controller_ view] subviews] | 179 EXPECT_TRUE([[[controller_ view] subviews] |
| 180 containsObject:[controller_ createProfileButton]]); | 180 containsObject:[controller_ createProfileButton]]); |
| 181 NSString* explanationWithCreateProfile = base::SysUTF16ToNSString( | 181 NSString* explanationWithCreateProfile = base::SysUTF16ToNSString( |
| 182 l10n_util::GetStringFUTF16( | 182 l10n_util::GetStringFUTF16( |
| 183 IDS_ENTERPRISE_SIGNIN_EXPLANATION_WITH_PROFILE_CREATION_NEW_STYLE, | 183 IDS_ENTERPRISE_SIGNIN_EXPLANATION_WITH_PROFILE_CREATION, |
| 184 base::UTF8ToUTF16(username()), learn_more())); | 184 base::UTF8ToUTF16(username()), learn_more())); |
| 185 EXPECT_NSEQ(explanationWithCreateProfile, | 185 EXPECT_NSEQ(explanationWithCreateProfile, |
| 186 [[[controller_ explanationField] textStorage] string]); | 186 [[[controller_ explanationField] textStorage] string]); |
| 187 } | 187 } |
| OLD | NEW |