| Index: components/exo/shell_surface_unittest.cc
|
| diff --git a/components/exo/shell_surface_unittest.cc b/components/exo/shell_surface_unittest.cc
|
| index 7c6ddaaf28d89ab40387a62515c7be23d5c5cfd3..0fd1595f8809aa922186b74064b18dfe9fa56d28 100644
|
| --- a/components/exo/shell_surface_unittest.cc
|
| +++ b/components/exo/shell_surface_unittest.cc
|
| @@ -41,7 +41,8 @@ uint32_t ConfigureFullscreen(uint32_t serial,
|
| const gfx::Size& size,
|
| ash::wm::WindowStateType state_type,
|
| bool resizing,
|
| - bool activated) {
|
| + bool activated,
|
| + const gfx::Point& origin) {
|
| EXPECT_EQ(ash::wm::WINDOW_STATE_TYPE_FULLSCREEN, state_type);
|
| return serial;
|
| }
|
| @@ -363,7 +364,8 @@ uint32_t Configure(gfx::Size* suggested_size,
|
| const gfx::Size& size,
|
| ash::wm::WindowStateType state_type,
|
| bool resizing,
|
| - bool activated) {
|
| + bool activated,
|
| + const gfx::Point& origin) {
|
| *suggested_size = size;
|
| *has_state_type = state_type;
|
| *is_resizing = resizing;
|
| @@ -418,9 +420,9 @@ TEST_F(ShellSurfaceTest, ConfigureCallback) {
|
|
|
| TEST_F(ShellSurfaceTest, ModalWindow) {
|
| std::unique_ptr<Surface> surface(new Surface);
|
| - std::unique_ptr<ShellSurface> shell_surface(
|
| - new ShellSurface(surface.get(), nullptr, gfx::Rect(), true, false,
|
| - ash::kShellWindowId_SystemModalContainer));
|
| + std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(
|
| + surface.get(), nullptr, ShellSurface::BoundsMode::SHELL, gfx::Point(),
|
| + true, false, ash::kShellWindowId_SystemModalContainer));
|
| gfx::Size desktop_size(640, 480);
|
| std::unique_ptr<Buffer> desktop_buffer(
|
| new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(desktop_size)));
|
| @@ -509,9 +511,9 @@ TEST_F(ShellSurfaceTest, Shadow) {
|
| std::unique_ptr<Buffer> buffer(
|
| new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size)));
|
| std::unique_ptr<Surface> surface(new Surface);
|
| - std::unique_ptr<ShellSurface> shell_surface(
|
| - new ShellSurface(surface.get(), nullptr, gfx::Rect(), true, false,
|
| - ash::kShellWindowId_DefaultContainer));
|
| + std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(
|
| + surface.get(), nullptr, ShellSurface::BoundsMode::SHELL, gfx::Point(),
|
| + true, false, ash::kShellWindowId_DefaultContainer));
|
| surface->Attach(buffer.get());
|
| surface->Commit();
|
|
|
| @@ -585,10 +587,9 @@ TEST_F(ShellSurfaceTest, ShadowWithStateChange) {
|
| std::unique_ptr<Buffer> buffer(
|
| new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size)));
|
| std::unique_ptr<Surface> surface(new Surface);
|
| - // Set the bounds to disable auto managed mode.
|
| - std::unique_ptr<ShellSurface> shell_surface(
|
| - new ShellSurface(surface.get(), nullptr, gfx::Rect(640, 480), true, false,
|
| - ash::kShellWindowId_DefaultContainer));
|
| + std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(
|
| + surface.get(), nullptr, ShellSurface::BoundsMode::CLIENT, gfx::Point(),
|
| + true, false, ash::kShellWindowId_DefaultContainer));
|
|
|
| // Postion the widget at 10,10 so that we get non zero offset.
|
| const gfx::Size content_size(100, 100);
|
| @@ -648,10 +649,9 @@ TEST_F(ShellSurfaceTest, ShadowWithTransform) {
|
| std::unique_ptr<Buffer> buffer(
|
| new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size)));
|
| std::unique_ptr<Surface> surface(new Surface);
|
| - // Set the bounds to disable auto managed mode.
|
| - std::unique_ptr<ShellSurface> shell_surface(
|
| - new ShellSurface(surface.get(), nullptr, gfx::Rect(640, 400), true, false,
|
| - ash::kShellWindowId_DefaultContainer));
|
| + std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(
|
| + surface.get(), nullptr, ShellSurface::BoundsMode::CLIENT, gfx::Point(),
|
| + true, false, ash::kShellWindowId_DefaultContainer));
|
|
|
| // Postion the widget at 10,10 so that we get non zero offset.
|
| const gfx::Size content_size(100, 100);
|
| @@ -679,9 +679,9 @@ TEST_F(ShellSurfaceTest, ShadowWithTransform) {
|
|
|
| TEST_F(ShellSurfaceTest, ShadowStartMaximized) {
|
| std::unique_ptr<Surface> surface(new Surface);
|
| - std::unique_ptr<ShellSurface> shell_surface(
|
| - new ShellSurface(surface.get(), nullptr, gfx::Rect(640, 480), true, false,
|
| - ash::kShellWindowId_DefaultContainer));
|
| + std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(
|
| + surface.get(), nullptr, ShellSurface::BoundsMode::CLIENT, gfx::Point(),
|
| + true, false, ash::kShellWindowId_DefaultContainer));
|
| shell_surface->Maximize();
|
| views::Widget* widget = shell_surface->GetWidget();
|
| aura::Window* window = widget->GetNativeWindow();
|
| @@ -748,9 +748,9 @@ TEST_F(ShellSurfaceTest, ImmersiveFullscreenBackground) {
|
| std::unique_ptr<Buffer> buffer(
|
| new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size)));
|
| std::unique_ptr<Surface> surface(new Surface);
|
| - std::unique_ptr<ShellSurface> shell_surface(
|
| - new ShellSurface(surface.get(), nullptr, gfx::Rect(640, 480), true, false,
|
| - ash::kShellWindowId_DefaultContainer));
|
| + std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(
|
| + surface.get(), nullptr, ShellSurface::BoundsMode::CLIENT, gfx::Point(),
|
| + true, false, ash::kShellWindowId_DefaultContainer));
|
|
|
| surface->Attach(buffer.get());
|
|
|
| @@ -784,8 +784,9 @@ TEST_F(ShellSurfaceTest, SpokenFeedbackFullscreenBackground) {
|
| gfx::Size buffer_size(256, 256);
|
| Buffer buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size));
|
| Surface surface;
|
| - ShellSurface shell_surface(&surface, nullptr, gfx::Rect(640, 480), true,
|
| - false, ash::kShellWindowId_DefaultContainer);
|
| + ShellSurface shell_surface(&surface, nullptr,
|
| + ShellSurface::BoundsMode::CLIENT, gfx::Point(),
|
| + true, false, ash::kShellWindowId_DefaultContainer);
|
|
|
| surface.Attach(&buffer);
|
|
|
| @@ -831,8 +832,9 @@ TEST_F(ShellSurfaceTest, SpokenFeedbackFullscreenBackground) {
|
| // Create a new surface
|
| Buffer buffer2(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size));
|
| Surface surface2;
|
| - ShellSurface shell_surface2(&surface2, nullptr, gfx::Rect(640, 480), true,
|
| - false, ash::kShellWindowId_DefaultContainer);
|
| + ShellSurface shell_surface2(
|
| + &surface2, nullptr, ShellSurface::BoundsMode::CLIENT, gfx::Point(), true,
|
| + false, ash::kShellWindowId_DefaultContainer);
|
| surface2.Attach(&buffer2);
|
| shell_surface2.SetRectangularShadow(true);
|
| shell_surface2.SetRectangularShadowContentBounds(shadow_bounds);
|
|
|