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

Side by Side Diff: components/exo/shell_surface_unittest.cc

Issue 2645663004: exo: Initial support for multiple displays in ARC (Closed)
Patch Set: Address nits Created 3 years, 9 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 | « components/exo/shell_surface.cc ('k') | components/exo/wayland/server.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/exo/shell_surface.h" 5 #include "components/exo/shell_surface.h"
6 #include "ash/common/accessibility_delegate.h" 6 #include "ash/common/accessibility_delegate.h"
7 #include "ash/common/wm/window_state.h" 7 #include "ash/common/wm/window_state.h"
8 #include "ash/common/wm/wm_event.h" 8 #include "ash/common/wm/wm_event.h"
9 #include "ash/common/wm_shell.h" 9 #include "ash/common/wm_shell.h"
10 #include "ash/common/wm_window.h" 10 #include "ash/common/wm_window.h"
(...skipping 25 matching lines...) Expand all
36 namespace exo { 36 namespace exo {
37 namespace { 37 namespace {
38 38
39 using ShellSurfaceTest = test::ExoTestBase; 39 using ShellSurfaceTest = test::ExoTestBase;
40 40
41 uint32_t ConfigureFullscreen(uint32_t serial, 41 uint32_t ConfigureFullscreen(uint32_t serial,
42 const gfx::Size& size, 42 const gfx::Size& size,
43 ash::wm::WindowStateType state_type, 43 ash::wm::WindowStateType state_type,
44 bool resizing, 44 bool resizing,
45 bool activated, 45 bool activated,
46 const gfx::Point& origin) { 46 const gfx::Vector2d& origin_offset) {
47 EXPECT_EQ(ash::wm::WINDOW_STATE_TYPE_FULLSCREEN, state_type); 47 EXPECT_EQ(ash::wm::WINDOW_STATE_TYPE_FULLSCREEN, state_type);
48 return serial; 48 return serial;
49 } 49 }
50 50
51 wm::ShadowElevation GetShadowElevation(aura::Window* window) { 51 wm::ShadowElevation GetShadowElevation(aura::Window* window) {
52 return window->GetProperty(wm::kShadowElevationKey); 52 return window->GetProperty(wm::kShadowElevationKey);
53 } 53 }
54 54
55 TEST_F(ShellSurfaceTest, AcknowledgeConfigure) { 55 TEST_F(ShellSurfaceTest, AcknowledgeConfigure) {
56 gfx::Size buffer_size(32, 32); 56 gfx::Size buffer_size(32, 32);
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 } 363 }
364 364
365 uint32_t Configure(gfx::Size* suggested_size, 365 uint32_t Configure(gfx::Size* suggested_size,
366 ash::wm::WindowStateType* has_state_type, 366 ash::wm::WindowStateType* has_state_type,
367 bool* is_resizing, 367 bool* is_resizing,
368 bool* is_active, 368 bool* is_active,
369 const gfx::Size& size, 369 const gfx::Size& size,
370 ash::wm::WindowStateType state_type, 370 ash::wm::WindowStateType state_type,
371 bool resizing, 371 bool resizing,
372 bool activated, 372 bool activated,
373 const gfx::Point& origin) { 373 const gfx::Vector2d& origin_offset) {
374 *suggested_size = size; 374 *suggested_size = size;
375 *has_state_type = state_type; 375 *has_state_type = state_type;
376 *is_resizing = resizing; 376 *is_resizing = resizing;
377 *is_active = activated; 377 *is_active = activated;
378 return 0; 378 return 0;
379 } 379 }
380 380
381 TEST_F(ShellSurfaceTest, ConfigureCallback) { 381 TEST_F(ShellSurfaceTest, ConfigureCallback) {
382 std::unique_ptr<Surface> surface(new Surface); 382 std::unique_ptr<Surface> surface(new Surface);
383 std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get())); 383 std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get()));
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 shell_surface.OnAccessibilityModeChanged(); 972 shell_surface.OnAccessibilityModeChanged();
973 shell_surface2.OnAccessibilityModeChanged(); 973 shell_surface2.OnAccessibilityModeChanged();
974 974
975 EXPECT_TRUE(shell_surface.shadow_underlay()->IsVisible()); 975 EXPECT_TRUE(shell_surface.shadow_underlay()->IsVisible());
976 EXPECT_EQ(shadow_bounds, shell_surface.shadow_underlay()->bounds()); 976 EXPECT_EQ(shadow_bounds, shell_surface.shadow_underlay()->bounds());
977 EXPECT_EQ(shadow_bounds, shell_surface2.shadow_underlay()->bounds()); 977 EXPECT_EQ(shadow_bounds, shell_surface2.shadow_underlay()->bounds());
978 } 978 }
979 979
980 } // namespace 980 } // namespace
981 } // namespace exo 981 } // namespace exo
OLDNEW
« no previous file with comments | « components/exo/shell_surface.cc ('k') | components/exo/wayland/server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698