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

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

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/memory/ref_counted_memory.h" 8 #include "base/memory/ref_counted_memory.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 19 matching lines...) Expand all
30 MockTRS(Profile* profile) : PersistentTabRestoreService(profile, NULL) {} 30 MockTRS(Profile* profile) : PersistentTabRestoreService(profile, NULL) {}
31 MOCK_CONST_METHOD0(entries, const TabRestoreService::Entries&()); 31 MOCK_CONST_METHOD0(entries, const TabRestoreService::Entries&());
32 }; 32 };
33 33
34 class MockBridge : public HistoryMenuBridge { 34 class MockBridge : public HistoryMenuBridge {
35 public: 35 public:
36 MockBridge(Profile* profile) 36 MockBridge(Profile* profile)
37 : HistoryMenuBridge(profile), 37 : HistoryMenuBridge(profile),
38 menu_([[NSMenu alloc] initWithTitle:@"History"]) {} 38 menu_([[NSMenu alloc] initWithTitle:@"History"]) {}
39 39
40 virtual NSMenu* HistoryMenu() override { 40 NSMenu* HistoryMenu() override { return menu_.get(); }
41 return menu_.get();
42 }
43 41
44 private: 42 private:
45 base::scoped_nsobject<NSMenu> menu_; 43 base::scoped_nsobject<NSMenu> menu_;
46 }; 44 };
47 45
48 class HistoryMenuBridgeTest : public CocoaProfileTest { 46 class HistoryMenuBridgeTest : public CocoaProfileTest {
49 public: 47 public:
50 48
51 virtual void SetUp() { 49 virtual void SetUp() {
52 CocoaProfileTest::SetUp(); 50 CocoaProfileTest::SetUp();
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 image_result.image = gfx::Image::CreateFrom1xBitmap(bitmap); 348 image_result.image = gfx::Image::CreateFrom1xBitmap(bitmap);
351 GotFaviconData(&item, image_result); 349 GotFaviconData(&item, image_result);
352 350
353 // Make sure the callback works. 351 // Make sure the callback works.
354 EXPECT_FALSE(item.icon_requested); 352 EXPECT_FALSE(item.icon_requested);
355 EXPECT_TRUE(item.icon.get()); 353 EXPECT_TRUE(item.icon.get());
356 EXPECT_TRUE([item.menu_item image]); 354 EXPECT_TRUE([item.menu_item image]);
357 } 355 }
358 356
359 } // namespace 357 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698