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