1// Copyright 2014 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#include "ui/views/test/widget_test.h" 6 7#include "ui/aura/window.h" 8#include "ui/aura/window_tree_host.h" 9#include "ui/views/widget/widget.h" 10 11namespace views { 12namespace test { 13 14// static 15void WidgetTest::SimulateNativeDestroy(Widget* widget) { 16 delete widget->GetNativeView(); 17} 18 19// static 20bool WidgetTest::IsNativeWindowVisible(gfx::NativeWindow window) { 21 return window->IsVisible(); 22} 23 24// static 25ui::EventProcessor* WidgetTest::GetEventProcessor(Widget* widget) { 26 return widget->GetNativeWindow()->GetHost()->event_processor(); 27} 28 29} // namespace test 30} // namespace views 31