OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 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 "chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.h" |
| 6 |
| 7 #include <memory> |
| 8 #include <string> |
| 9 |
| 10 #include "base/command_line.h" |
| 11 #include "base/files/file_path.h" |
| 12 #include "base/memory/ptr_util.h" |
| 13 #include "base/message_loop/message_loop.h" |
| 14 #include "base/run_loop.h" |
| 15 #include "base/synchronization/waitable_event.h" |
| 16 #include "base/threading/simple_thread.h" |
| 17 #include "base/threading/thread.h" |
| 18 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/browser/ui/app_list/app_list_service_impl.h" |
| 20 #include "chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.h" |
| 21 #include "services/shell/background/background_shell.h" |
| 22 #include "services/shell/public/cpp/connector.h" |
| 23 #include "services/shell/public/cpp/service.h" |
| 24 #include "services/shell/public/cpp/service_context.h" |
| 25 // #include "services/ui/common/switches.h" |
| 26 #include "services/ui/public/cpp/tests/window_tree_client_private.h" |
| 27 #include "testing/gtest/include/gtest/gtest.h" |
| 28 #include "ui/app_list/app_list_switches.h" |
| 29 #include "ui/app_list/presenter/app_list_presenter_delegate_factory.h" |
| 30 #include "ui/app_list/presenter/app_list_presenter_impl.h" |
| 31 #include "ui/app_list/presenter/app_list_view_delegate_factory.h" |
| 32 #include "ui/app_list/presenter/test/app_list_presenter_impl_test_api.h" |
| 33 #include "ui/app_list/test/app_list_test_view_delegate.h" |
| 34 #include "ui/app_list/views/app_list_main_view.h" |
| 35 #include "ui/app_list/views/app_list_view.h" |
| 36 #include "ui/app_list/views/contents_view.h" |
| 37 #include "ui/events/event.h" |
| 38 #include "ui/events/test/test_event_handler.h" |
| 39 #include "ui/views/controls/native/native_view_host.h" |
| 40 #include "ui/views/mus/native_widget_mus.h" |
| 41 #include "ui/views/mus/views_mus_test_suite.h" |
| 42 #include "ui/views/mus/window_manager_connection.h" |
| 43 #include "ui/views/pointer_watcher.h" |
| 44 #include "ui/views/test/focus_manager_test.h" |
| 45 #include "ui/views/test/platform_test_helper.h" |
| 46 #include "ui/views/test/scoped_views_test_helper.h" |
| 47 #include "ui/views/test/views_test_base.h" |
| 48 #include "ui/views/views_delegate.h" |
| 49 #include "ui/views/views_test_suite.h" |
| 50 #include "ui/views/widget/widget.h" |
| 51 #include "ui/views/widget/widget_delegate.h" |
| 52 #include "ui/views/widget/widget_observer.h" |
| 53 #include "ui/wm/core/default_activation_client.h" |
| 54 #include "ui/wm/core/window_util.h" |
| 55 #include "ui/views/test/scoped_views_test_helper.h" |
| 56 #include "ui/views/views_delegate.h" |
| 57 |
| 58 namespace views { |
| 59 |
| 60 class TestWindowManagerConnection : public testing::Test { |
| 61 // class TestWindowManagerConnection : public ViewsTestBase { |
| 62 public: |
| 63 TestWindowManagerConnection() {} |
| 64 |
| 65 void SetUp() override { |
| 66 LOG(ERROR) << "\n\n\n Create SetUp TestWindowManagerConnection \n\n\n"; |
| 67 testing::Test::SetUp(); |
| 68 LOG(ERROR) << "\n\n\n End SetUp TestWindowManagerConnection \n\n\n"; |
| 69 } |
| 70 |
| 71 void TearDown() override { |
| 72 LOG(ERROR) << "\n\n\n Create TearDown TestWindowManagerConnection \n\n\n"; |
| 73 testing::Test::TearDown(); |
| 74 LOG(ERROR) |
| 75 << "\n\n\n End TearDown TestWindowManagerConnection SetUp \n\n\n"; |
| 76 } |
| 77 ~TestWindowManagerConnection() override {} |
| 78 |
| 79 // Creates a test widget. Takes ownership of |delegate|. |
| 80 // std::unique_ptr<Widget> CreateWidget(WidgetDelegate* delegate) { |
| 81 // std::unique_ptr<Widget> widget(new Widget()); |
| 82 // Widget::InitParams params = |
| 83 // CreateParams(Widget::InitParams::TYPE_WINDOW); |
| 84 // params.delegate = delegate; |
| 85 // params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
| 86 // params.bounds = initial_bounds(); |
| 87 // widget->Init(params); |
| 88 // return widget; |
| 89 // } |
| 90 |
| 91 private: |
| 92 DISALLOW_COPY_AND_ASSIGN(TestWindowManagerConnection); |
| 93 }; |
| 94 |
| 95 TEST_F(TestWindowManagerConnection, HideOnFocusOut) { |
| 96 base::MessageLoop message_loop(base::MessageLoop::TYPE_UI); |
| 97 ScopedViewsTestHelper helper; |
| 98 |
| 99 ASSERT_TRUE(WindowManagerConnection::Exists()); |
| 100 } |
| 101 } |
OLD | NEW |