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

Side by Side Diff: ui/message_center/views/message_center_view_unittest.cc

Issue 855023003: Add presubmit check for scoped_ptr usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 years, 11 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
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 #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
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
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
OLDNEW
« no previous file with comments | « ui/message_center/message_center_impl.cc ('k') | ui/message_center/views/notification_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698