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

Side by Side Diff: ash/system/web_notification/web_notification_tray_unittest.cc

Issue 2193913002: Added Ash.SystemMenu.DefaultView.VisibleRows histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Merge remote-tracking branch 'refs/remotes/branch-heads/2785' into drover_2785 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/user/tray_user.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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 return GetTray()->message_center(); 63 return GetTray()->message_center();
64 } 64 }
65 65
66 SystemTray* GetSystemTray() { 66 SystemTray* GetSystemTray() {
67 return StatusAreaWidgetTestHelper::GetStatusAreaWidget()->system_tray(); 67 return StatusAreaWidgetTestHelper::GetStatusAreaWidget()->system_tray();
68 } 68 }
69 69
70 // Trivial item implementation for testing PopupAndSystemTray test case. 70 // Trivial item implementation for testing PopupAndSystemTray test case.
71 class TestItem : public SystemTrayItem { 71 class TestItem : public SystemTrayItem {
72 public: 72 public:
73 TestItem() : SystemTrayItem(GetSystemTray()) {} 73 TestItem() : SystemTrayItem(GetSystemTray(), UMA_TEST) {}
74 74
75 views::View* CreateDefaultView(LoginStatus status) override { 75 views::View* CreateDefaultView(LoginStatus status) override {
76 views::View* default_view = new views::View; 76 views::View* default_view = new views::View;
77 default_view->SetLayoutManager(new views::FillLayout); 77 default_view->SetLayoutManager(new views::FillLayout);
78 default_view->AddChildView(new views::Label(base::UTF8ToUTF16("Default"))); 78 default_view->AddChildView(new views::Label(base::UTF8ToUTF16("Default")));
79 return default_view; 79 return default_view;
80 } 80 }
81 81
82 views::View* CreateNotificationView(LoginStatus status) override { 82 views::View* CreateNotificationView(LoginStatus status) override {
83 return new views::View; 83 return new views::View;
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 ui::ET_TOUCH_RELEASED, out_of_bounds, touch_id, 533 ui::ET_TOUCH_RELEASED, out_of_bounds, touch_id,
534 move.time_stamp() + base::TimeDelta::FromMilliseconds(50)); 534 move.time_stamp() + base::TimeDelta::FromMilliseconds(50));
535 generator.Dispatch(&release); 535 generator.Dispatch(&release);
536 EXPECT_FALSE(tray->draw_background_as_active()); 536 EXPECT_FALSE(tray->draw_background_as_active());
537 EXPECT_FALSE(tray->IsMessageCenterBubbleVisible()); 537 EXPECT_FALSE(tray->IsMessageCenterBubbleVisible());
538 } 538 }
539 539
540 #endif // OS_CHROMEOS 540 #endif // OS_CHROMEOS
541 541
542 } // namespace ash 542 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/user/tray_user.cc ('k') | ash/test/test_system_tray_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698