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

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

Issue 334573008: MacViews: Encapsulate some Aura specifics in widget_unittest.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile 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..1b2dd139fc10fc2c06caee0c9f3b0847fcfd0462
--- /dev/null
+++ b/ui/views/test/widget_test_aura.cc
@@ -0,0 +1,30 @@
+// 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
+void WidgetTest::SimulateNativeDestroy(Widget* widget) {
+ delete widget->GetNativeView();
+}
+
+// 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