Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller_browsertest.mm

Issue 17593006: mac: Update clients of scoped_nsobject.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: iwyu, scoped_nsprotocol Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/memory/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"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/sync/profile_signin_confirmation_helper.h" 13 #include "chrome/browser/ui/sync/profile_signin_confirmation_helper.h"
14 #include "chrome/test/base/in_process_browser_test.h" 14 #include "chrome/test/base/in_process_browser_test.h"
15 #include "grit/chromium_strings.h" 15 #include "grit/chromium_strings.h"
16 #include "grit/generated_resources.h" 16 #include "grit/generated_resources.h"
17 #import "testing/gtest_mac.h" 17 #import "testing/gtest_mac.h"
18 #include "ui/base/l10n/l10n_util.h" 18 #include "ui/base/l10n/l10n_util.h"
19 19
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 IDS_ENTERPRISE_SIGNIN_PROFILE_LINK_LEARN_MORE); 62 IDS_ENTERPRISE_SIGNIN_PROFILE_LINK_LEARN_MORE);
63 } 63 }
64 64
65 // ui::ProfileSigninConfirmationDelegate: 65 // ui::ProfileSigninConfirmationDelegate:
66 virtual void OnContinueSignin() OVERRIDE { continued_ = true; } 66 virtual void OnContinueSignin() OVERRIDE { continued_ = true; }
67 virtual void OnCancelSignin() OVERRIDE { cancelled_ = true; } 67 virtual void OnCancelSignin() OVERRIDE { cancelled_ = true; }
68 virtual void OnSigninWithNewProfile() OVERRIDE { created_ = true; } 68 virtual void OnSigninWithNewProfile() OVERRIDE { created_ = true; }
69 void OnClose() { closed_ = true; } 69 void OnClose() { closed_ = true; }
70 70
71 // The window containing the dialog. 71 // The window containing the dialog.
72 scoped_nsobject<NSWindow> window_; 72 base::scoped_nsobject<NSWindow> window_;
73 73
74 // Dialog under test. 74 // Dialog under test.
75 scoped_nsobject<ProfileSigninConfirmationViewController> controller_; 75 base::scoped_nsobject<ProfileSigninConfirmationViewController> controller_;
76 76
77 // Visible for testing UI interactions. 77 // Visible for testing UI interactions.
78 bool continued_; 78 bool continued_;
79 bool cancelled_; 79 bool cancelled_;
80 bool created_; 80 bool created_;
81 bool closed_; 81 bool closed_;
82 82
83 private: 83 private:
84 DISALLOW_COPY_AND_ASSIGN(ProfileSigninConfirmationViewControllerTest); 84 DISALLOW_COPY_AND_ASSIGN(ProfileSigninConfirmationViewControllerTest);
85 }; 85 };
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 UTF8ToUTF16(username()), learn_more()));
184 EXPECT_NSEQ(explanationWithCreateProfile, 184 EXPECT_NSEQ(explanationWithCreateProfile,
185 [[[controller_ explanationField] textStorage] string]); 185 [[[controller_ explanationField] textStorage] string]);
186 } 186 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698