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

Unified Diff: ui/views/test/widget_test_aura.cc

Issue 322893005: MacViews: Add WidgetEventGenerator to abstract platform-specific event generation for tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cull orthogonal stuff, add WidgetTest.MouseEventTypesViaGenerator Created 6 years, 6 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: ui/views/test/widget_test_aura.cc
diff --git a/ui/views/test/widget_test_aura.cc b/ui/views/test/widget_test_aura.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b4aae5267b872fa0d8965503a58f245e02c90fcf
--- /dev/null
+++ b/ui/views/test/widget_test_aura.cc
@@ -0,0 +1,25 @@
+// Copyright 2014 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 "ui/views/test/widget_test.h"
+
+#include "ui/aura/window.h"
+#include "ui/aura/window_tree_host.h"
+#include "ui/views/widget/widget.h"
+
+namespace views {
+namespace test {
+
+// static
+bool WidgetTest::IsNativeWindowVisible(gfx::NativeWindow window) {
+ return window->IsVisible();
+}
+
+// static
+ui::EventProcessor* WidgetTest::GetEventProcessor(Widget* widget) {
+ return widget->GetNativeWindow()->GetHost()->event_processor();
+}
+
+} // namespace test
+} // namespace views

Powered by Google App Engine
This is Rietveld 408576698