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

Side by Side Diff: chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac_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 "chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.h" 5 #import "chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" 10 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
(...skipping 15 matching lines...) Expand all
26 26
27 void SetResultCount(size_t count) { 27 void SetResultCount(size_t count) {
28 ACMatches matches; 28 ACMatches matches;
29 for (size_t i = 0; i < count; ++i) 29 for (size_t i = 0; i < count; ++i)
30 matches.push_back(AutocompleteMatch()); 30 matches.push_back(AutocompleteMatch());
31 result_.Reset(); 31 result_.Reset();
32 result_.AppendMatches(matches); 32 result_.AppendMatches(matches);
33 } 33 }
34 34
35 protected: 35 protected:
36 virtual const AutocompleteResult& GetResult() const override { 36 const AutocompleteResult& GetResult() const override { return result_; }
37 return result_;
38 }
39 37
40 private: 38 private:
41 AutocompleteResult result_; 39 AutocompleteResult result_;
42 }; 40 };
43 41
44 class OmniboxPopupViewMacTest : public CocoaProfileTest { 42 class OmniboxPopupViewMacTest : public CocoaProfileTest {
45 public: 43 public:
46 OmniboxPopupViewMacTest() {} 44 OmniboxPopupViewMacTest() {}
47 45
48 private: 46 private:
(...skipping 23 matching lines...) Expand all
72 EXPECT_GT(popup_view.GetTargetBounds().height(), old_height); 70 EXPECT_GT(popup_view.GetTargetBounds().height(), old_height);
73 EXPECT_EQ(5, [popup_view.matrix() numberOfRows]); 71 EXPECT_EQ(5, [popup_view.matrix() numberOfRows]);
74 72
75 popup_view.SetResultCount(0); 73 popup_view.SetResultCount(0);
76 popup_view.UpdatePopupAppearance(); 74 popup_view.UpdatePopupAppearance();
77 EXPECT_FALSE(popup_view.IsOpen()); 75 EXPECT_FALSE(popup_view.IsOpen());
78 EXPECT_EQ(0, [popup_view.matrix() numberOfRows]); 76 EXPECT_EQ(0, [popup_view.matrix() numberOfRows]);
79 } 77 }
80 78
81 } // namespace 79 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698