| Index: services/ui/ws/current_drag_operation_unittest.cc
|
| diff --git a/services/ui/ws/current_drag_operation_unittest.cc b/services/ui/ws/current_drag_operation_unittest.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..94cf170fc4b064db99be0581b11c1cea88481704
|
| --- /dev/null
|
| +++ b/services/ui/ws/current_drag_operation_unittest.cc
|
| @@ -0,0 +1,48 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "services/ui/ws/current_drag_operation_unittest.h"
|
| +
|
| +#include "services/ui/ws/test_server_window_delegate.h"
|
| +#include "testing/gtest/include/gtest/gtest.h"
|
| +
|
| +class TestCurrentDragOperationDelegate : public CurrentDragOperationDelegate {
|
| + public:
|
| + void OnDragOver(bool success) override { NOTIMPLEMENTED(); }
|
| +};
|
| +
|
| +class CurrentDragOperationTest : public testing::Test,
|
| + public CurrentDragOperationDelegate {
|
| + public:
|
| + // Overridden from testing::Test:
|
| + void SetUp() override {
|
| + testing::Test::SetUp();
|
| +
|
| + window_delegate_.reset(new TestServerWindowDelegate());
|
| + root_window_.reset(
|
| + new ServerWindow(window_delegate_.get(), WindowId(1, 2)));
|
| + window_delegate_->set_root_window(root_window_.get());
|
| + root_window_->SetVisible(true);
|
| +
|
| + // Big unresolved question here: If we have a ServerWindow, how do we get
|
| + // back to the WindowTree of the client who owns that ServerWindow? Almost
|
| + // everything about
|
| +
|
| + drag_operation_.reset(new CurrentDragOperation(this, ));
|
| + }
|
| +
|
| + // Overridden from CurrentDragOperationDelegate:
|
| + void OnDragOver(bool success) override { NOTIMPLEMENTED(); }
|
| +
|
| + std::unique_ptr<TestServerWindowDelegate> window_delegate_;
|
| + std::unique_ptr<ServerWindow> root_window_;
|
| +
|
| + std::unique_ptr<CurrentDragOperation> drag_operation_;
|
| +};
|
| +
|
| +TEST_F(CurrentDragOperation, DragPointerMove) {
|
| + // Set up a tree with two overlapping windows.
|
| + TestServerWindowDelegate window_delegate;
|
| + ServerWindow window(&window_delegate, WindowId(1, 1));
|
| +}
|
|
|