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

Side by Side Diff: ash/common/system/tray/tray_details_view_unittest.cc

Issue 2162153002: Added Ash.SystemMenu.DefaultView.VisibleItems histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed the COUNT value from the SystemMenuDefaultViewRows enum. Created 4 years, 5 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
« no previous file with comments | « ash/common/system/tray/system_tray_unittest.cc ('k') | ash/common/system/tray/tray_empty.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/common/system/tray/tray_details_view.h" 5 #include "ash/common/system/tray/tray_details_view.h"
6 6
7 #include "ash/common/system/tray/hover_highlight_view.h" 7 #include "ash/common/system/tray/hover_highlight_view.h"
8 #include "ash/common/system/tray/special_popup_row.h" 8 #include "ash/common/system/tray/special_popup_row.h"
9 #include "ash/common/system/tray/system_tray.h" 9 #include "ash/common/system/tray/system_tray.h"
10 #include "ash/common/system/tray/system_tray_item.h" 10 #include "ash/common/system/tray/system_tray_item.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 private: 58 private:
59 TrayPopupHeaderButton* tray_popup_header_button_; 59 TrayPopupHeaderButton* tray_popup_header_button_;
60 60
61 DISALLOW_COPY_AND_ASSIGN(TestDetailsView); 61 DISALLOW_COPY_AND_ASSIGN(TestDetailsView);
62 }; 62 };
63 63
64 // Trivial item implementation that tracks its views for testing. 64 // Trivial item implementation that tracks its views for testing.
65 class TestItem : public SystemTrayItem { 65 class TestItem : public SystemTrayItem {
66 public: 66 public:
67 TestItem() 67 TestItem()
68 : SystemTrayItem(AshTestBase::GetPrimarySystemTray()), 68 : SystemTrayItem(AshTestBase::GetPrimarySystemTray(), UMA_TEST),
69 tray_view_(nullptr), 69 tray_view_(nullptr),
70 default_view_(nullptr), 70 default_view_(nullptr),
71 detailed_view_(nullptr) {} 71 detailed_view_(nullptr) {}
72 72
73 // Overridden from SystemTrayItem: 73 // Overridden from SystemTrayItem:
74 views::View* CreateTrayView(LoginStatus status) override { 74 views::View* CreateTrayView(LoginStatus status) override {
75 tray_view_ = new views::View; 75 tray_view_ = new views::View;
76 return tray_view_; 76 return tray_view_;
77 } 77 }
78 views::View* CreateDefaultView(LoginStatus status) override { 78 views::View* CreateDefaultView(LoginStatus status) override {
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 gfx::Rect bounds = button->GetBoundsInScreen(); 264 gfx::Rect bounds = button->GetBoundsInScreen();
265 gfx::Point initial_point(bounds.x() - 1, bounds.y()); 265 gfx::Point initial_point(bounds.x() - 1, bounds.y());
266 generator.set_current_location(initial_point); 266 generator.set_current_location(initial_point);
267 generator.MoveMouseBy(1, 0); 267 generator.MoveMouseBy(1, 0);
268 RunAllPendingInMessageLoop(); 268 RunAllPendingInMessageLoop();
269 EXPECT_TRUE(button->background()); 269 EXPECT_TRUE(button->background());
270 } 270 }
271 271
272 } // namespace test 272 } // namespace test
273 } // namespace ash 273 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/system_tray_unittest.cc ('k') | ash/common/system/tray/tray_empty.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698