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 "ui/aura/mus/window_tree_host_mus.h" | 5 #include "ui/aura/mus/window_tree_host_mus.h" |
6 | 6 |
| 7 #include "base/memory/ptr_util.h" |
7 #include "ui/aura/test/aura_mus_test_base.h" | 8 #include "ui/aura/test/aura_mus_test_base.h" |
8 #include "ui/aura/test/mus/test_window_tree.h" | 9 #include "ui/aura/test/mus/test_window_tree.h" |
9 | 10 |
10 namespace aura { | 11 namespace aura { |
11 | 12 |
12 using WindowTreeHostMusTest = aura::test::AuraMusClientTestBase; | 13 using WindowTreeHostMusTest = aura::test::AuraMusClientTestBase; |
13 | 14 |
14 TEST_F(WindowTreeHostMusTest, UpdateClientArea) { | 15 TEST_F(WindowTreeHostMusTest, UpdateClientArea) { |
15 std::unique_ptr<WindowTreeHostMus> window_tree_host_mus = | 16 std::unique_ptr<WindowTreeHostMus> window_tree_host_mus = |
16 base::MakeUnique<WindowTreeHostMus>(window_tree_client_impl()); | 17 base::MakeUnique<WindowTreeHostMus>(window_tree_client_impl()); |
(...skipping 11 matching lines...) Expand all Loading... |
28 gfx::Rect mask(10, 10, 10, 10); | 29 gfx::Rect mask(10, 10, 10, 10); |
29 window_tree_host_mus->SetHitTestMask(mask); | 30 window_tree_host_mus->SetHitTestMask(mask); |
30 ASSERT_TRUE(window_tree()->last_hit_test_mask().has_value()); | 31 ASSERT_TRUE(window_tree()->last_hit_test_mask().has_value()); |
31 EXPECT_EQ(mask, window_tree()->last_hit_test_mask()); | 32 EXPECT_EQ(mask, window_tree()->last_hit_test_mask()); |
32 | 33 |
33 window_tree_host_mus->SetHitTestMask(base::nullopt); | 34 window_tree_host_mus->SetHitTestMask(base::nullopt); |
34 ASSERT_FALSE(window_tree()->last_hit_test_mask().has_value()); | 35 ASSERT_FALSE(window_tree()->last_hit_test_mask().has_value()); |
35 } | 36 } |
36 | 37 |
37 } // namespace aura | 38 } // namespace aura |
OLD | NEW |