| Index: components/exo/pointer_unittest.cc
|
| diff --git a/components/exo/pointer_unittest.cc b/components/exo/pointer_unittest.cc
|
| index 89a9b50a45f3c43e2963f60a14f315b869426a64..696d07435352c3bd16afbfaa4b2430af281e08c9 100644
|
| --- a/components/exo/pointer_unittest.cc
|
| +++ b/components/exo/pointer_unittest.cc
|
| @@ -8,6 +8,7 @@
|
| #include "ash/common/wm_shell.h"
|
| #include "ash/shell.h"
|
| #include "components/exo/buffer.h"
|
| +#include "components/exo/display.h"
|
| #include "components/exo/pointer.h"
|
| #include "components/exo/pointer_delegate.h"
|
| #include "components/exo/shell_surface.h"
|
| @@ -42,8 +43,10 @@ class MockPointerDelegate : public PointerDelegate {
|
| };
|
|
|
| TEST_F(PointerTest, SetCursor) {
|
| + const Display display;
|
| std::unique_ptr<Surface> surface(new Surface);
|
| - std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get()));
|
| + std::unique_ptr<ShellSurface> shell_surface(
|
| + new ShellSurface(display, surface.get()));
|
| gfx::Size buffer_size(10, 10);
|
| std::unique_ptr<Buffer> buffer(
|
| new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size)));
|
| @@ -80,8 +83,10 @@ TEST_F(PointerTest, SetCursor) {
|
| }
|
|
|
| TEST_F(PointerTest, OnPointerEnter) {
|
| + const Display display;
|
| std::unique_ptr<Surface> surface(new Surface);
|
| - std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get()));
|
| + std::unique_ptr<ShellSurface> shell_surface(
|
| + new ShellSurface(display, surface.get()));
|
| gfx::Size buffer_size(10, 10);
|
| std::unique_ptr<Buffer> buffer(
|
| new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size)));
|
| @@ -103,8 +108,10 @@ TEST_F(PointerTest, OnPointerEnter) {
|
| }
|
|
|
| TEST_F(PointerTest, OnPointerLeave) {
|
| + const Display display;
|
| std::unique_ptr<Surface> surface(new Surface);
|
| - std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get()));
|
| + std::unique_ptr<ShellSurface> shell_surface(
|
| + new ShellSurface(display, surface.get()));
|
| gfx::Size buffer_size(10, 10);
|
| std::unique_ptr<Buffer> buffer(
|
| new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size)));
|
| @@ -129,8 +136,10 @@ TEST_F(PointerTest, OnPointerLeave) {
|
| }
|
|
|
| TEST_F(PointerTest, OnPointerMotion) {
|
| + const Display display;
|
| std::unique_ptr<Surface> surface(new Surface);
|
| - std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get()));
|
| + std::unique_ptr<ShellSurface> shell_surface(
|
| + new ShellSurface(display, surface.get()));
|
| gfx::Size buffer_size(10, 10);
|
| std::unique_ptr<Buffer> buffer(
|
| new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size)));
|
| @@ -175,8 +184,8 @@ TEST_F(PointerTest, OnPointerMotion) {
|
|
|
| std::unique_ptr<Surface> child_surface(new Surface);
|
| std::unique_ptr<ShellSurface> child_shell_surface(new ShellSurface(
|
| - child_surface.get(), shell_surface.get(), gfx::Rect(9, 9, 1, 1), true,
|
| - ash::kShellWindowId_DefaultContainer));
|
| + display, child_surface.get(), shell_surface.get(), gfx::Rect(9, 9, 1, 1),
|
| + true, ash::kShellWindowId_DefaultContainer));
|
| gfx::Size child_buffer_size(15, 15);
|
| std::unique_ptr<Buffer> child_buffer(
|
| new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(child_buffer_size)));
|
| @@ -199,8 +208,10 @@ TEST_F(PointerTest, OnPointerMotion) {
|
| }
|
|
|
| TEST_F(PointerTest, OnPointerButton) {
|
| + const Display display;
|
| std::unique_ptr<Surface> surface(new Surface);
|
| - std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get()));
|
| + std::unique_ptr<ShellSurface> shell_surface(
|
| + new ShellSurface(display, surface.get()));
|
| gfx::Size buffer_size(10, 10);
|
| std::unique_ptr<Buffer> buffer(
|
| new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size)));
|
| @@ -229,8 +240,10 @@ TEST_F(PointerTest, OnPointerButton) {
|
| }
|
|
|
| TEST_F(PointerTest, OnPointerScroll) {
|
| + const Display display;
|
| std::unique_ptr<Surface> surface(new Surface);
|
| - std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get()));
|
| + std::unique_ptr<ShellSurface> shell_surface(
|
| + new ShellSurface(display, surface.get()));
|
| gfx::Size buffer_size(10, 10);
|
| std::unique_ptr<Buffer> buffer(
|
| new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size)));
|
| @@ -265,8 +278,10 @@ TEST_F(PointerTest, OnPointerScroll) {
|
| }
|
|
|
| TEST_F(PointerTest, OnPointerScrollDiscrete) {
|
| + const Display display;
|
| std::unique_ptr<Surface> surface(new Surface);
|
| - std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get()));
|
| + std::unique_ptr<ShellSurface> shell_surface(
|
| + new ShellSurface(display, surface.get()));
|
| gfx::Size buffer_size(10, 10);
|
| std::unique_ptr<Buffer> buffer(
|
| new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size)));
|
| @@ -293,8 +308,10 @@ TEST_F(PointerTest, OnPointerScrollDiscrete) {
|
| }
|
|
|
| TEST_F(PointerTest, IgnorePointerEventDuringModal) {
|
| + const Display display;
|
| std::unique_ptr<Surface> surface(new Surface);
|
| - std::unique_ptr<ShellSurface> shell_surface(new ShellSurface(surface.get()));
|
| + std::unique_ptr<ShellSurface> shell_surface(
|
| + new ShellSurface(display, surface.get()));
|
| std::unique_ptr<Buffer> buffer(
|
| new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(gfx::Size(10, 10))));
|
| surface->Attach(buffer.get());
|
| @@ -308,8 +325,8 @@ TEST_F(PointerTest, IgnorePointerEventDuringModal) {
|
| // Create surface for modal window.
|
| std::unique_ptr<Surface> surface2(new Surface);
|
| std::unique_ptr<ShellSurface> shell_surface2(
|
| - new ShellSurface(surface2.get(), nullptr, gfx::Rect(0, 0, 5, 5), true,
|
| - ash::kShellWindowId_SystemModalContainer));
|
| + new ShellSurface(display, surface2.get(), nullptr, gfx::Rect(0, 0, 5, 5),
|
| + true, ash::kShellWindowId_SystemModalContainer));
|
| std::unique_ptr<Buffer> buffer2(
|
| new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(gfx::Size(5, 5))));
|
| surface2->Attach(buffer2.get());
|
|
|