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

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

Issue 2927693002: mash: Limit ShelfWindowWatcher to panels and dialogs. (Closed)
Patch Set: Disable WindowSelectorTest.MultipleDisplays in mash. Created 3 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
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/wm/panels/panel_layout_manager.h" 5 #include "ash/wm/panels/panel_layout_manager.h"
6 6
7 #include "ash/public/cpp/config.h" 7 #include "ash/public/cpp/config.h"
8 #include "ash/public/cpp/shelf_model.h" 8 #include "ash/public/cpp/shelf_model.h"
9 #include "ash/public/cpp/shelf_types.h" 9 #include "ash/public/cpp/shelf_types.h"
10 #include "ash/public/cpp/shell_window_ids.h" 10 #include "ash/public/cpp/shell_window_ids.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 return CreateTestWindowInShellWithBounds(bounds); 83 return CreateTestWindowInShellWithBounds(bounds);
84 } 84 }
85 85
86 aura::Window* CreatePanelWindowWithDelegate(aura::WindowDelegate* delegate, 86 aura::Window* CreatePanelWindowWithDelegate(aura::WindowDelegate* delegate,
87 const gfx::Rect& bounds) { 87 const gfx::Rect& bounds) {
88 aura::Window* window = CreateTestWindowInShellWithDelegateAndType( 88 aura::Window* window = CreateTestWindowInShellWithDelegateAndType(
89 delegate, aura::client::WINDOW_TYPE_PANEL, 0, bounds); 89 delegate, aura::client::WINDOW_TYPE_PANEL, 0, bounds);
90 static int id = 0; 90 static int id = 0;
91 std::string shelf_id(ShelfID(base::IntToString(id++)).Serialize()); 91 std::string shelf_id(ShelfID(base::IntToString(id++)).Serialize());
92 window->SetProperty(kShelfIDKey, new std::string(shelf_id)); 92 window->SetProperty(kShelfIDKey, new std::string(shelf_id));
93 window->SetProperty<int>(kShelfItemTypeKey, TYPE_APP_PANEL);
93 shelf_view_test()->RunMessageLoopUntilAnimationsDone(); 94 shelf_view_test()->RunMessageLoopUntilAnimationsDone();
94 return window; 95 return window;
95 } 96 }
96 97
97 aura::Window* CreatePanelWindow(const gfx::Rect& bounds) { 98 aura::Window* CreatePanelWindow(const gfx::Rect& bounds) {
98 return CreatePanelWindowWithDelegate(nullptr, bounds); 99 return CreatePanelWindowWithDelegate(nullptr, bounds);
99 } 100 }
100 101
101 aura::Window* GetPanelContainer(aura::Window* panel) { 102 aura::Window* GetPanelContainer(aura::Window* panel) {
102 return Shell::GetContainer(panel->GetRootWindow(), 103 return Shell::GetContainer(panel->GetRootWindow(),
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 touch.set_location(gfx::Point(bounds.x() - 1, bounds.y() + 5)); 923 touch.set_location(gfx::Point(bounds.x() - 1, bounds.y() + 5));
923 target = targeter->FindTargetForEvent(root, &touch); 924 target = targeter->FindTargetForEvent(root, &touch);
924 EXPECT_NE(w.get(), target); 925 EXPECT_NE(w.get(), target);
925 } 926 }
926 927
927 INSTANTIATE_TEST_CASE_P(LtrRtl, 928 INSTANTIATE_TEST_CASE_P(LtrRtl,
928 PanelLayoutManagerTextDirectionTest, 929 PanelLayoutManagerTextDirectionTest,
929 testing::Bool()); 930 testing::Bool());
930 931
931 } // namespace ash 932 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698