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

Unified Diff: services/ui/ws/current_drag_operation_unittest.cc

Issue 2266603002: mus: Implement interwindow drag and drop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Uploaded for a few comments. Created 4 years, 4 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: 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));
+}

Powered by Google App Engine
This is Rietveld 408576698