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

Side by Side Diff: ash/wm/panels/panel_layout_manager_unittest.cc

Issue 2243563002: Show small notification icons in notification tray (reland) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/shelf/shelf_view_unittest.cc ('k') | no next file » | 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/wm/panels/panel_layout_manager.h" 5 #include "ash/common/wm/panels/panel_layout_manager.h"
6 6
7 #include "ash/aura/wm_window_aura.h" 7 #include "ash/aura/wm_window_aura.h"
8 #include "ash/common/ash_switches.h" 8 #include "ash/common/ash_switches.h"
9 #include "ash/common/shelf/shelf_button.h" 9 #include "ash/common/shelf/shelf_button.h"
10 #include "ash/common/shelf/shelf_model.h" 10 #include "ash/common/shelf/shelf_model.h"
11 #include "ash/common/shelf/shelf_types.h" 11 #include "ash/common/shelf/shelf_types.h"
12 #include "ash/common/shelf/shelf_view.h" 12 #include "ash/common/shelf/shelf_view.h"
13 #include "ash/common/shell_window_ids.h" 13 #include "ash/common/shell_window_ids.h"
14 #include "ash/common/system/web_notification/web_notification_tray.h"
14 #include "ash/common/wm/mru_window_tracker.h" 15 #include "ash/common/wm/mru_window_tracker.h"
15 #include "ash/common/wm/window_state.h" 16 #include "ash/common/wm/window_state.h"
16 #include "ash/common/wm_shell.h" 17 #include "ash/common/wm_shell.h"
17 #include "ash/screen_util.h" 18 #include "ash/screen_util.h"
18 #include "ash/shelf/shelf.h" 19 #include "ash/shelf/shelf.h"
19 #include "ash/shelf/shelf_layout_manager.h" 20 #include "ash/shelf/shelf_layout_manager.h"
20 #include "ash/shelf/shelf_util.h" 21 #include "ash/shelf/shelf_util.h"
21 #include "ash/shelf/shelf_widget.h" 22 #include "ash/shelf/shelf_widget.h"
22 #include "ash/shell.h" 23 #include "ash/shell.h"
23 #include "ash/test/ash_test_base.h" 24 #include "ash/test/ash_test_base.h"
(...skipping 23 matching lines...) Expand all
47 PanelLayoutManagerTest() {} 48 PanelLayoutManagerTest() {}
48 ~PanelLayoutManagerTest() override {} 49 ~PanelLayoutManagerTest() override {}
49 50
50 void SetUp() override { 51 void SetUp() override {
51 test::AshTestBase::SetUp(); 52 test::AshTestBase::SetUp();
52 ASSERT_TRUE(test::TestShelfDelegate::instance()); 53 ASSERT_TRUE(test::TestShelfDelegate::instance());
53 54
54 shelf_view_test_.reset( 55 shelf_view_test_.reset(
55 new test::ShelfViewTestAPI(GetShelfView(Shelf::ForPrimaryDisplay()))); 56 new test::ShelfViewTestAPI(GetShelfView(Shelf::ForPrimaryDisplay())));
56 shelf_view_test_->SetAnimationDuration(1); 57 shelf_view_test_->SetAnimationDuration(1);
58
59 WebNotificationTray::DisableAnimationsForTest(true);
60 }
61
62 void TearDown() override {
63 test::AshTestBase::TearDown();
64
65 WebNotificationTray::DisableAnimationsForTest(false); // Reenable animation
57 } 66 }
58 67
59 aura::Window* CreateNormalWindow(const gfx::Rect& bounds) { 68 aura::Window* CreateNormalWindow(const gfx::Rect& bounds) {
60 return CreateTestWindowInShellWithBounds(bounds); 69 return CreateTestWindowInShellWithBounds(bounds);
61 } 70 }
62 71
63 aura::Window* CreatePanelWindowWithDelegate(aura::WindowDelegate* delegate, 72 aura::Window* CreatePanelWindowWithDelegate(aura::WindowDelegate* delegate,
64 const gfx::Rect& bounds) { 73 const gfx::Rect& bounds) {
65 aura::Window* window = CreateTestWindowInShellWithDelegateAndType( 74 aura::Window* window = CreateTestWindowInShellWithDelegateAndType(
66 delegate, ui::wm::WINDOW_TYPE_PANEL, 0, bounds); 75 delegate, ui::wm::WINDOW_TYPE_PANEL, 0, bounds);
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 touch.set_location(gfx::Point(bounds.x() - 1, bounds.y() + 5)); 816 touch.set_location(gfx::Point(bounds.x() - 1, bounds.y() + 5));
808 target = targeter->FindTargetForEvent(root, &touch); 817 target = targeter->FindTargetForEvent(root, &touch);
809 EXPECT_NE(w.get(), target); 818 EXPECT_NE(w.get(), target);
810 } 819 }
811 820
812 INSTANTIATE_TEST_CASE_P(LtrRtl, 821 INSTANTIATE_TEST_CASE_P(LtrRtl,
813 PanelLayoutManagerTextDirectionTest, 822 PanelLayoutManagerTextDirectionTest,
814 testing::Bool()); 823 testing::Bool());
815 824
816 } // namespace ash 825 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_view_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698