OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "third_party/mojo_services/src/view_manager/public/cpp/view_manager.h" | 5 #include "third_party/mojo_services/src/view_manager/public/cpp/view_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
13 #include "base/test/test_timeouts.h" | 13 #include "base/test/test_timeouts.h" |
| 14 #include "mojo/application/application_test_base_chromium.h" |
14 #include "mojo/public/cpp/application/application_connection.h" | 15 #include "mojo/public/cpp/application/application_connection.h" |
15 #include "mojo/public/cpp/application/application_delegate.h" | 16 #include "mojo/public/cpp/application/application_delegate.h" |
16 #include "mojo/public/cpp/application/application_impl.h" | 17 #include "mojo/public/cpp/application/application_impl.h" |
17 #include "mojo/public/cpp/application/application_test_base.h" | |
18 #include "mojo/public/cpp/application/service_provider_impl.h" | 18 #include "mojo/public/cpp/application/service_provider_impl.h" |
19 #include "third_party/mojo_services/src/geometry/public/cpp/geometry_util.h" | 19 #include "third_party/mojo_services/src/geometry/public/cpp/geometry_util.h" |
20 #include "third_party/mojo_services/src/view_manager/public/cpp/lib/view_manager
_client_impl.h" | 20 #include "third_party/mojo_services/src/view_manager/public/cpp/lib/view_manager
_client_impl.h" |
21 #include "third_party/mojo_services/src/view_manager/public/cpp/view_manager_cli
ent_factory.h" | 21 #include "third_party/mojo_services/src/view_manager/public/cpp/view_manager_cli
ent_factory.h" |
22 #include "third_party/mojo_services/src/view_manager/public/cpp/view_manager_con
text.h" | 22 #include "third_party/mojo_services/src/view_manager/public/cpp/view_manager_con
text.h" |
23 #include "third_party/mojo_services/src/view_manager/public/cpp/view_manager_del
egate.h" | 23 #include "third_party/mojo_services/src/view_manager/public/cpp/view_manager_del
egate.h" |
24 #include "third_party/mojo_services/src/view_manager/public/cpp/view_observer.h" | 24 #include "third_party/mojo_services/src/view_manager/public/cpp/view_observer.h" |
25 | 25 |
26 namespace mojo { | 26 namespace mojo { |
27 | 27 |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 view11->SetFocus(); | 604 view11->SetFocus(); |
605 ASSERT_TRUE(DoRunLoopWithTimeout()); | 605 ASSERT_TRUE(DoRunLoopWithTimeout()); |
606 ASSERT_NE(nullptr, observer.last_gained_focus()); | 606 ASSERT_NE(nullptr, observer.last_gained_focus()); |
607 ASSERT_NE(nullptr, observer.last_lost_focus()); | 607 ASSERT_NE(nullptr, observer.last_lost_focus()); |
608 EXPECT_EQ(view11->id(), observer.last_gained_focus()->id()); | 608 EXPECT_EQ(view11->id(), observer.last_gained_focus()->id()); |
609 EXPECT_EQ(embedded->GetRoot()->id(), observer.last_lost_focus()->id()); | 609 EXPECT_EQ(embedded->GetRoot()->id(), observer.last_lost_focus()->id()); |
610 } | 610 } |
611 } | 611 } |
612 | 612 |
613 } // namespace mojo | 613 } // namespace mojo |
OLD | NEW |