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

Unified Diff: components/exo/keyboard_unittest.cc

Issue 2396883003: exo: Fix dragging edge cases (Closed)
Patch Set: Fix unit tests Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: components/exo/keyboard_unittest.cc
diff --git a/components/exo/keyboard_unittest.cc b/components/exo/keyboard_unittest.cc
index c82c7c6190c1a67b585ce0faef6d4bc180b25192..b7f3111522330935a649ee9f0bc2c355f90755e6 100644
--- a/components/exo/keyboard_unittest.cc
+++ b/components/exo/keyboard_unittest.cc
@@ -5,6 +5,7 @@
#include "ash/shell.h"
#include "base/macros.h"
#include "components/exo/buffer.h"
+#include "components/exo/display.h"
#include "components/exo/keyboard.h"
#include "components/exo/keyboard_delegate.h"
#include "components/exo/shell_surface.h"
@@ -36,8 +37,10 @@ class MockKeyboardDelegate : public KeyboardDelegate {
};
TEST_F(KeyboardTest, OnKeyboardEnter) {
+ 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)));
@@ -77,8 +80,10 @@ TEST_F(KeyboardTest, OnKeyboardEnter) {
}
TEST_F(KeyboardTest, OnKeyboardLeave) {
+ 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)));
@@ -107,8 +112,10 @@ TEST_F(KeyboardTest, OnKeyboardLeave) {
}
TEST_F(KeyboardTest, OnKeyboardKey) {
+ 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)));
@@ -146,8 +153,10 @@ TEST_F(KeyboardTest, OnKeyboardKey) {
}
TEST_F(KeyboardTest, OnKeyboardModifiers) {
+ 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)));

Powered by Google App Engine
This is Rietveld 408576698