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

Side by Side Diff: ash/system/web_notification/web_notification_tray_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, 4 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/system/chromeos/tray_display.cc ('k') | ash/test/test_system_tray_item.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 (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 #include "ash/common/system/web_notification/web_notification_tray.h" 5 #include "ash/common/system/web_notification/web_notification_tray.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/common/shelf/wm_shelf.h" 10 #include "ash/common/shelf/wm_shelf.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 return GetTray()->message_center(); 62 return GetTray()->message_center();
63 } 63 }
64 64
65 SystemTray* GetSystemTray() { 65 SystemTray* GetSystemTray() {
66 return StatusAreaWidgetTestHelper::GetStatusAreaWidget()->system_tray(); 66 return StatusAreaWidgetTestHelper::GetStatusAreaWidget()->system_tray();
67 } 67 }
68 68
69 // Trivial item implementation for testing PopupAndSystemTray test case. 69 // Trivial item implementation for testing PopupAndSystemTray test case.
70 class TestItem : public SystemTrayItem { 70 class TestItem : public SystemTrayItem {
71 public: 71 public:
72 TestItem() : SystemTrayItem(GetSystemTray()) {} 72 TestItem() : SystemTrayItem(GetSystemTray(), UMA_TEST) {}
73 73
74 views::View* CreateDefaultView(LoginStatus status) override { 74 views::View* CreateDefaultView(LoginStatus status) override {
75 views::View* default_view = new views::View; 75 views::View* default_view = new views::View;
76 default_view->SetLayoutManager(new views::FillLayout); 76 default_view->SetLayoutManager(new views::FillLayout);
77 default_view->AddChildView(new views::Label(base::UTF8ToUTF16("Default"))); 77 default_view->AddChildView(new views::Label(base::UTF8ToUTF16("Default")));
78 return default_view; 78 return default_view;
79 } 79 }
80 80
81 views::View* CreateNotificationView(LoginStatus status) override { 81 views::View* CreateNotificationView(LoginStatus status) override {
82 return new views::View; 82 return new views::View;
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 ui::ET_TOUCH_RELEASED, out_of_bounds, touch_id, 522 ui::ET_TOUCH_RELEASED, out_of_bounds, touch_id,
523 move.time_stamp() + base::TimeDelta::FromMilliseconds(50)); 523 move.time_stamp() + base::TimeDelta::FromMilliseconds(50));
524 generator.Dispatch(&release); 524 generator.Dispatch(&release);
525 EXPECT_FALSE(tray->draw_background_as_active()); 525 EXPECT_FALSE(tray->draw_background_as_active());
526 EXPECT_FALSE(tray->IsMessageCenterBubbleVisible()); 526 EXPECT_FALSE(tray->IsMessageCenterBubbleVisible());
527 } 527 }
528 528
529 #endif // OS_CHROMEOS 529 #endif // OS_CHROMEOS
530 530
531 } // namespace ash 531 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/chromeos/tray_display.cc ('k') | ash/test/test_system_tray_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698