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

Side by Side Diff: ash/common/wm/workspace/workspace_layout_manager_unittest.cc

Issue 2778373004: Enables WorkspaceLayoutManagerSoloTest.PinnedSuspendsAlwaysOnTop for mash (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | 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/workspace/workspace_layout_manager.h" 5 #include "ash/common/wm/workspace/workspace_layout_manager.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "ash/common/session/session_controller.h" 10 #include "ash/common/session/session_controller.h"
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 // Making fullscreen window normal restores always on top windows. 751 // Making fullscreen window normal restores always on top windows.
752 fullscreen_window->SetShowState(ui::SHOW_STATE_NORMAL); 752 fullscreen_window->SetShowState(ui::SHOW_STATE_NORMAL);
753 EXPECT_TRUE(always_on_top_window1->IsAlwaysOnTop()); 753 EXPECT_TRUE(always_on_top_window1->IsAlwaysOnTop());
754 EXPECT_TRUE(always_on_top_window2->IsAlwaysOnTop()); 754 EXPECT_TRUE(always_on_top_window2->IsAlwaysOnTop());
755 EXPECT_TRUE(always_on_top_window3->IsAlwaysOnTop()); 755 EXPECT_TRUE(always_on_top_window3->IsAlwaysOnTop());
756 EXPECT_EQ(nullptr, wm::GetWindowForFullscreenMode(fullscreen_window)); 756 EXPECT_EQ(nullptr, wm::GetWindowForFullscreenMode(fullscreen_window));
757 } 757 }
758 758
759 // Similary, pinned window causes always_on_top_ windows to stack below. 759 // Similary, pinned window causes always_on_top_ windows to stack below.
760 TEST_F(WorkspaceLayoutManagerSoloTest, PinnedSuspendsAlwaysOnTop) { 760 TEST_F(WorkspaceLayoutManagerSoloTest, PinnedSuspendsAlwaysOnTop) {
761 // TODO: mash doesn't support pinning yet http://crbug.com/622486.
762 if (WmShell::Get()->IsRunningInMash())
763 return;
764
765 gfx::Rect bounds(100, 100, 200, 200); 761 gfx::Rect bounds(100, 100, 200, 200);
766 std::unique_ptr<aura::Window> pinned_window_owner( 762 std::unique_ptr<aura::Window> pinned_window_owner(
767 CreateTestWindowInShellWithBounds(bounds)); 763 CreateTestWindowInShellWithBounds(bounds));
768 WmWindow* pinned_window = WmWindow::Get(pinned_window_owner.get()); 764 WmWindow* pinned_window = WmWindow::Get(pinned_window_owner.get());
769 std::unique_ptr<aura::Window> always_on_top_window1_owner( 765 std::unique_ptr<aura::Window> always_on_top_window1_owner(
770 CreateTestWindowInShellWithBounds(bounds)); 766 CreateTestWindowInShellWithBounds(bounds));
771 WmWindow* always_on_top_window1 = 767 WmWindow* always_on_top_window1 =
772 WmWindow::Get(always_on_top_window1_owner.get()); 768 WmWindow::Get(always_on_top_window1_owner.get());
773 std::unique_ptr<aura::Window> always_on_top_window2_owner( 769 std::unique_ptr<aura::Window> always_on_top_window2_owner(
774 CreateTestWindowInShellWithBounds(bounds)); 770 CreateTestWindowInShellWithBounds(bounds));
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 window->SetBounds(keyboard_bounds()); 1275 window->SetBounds(keyboard_bounds());
1280 window->GetWindowState()->set_ignore_keyboard_bounds_change(true); 1276 window->GetWindowState()->set_ignore_keyboard_bounds_change(true);
1281 window->Activate(); 1277 window->Activate();
1282 1278
1283 EXPECT_EQ(keyboard_bounds(), window->GetBounds()); 1279 EXPECT_EQ(keyboard_bounds(), window->GetBounds());
1284 ShowKeyboard(); 1280 ShowKeyboard();
1285 EXPECT_EQ(keyboard_bounds(), window->GetBounds()); 1281 EXPECT_EQ(keyboard_bounds(), window->GetBounds());
1286 } 1282 }
1287 1283
1288 } // namespace ash 1284 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698