OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "mojo/ui/associates/view_tree_hit_tester_client.h" | 5 #include "mojo/ui/associates/view_tree_hit_tester_client.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
12 #include "mojo/public/cpp/application/application_impl.h" | |
13 #include "mojo/public/cpp/application/application_test_base.h" | 12 #include "mojo/public/cpp/application/application_test_base.h" |
14 #include "mojo/ui/associates/mock_hit_tester.h" | 13 #include "mojo/ui/associates/mock_hit_tester.h" |
15 #include "mojo/ui/associates/mock_view_inspector.h" | 14 #include "mojo/ui/associates/mock_view_inspector.h" |
16 #include "mojo/ui/associates/test_helpers.h" | 15 #include "mojo/ui/associates/test_helpers.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
18 | 17 |
19 namespace test { | 18 namespace test { |
20 | 19 |
21 class ViewTreeHitTesterClientTest : public mojo::test::ApplicationTestBase { | 20 class ViewTreeHitTesterClientTest : public mojo::test::ApplicationTestBase { |
22 public: | 21 public: |
(...skipping 116 matching lines...) Loading... |
139 view_inspector_.CloseHitTesterBindings(); | 138 view_inspector_.CloseHitTesterBindings(); |
140 loop.Run(); | 139 loop.Run(); |
141 } | 140 } |
142 | 141 |
143 // Hit testing should not work anymore. | 142 // Hit testing should not work anymore. |
144 HitTest(MakePointF(0.f, 0.f), &resolved_hits); | 143 HitTest(MakePointF(0.f, 0.f), &resolved_hits); |
145 EXPECT_EQ(nullptr, resolved_hits.get()); | 144 EXPECT_EQ(nullptr, resolved_hits.get()); |
146 } | 145 } |
147 | 146 |
148 } // namespace test | 147 } // namespace test |
OLD | NEW |