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

Unified Diff: ui/views/mus/platform_window_mus_unittest.cc

Issue 1979573002: Move mus::InputEventHandler implementation and tests from PlatformWindowMus to NativeWidgetMus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@native_widget_mus5
Patch Set: Delete no longer necessary views in platform_widget_mus_unittests Created 4 years, 7 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
« ui/views/mus/platform_window_mus.cc ('K') | « ui/views/mus/platform_window_mus.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/platform_window_mus_unittest.cc
diff --git a/ui/views/mus/platform_window_mus_unittest.cc b/ui/views/mus/platform_window_mus_unittest.cc
index e4d5a7b91feef2f4c20e41e971a2138b04716936..8c53a4a4619181a66e7a22703346d34f68d8dadd 100644
--- a/ui/views/mus/platform_window_mus_unittest.cc
+++ b/ui/views/mus/platform_window_mus_unittest.cc
@@ -22,40 +22,6 @@
using mus::mojom::EventResult;
namespace views {
-namespace {
-
-// A view that reports any mouse press as handled.
-class HandleMousePressView : public View {
- public:
- HandleMousePressView() {}
- ~HandleMousePressView() override {}
-
- // View:
- bool OnMousePressed(const ui::MouseEvent& event) override { return true; }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(HandleMousePressView);
-};
-
-// A view that deletes a widget on mouse press.
-class DeleteWidgetView : public View {
- public:
- explicit DeleteWidgetView(std::unique_ptr<Widget>* widget_ptr)
- : widget_ptr_(widget_ptr) {}
- ~DeleteWidgetView() override {}
-
- // View:
- bool OnMousePressed(const ui::MouseEvent& event) override {
- widget_ptr_->reset();
- return true;
- }
-
- private:
- std::unique_ptr<Widget>* widget_ptr_;
- DISALLOW_COPY_AND_ASSIGN(DeleteWidgetView);
-};
-
-} // namespace
class PlatformWindowMusTest : public ViewsTestBase {
public:
@@ -91,15 +57,6 @@ class PlatformWindowMusTest : public ViewsTestBase {
base::TimeDelta(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON));
}
- // Simulates an input event to the PlatformWindow.
- void OnWindowInputEvent(
- const ui::Event& event,
- std::unique_ptr<base::Callback<void(mus::mojom::EventResult)>>*
- ack_callback) {
- platform_window_->OnWindowInputEvent(native_widget_->window(), event,
- ack_callback);
- }
-
protected:
std::unique_ptr<Widget> widget_;
@@ -111,6 +68,9 @@ class PlatformWindowMusTest : public ViewsTestBase {
DISALLOW_COPY_AND_ASSIGN(PlatformWindowMusTest);
};
+// TODO(markdittmer): Port these tests to native_widget_mus.
+#if 0
+
sadrul 2016/05/13 17:02:44 This should be fixed?
Mark Dittmer 2016/05/16 15:58:43 I was going to move tests in another CL. Actually,
// Tests that an incoming UI event is acked with the handled status.
TEST_F(PlatformWindowMusTest, EventAcked) {
View* content = new HandleMousePressView;
@@ -151,4 +111,6 @@ TEST_F(PlatformWindowMusTest, EventAckedWithWindowDestruction) {
EXPECT_EQ(1, ack_callback_count());
}
+#endif // #if 0
+
} // namespace views
« ui/views/mus/platform_window_mus.cc ('K') | « ui/views/mus/platform_window_mus.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698