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

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

Issue 251193004: Animate the OverviewButtonTray (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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 #include "ash/system/web_notification/web_notification_tray.h" 5 #include "ash/system/web_notification/web_notification_tray.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/display/display_manager.h" 9 #include "ash/display/display_manager.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
11 #include "ash/shelf/shelf_layout_manager.h" 11 #include "ash/shelf/shelf_layout_manager.h"
12 #include "ash/shelf/shelf_widget.h" 12 #include "ash/shelf/shelf_widget.h"
13 #include "ash/shell.h" 13 #include "ash/shell.h"
14 #include "ash/system/status_area_widget.h" 14 #include "ash/system/status_area_widget.h"
15 #include "ash/system/tray/system_tray.h" 15 #include "ash/system/tray/system_tray.h"
16 #include "ash/system/tray/system_tray_item.h" 16 #include "ash/system/tray/system_tray_item.h"
17 #include "ash/system/tray/tray_background_view.h"
17 #include "ash/test/ash_test_base.h" 18 #include "ash/test/ash_test_base.h"
18 #include "ash/test/status_area_widget_test_helper.h" 19 #include "ash/test/status_area_widget_test_helper.h"
19 #include "ash/test/test_system_tray_delegate.h" 20 #include "ash/test/test_system_tray_delegate.h"
20 #include "ash/wm/window_state.h" 21 #include "ash/wm/window_state.h"
21 #include "base/strings/stringprintf.h" 22 #include "base/strings/stringprintf.h"
22 #include "base/strings/utf_string_conversions.h" 23 #include "base/strings/utf_string_conversions.h"
23 #include "ui/aura/client/aura_constants.h" 24 #include "ui/aura/client/aura_constants.h"
24 #include "ui/aura/test/event_generator.h" 25 #include "ui/aura/test/event_generator.h"
25 #include "ui/aura/window.h" 26 #include "ui/aura/window.h"
26 #include "ui/gfx/display.h" 27 #include "ui/gfx/display.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 DISALLOW_COPY_AND_ASSIGN(TestItem); 84 DISALLOW_COPY_AND_ASSIGN(TestItem);
84 }; 85 };
85 86
86 } // namespace 87 } // namespace
87 88
88 class WebNotificationTrayTest : public test::AshTestBase { 89 class WebNotificationTrayTest : public test::AshTestBase {
89 public: 90 public:
90 WebNotificationTrayTest() {} 91 WebNotificationTrayTest() {}
91 virtual ~WebNotificationTrayTest() {} 92 virtual ~WebNotificationTrayTest() {}
92 93
94 virtual void SetUp() OVERRIDE {
95 TrayBackgroundView::DisableAnimationsForTest();
96 test::AshTestBase::SetUp();
97 }
98
93 virtual void TearDown() OVERRIDE { 99 virtual void TearDown() OVERRIDE {
94 GetMessageCenter()->RemoveAllNotifications(false); 100 GetMessageCenter()->RemoveAllNotifications(false);
95 test::AshTestBase::TearDown(); 101 test::AshTestBase::TearDown();
96 } 102 }
97 103
98 protected: 104 protected:
99 void AddNotification(const std::string& id) { 105 void AddNotification(const std::string& id) {
100 scoped_ptr<message_center::Notification> notification; 106 scoped_ptr<message_center::Notification> notification;
101 notification.reset(new message_center::Notification( 107 notification.reset(new message_center::Notification(
102 message_center::NOTIFICATION_TYPE_SIMPLE, 108 message_center::NOTIFICATION_TYPE_SIMPLE,
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 476
471 // System tray is created on the primary display. The popups in the secondary 477 // System tray is created on the primary display. The popups in the secondary
472 // tray aren't affected. 478 // tray aren't affected.
473 GetSystemTray()->ShowDefaultView(BUBBLE_CREATE_NEW); 479 GetSystemTray()->ShowDefaultView(BUBBLE_CREATE_NEW);
474 EXPECT_GT(work_area.size().GetArea(), GetPopupWorkArea().size().GetArea()); 480 EXPECT_GT(work_area.size().GetArea(), GetPopupWorkArea().size().GetArea());
475 EXPECT_EQ(work_area_second.ToString(), 481 EXPECT_EQ(work_area_second.ToString(),
476 GetPopupWorkAreaForTray(GetSecondaryTray()).ToString()); 482 GetPopupWorkAreaForTray(GetSecondaryTray()).ToString());
477 } 483 }
478 484
479 } // namespace ash 485 } // namespace ash
OLDNEW
« ash/system/tray/tray_background_view.cc ('K') | « ash/system/tray/tray_background_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698