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 #include <map> | 5 #include <map> |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 bool by_user) { | 185 bool by_user) { |
186 // For this test, this method should not be invoked. | 186 // For this test, this method should not be invoked. |
187 NOTREACHED(); | 187 NOTREACHED(); |
188 } | 188 } |
189 | 189 |
190 scoped_ptr<ui::MenuModel> MessageCenterViewTest::CreateMenuModel( | 190 scoped_ptr<ui::MenuModel> MessageCenterViewTest::CreateMenuModel( |
191 const NotifierId& notifier_id, | 191 const NotifierId& notifier_id, |
192 const base::string16& display_source) { | 192 const base::string16& display_source) { |
193 // For this test, this method should not be invoked. | 193 // For this test, this method should not be invoked. |
194 NOTREACHED(); | 194 NOTREACHED(); |
195 return scoped_ptr<ui::MenuModel>(); | 195 return nullptr; |
196 } | 196 } |
197 | 197 |
198 bool MessageCenterViewTest::HasClickedListener( | 198 bool MessageCenterViewTest::HasClickedListener( |
199 const std::string& notification_id) { | 199 const std::string& notification_id) { |
200 return true; | 200 return true; |
201 } | 201 } |
202 | 202 |
203 void MessageCenterViewTest::ClickOnNotificationButton( | 203 void MessageCenterViewTest::ClickOnNotificationButton( |
204 const std::string& notification_id, | 204 const std::string& notification_id, |
205 int button_index) { | 205 int button_index) { |
(...skipping 27 matching lines...) Expand all Loading... |
233 // GetHeightForWidth() calls per descendant NotificationView. 20 is a very | 233 // GetHeightForWidth() calls per descendant NotificationView. 20 is a very |
234 // large number corresponding to the current reality. That number will be | 234 // large number corresponding to the current reality. That number will be |
235 // ratcheted down over time as the code improves. | 235 // ratcheted down over time as the code improves. |
236 EXPECT_LE(GetCallCount(LAYOUT), GetNotificationCount() * 2); | 236 EXPECT_LE(GetCallCount(LAYOUT), GetNotificationCount() * 2); |
237 EXPECT_LE(GetCallCount(GET_PREFERRED_SIZE) + | 237 EXPECT_LE(GetCallCount(GET_PREFERRED_SIZE) + |
238 GetCallCount(GET_HEIGHT_FOR_WIDTH), | 238 GetCallCount(GET_HEIGHT_FOR_WIDTH), |
239 GetNotificationCount() * 20); | 239 GetNotificationCount() * 20); |
240 } | 240 } |
241 | 241 |
242 } // namespace message_center | 242 } // namespace message_center |
OLD | NEW |