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

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

Issue 2041233005: Moves ash::user::LoginStatus to ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 4 years, 6 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/web_notification/web_notification_tray.cc ('k') | ash/sysui/sysui_application.cc » ('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/system/web_notification/web_notification_tray.h" 5 #include "ash/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/shell_window_ids.h" 10 #include "ash/common/shell_window_ids.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 SystemTray* GetSystemTray() { 68 SystemTray* GetSystemTray() {
69 return StatusAreaWidgetTestHelper::GetStatusAreaWidget()->system_tray(); 69 return StatusAreaWidgetTestHelper::GetStatusAreaWidget()->system_tray();
70 } 70 }
71 71
72 // Trivial item implementation for testing PopupAndSystemTray test case. 72 // Trivial item implementation for testing PopupAndSystemTray test case.
73 class TestItem : public SystemTrayItem { 73 class TestItem : public SystemTrayItem {
74 public: 74 public:
75 TestItem() : SystemTrayItem(GetSystemTray()) {} 75 TestItem() : SystemTrayItem(GetSystemTray()) {}
76 76
77 views::View* CreateDefaultView(user::LoginStatus status) override { 77 views::View* CreateDefaultView(LoginStatus status) override {
78 views::View* default_view = new views::View; 78 views::View* default_view = new views::View;
79 default_view->SetLayoutManager(new views::FillLayout); 79 default_view->SetLayoutManager(new views::FillLayout);
80 default_view->AddChildView(new views::Label(base::UTF8ToUTF16("Default"))); 80 default_view->AddChildView(new views::Label(base::UTF8ToUTF16("Default")));
81 return default_view; 81 return default_view;
82 } 82 }
83 83
84 views::View* CreateNotificationView(user::LoginStatus status) override { 84 views::View* CreateNotificationView(LoginStatus status) override {
85 return new views::View; 85 return new views::View;
86 } 86 }
87 87
88 private: 88 private:
89 DISALLOW_COPY_AND_ASSIGN(TestItem); 89 DISALLOW_COPY_AND_ASSIGN(TestItem);
90 }; 90 };
91 91
92 } // namespace 92 } // namespace
93 93
94 class WebNotificationTrayTest : public test::AshTestBase { 94 class WebNotificationTrayTest : public test::AshTestBase {
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 ui::TouchEvent release(ui::ET_TOUCH_RELEASED, out_of_bounds, touch_id, 540 ui::TouchEvent release(ui::ET_TOUCH_RELEASED, out_of_bounds, touch_id,
541 move.time_stamp()+base::TimeDelta::FromMilliseconds(50)); 541 move.time_stamp()+base::TimeDelta::FromMilliseconds(50));
542 generator.Dispatch(&release); 542 generator.Dispatch(&release);
543 EXPECT_FALSE(tray->draw_background_as_active()); 543 EXPECT_FALSE(tray->draw_background_as_active());
544 EXPECT_FALSE(tray->IsMessageCenterBubbleVisible()); 544 EXPECT_FALSE(tray->IsMessageCenterBubbleVisible());
545 } 545 }
546 546
547 #endif // OS_CHROMEOS 547 #endif // OS_CHROMEOS
548 548
549 } // namespace ash 549 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/web_notification/web_notification_tray.cc ('k') | ash/sysui/sysui_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698