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

Side by Side Diff: ash/shelf/shelf_layout_manager_unittest.cc

Issue 2285633002: Add WM_EVENT_TRUSTED_PIN and WINDOW_STATE_TYPE_TRUSTED_PINNED to Ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 4 years, 3 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/metrics/user_metrics_recorder.cc ('k') | ash/wm/lock_window_state.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/common/shelf/shelf_layout_manager.h" 5 #include "ash/common/shelf/shelf_layout_manager.h"
6 6
7 #include "ash/aura/wm_shelf_aura.h" 7 #include "ash/aura/wm_shelf_aura.h"
8 #include "ash/aura/wm_window_aura.h" 8 #include "ash/aura/wm_window_aura.h"
9 #include "ash/common/accelerators/accelerator_controller.h" 9 #include "ash/common/accelerators/accelerator_controller.h"
10 #include "ash/common/accelerators/accelerator_table.h" 10 #include "ash/common/accelerators/accelerator_table.h"
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 // Test for Pinned mode. 1462 // Test for Pinned mode.
1463 TEST_F(ShelfLayoutManagerTest, PinnedWindowHidesShelf) { 1463 TEST_F(ShelfLayoutManagerTest, PinnedWindowHidesShelf) {
1464 WmShelf* shelf = GetPrimaryShelf(); 1464 WmShelf* shelf = GetPrimaryShelf();
1465 1465
1466 aura::Window* window1 = CreateTestWindow(); 1466 aura::Window* window1 = CreateTestWindow();
1467 window1->SetBounds(gfx::Rect(0, 0, 100, 100)); 1467 window1->SetBounds(gfx::Rect(0, 0, 100, 100));
1468 window1->Show(); 1468 window1->Show();
1469 1469
1470 EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState()); 1470 EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState());
1471 1471
1472 wm::PinWindow(window1); 1472 wm::PinWindow(window1, /* trusted */ false);
1473 EXPECT_EQ(SHELF_HIDDEN, shelf->GetVisibilityState()); 1473 EXPECT_EQ(SHELF_HIDDEN, shelf->GetVisibilityState());
1474 1474
1475 WmWindowAura::Get(window1)->GetWindowState()->Restore(); 1475 WmWindowAura::Get(window1)->GetWindowState()->Restore();
1476 EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState()); 1476 EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState());
1477 } 1477 }
1478 1478
1479 // Tests SHELF_ALIGNMENT_(LEFT, RIGHT). 1479 // Tests SHELF_ALIGNMENT_(LEFT, RIGHT).
1480 TEST_F(ShelfLayoutManagerTest, SetAlignment) { 1480 TEST_F(ShelfLayoutManagerTest, SetAlignment) {
1481 WmShelf* shelf = GetPrimaryShelf(); 1481 WmShelf* shelf = GetPrimaryShelf();
1482 ShelfLayoutManager* layout_manager = GetShelfLayoutManager(); 1482 ShelfLayoutManager* layout_manager = GetShelfLayoutManager();
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
2084 // Open keyboard in sticky mode. 2084 // Open keyboard in sticky mode.
2085 kb_controller->ShowKeyboard(true); 2085 kb_controller->ShowKeyboard(true);
2086 layout_manager->OnKeyboardBoundsChanging(keyboard_bounds()); 2086 layout_manager->OnKeyboardBoundsChanging(keyboard_bounds());
2087 2087
2088 // Work area should be changed. 2088 // Work area should be changed.
2089 EXPECT_NE(orig_work_area, 2089 EXPECT_NE(orig_work_area,
2090 display::Screen::GetScreen()->GetPrimaryDisplay().work_area()); 2090 display::Screen::GetScreen()->GetPrimaryDisplay().work_area());
2091 } 2091 }
2092 2092
2093 } // namespace ash 2093 } // namespace ash
OLDNEW
« no previous file with comments | « ash/metrics/user_metrics_recorder.cc ('k') | ash/wm/lock_window_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698