OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "ui/message_center/cocoa/settings_controller.h" | 5 #import "ui/message_center/cocoa/settings_controller.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #import "ui/gfx/test/ui_cocoa_test_helper.h" | 8 #import "ui/gfx/test/ui_cocoa_test_helper.h" |
9 #include "ui/message_center/fake_notifier_settings_provider.h" | 9 #include "ui/message_center/fake_notifier_settings_provider.h" |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 namespace message_center { | 30 namespace message_center { |
31 | 31 |
32 using ui::CocoaTest; | 32 using ui::CocoaTest; |
33 | 33 |
34 namespace { | 34 namespace { |
35 | 35 |
36 NotifierGroup* NewGroup(const std::string& name, | 36 NotifierGroup* NewGroup(const std::string& name, |
37 const std::string& login_info) { | 37 const std::string& login_info) { |
38 return new NotifierGroup(gfx::Image(), | 38 return new NotifierGroup(gfx::Image(), |
39 base::UTF8ToUTF16(name), | 39 base::UTF8ToUTF16(name), |
40 base::UTF8ToUTF16(login_info), | 40 base::UTF8ToUTF16(login_info)); |
41 true); | |
42 } | 41 } |
43 | 42 |
44 Notifier* NewNotifier(const std::string& id, | 43 Notifier* NewNotifier(const std::string& id, |
45 const std::string& title, | 44 const std::string& title, |
46 bool enabled) { | 45 bool enabled) { |
47 NotifierId notifier_id(NotifierId::APPLICATION, id); | 46 NotifierId notifier_id(NotifierId::APPLICATION, id); |
48 return new Notifier(notifier_id, base::UTF8ToUTF16(title), enabled); | 47 return new Notifier(notifier_id, base::UTF8ToUTF16(title), enabled); |
49 } | 48 } |
50 | 49 |
51 } // namespace | 50 } // namespace |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 [[MCSettingsController alloc] initWithProvider:&provider | 143 [[MCSettingsController alloc] initWithProvider:&provider |
145 trayViewController:nil]); | 144 trayViewController:nil]); |
146 [controller view]; | 145 [controller view]; |
147 | 146 |
148 [[controller bottomMostButton] clickLearnMore]; | 147 [[controller bottomMostButton] clickLearnMore]; |
149 | 148 |
150 EXPECT_EQ(1u, provider.settings_requested_count()); | 149 EXPECT_EQ(1u, provider.settings_requested_count()); |
151 } | 150 } |
152 | 151 |
153 } // namespace message_center | 152 } // namespace message_center |
OLD | NEW |