Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(589)

Side by Side Diff: ui/aura/mus/window_tree_host_mus_unittest.cc

Issue 2764433003: mus-ws: Plumb FrameSinkId to Children (Closed)
Patch Set: Addressed Antoine's comment Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/aura/mus/window_tree_host_mus.cc ('k') | ui/aura/test/mus/window_tree_client_private.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/memory/ptr_util.h"
8 #include "ui/aura/test/aura_mus_test_base.h" 8 #include "ui/aura/test/aura_mus_test_base.h"
9 #include "ui/aura/test/mus/test_window_tree.h" 9 #include "ui/aura/test/mus/test_window_tree.h"
10 10
11 namespace aura { 11 namespace aura {
12 12
13 using WindowTreeHostMusTest = aura::test::AuraMusClientTestBase; 13 using WindowTreeHostMusTest = aura::test::AuraMusClientTestBase;
14 14
15 TEST_F(WindowTreeHostMusTest, UpdateClientArea) { 15 TEST_F(WindowTreeHostMusTest, UpdateClientArea) {
16 std::unique_ptr<WindowTreeHostMus> window_tree_host_mus = 16 std::unique_ptr<WindowTreeHostMus> window_tree_host_mus =
17 base::MakeUnique<WindowTreeHostMus>(window_tree_client_impl()); 17 base::MakeUnique<WindowTreeHostMus>(window_tree_client_impl(),
18 cc::FrameSinkId());
18 19
19 gfx::Insets new_insets(10, 11, 12, 13); 20 gfx::Insets new_insets(10, 11, 12, 13);
20 window_tree_host_mus->SetClientArea(new_insets, std::vector<gfx::Rect>()); 21 window_tree_host_mus->SetClientArea(new_insets, std::vector<gfx::Rect>());
21 EXPECT_EQ(new_insets, window_tree()->last_client_area()); 22 EXPECT_EQ(new_insets, window_tree()->last_client_area());
22 } 23 }
23 24
24 TEST_F(WindowTreeHostMusTest, SetHitTestMask) { 25 TEST_F(WindowTreeHostMusTest, SetHitTestMask) {
25 std::unique_ptr<WindowTreeHostMus> window_tree_host_mus = 26 std::unique_ptr<WindowTreeHostMus> window_tree_host_mus =
26 base::MakeUnique<WindowTreeHostMus>(window_tree_client_impl()); 27 base::MakeUnique<WindowTreeHostMus>(window_tree_client_impl(),
28 cc::FrameSinkId());
27 29
28 EXPECT_FALSE(window_tree()->last_hit_test_mask().has_value()); 30 EXPECT_FALSE(window_tree()->last_hit_test_mask().has_value());
29 gfx::Rect mask(10, 10, 10, 10); 31 gfx::Rect mask(10, 10, 10, 10);
30 window_tree_host_mus->SetHitTestMask(mask); 32 window_tree_host_mus->SetHitTestMask(mask);
31 ASSERT_TRUE(window_tree()->last_hit_test_mask().has_value()); 33 ASSERT_TRUE(window_tree()->last_hit_test_mask().has_value());
32 EXPECT_EQ(mask, window_tree()->last_hit_test_mask()); 34 EXPECT_EQ(mask, window_tree()->last_hit_test_mask());
33 35
34 window_tree_host_mus->SetHitTestMask(base::nullopt); 36 window_tree_host_mus->SetHitTestMask(base::nullopt);
35 ASSERT_FALSE(window_tree()->last_hit_test_mask().has_value()); 37 ASSERT_FALSE(window_tree()->last_hit_test_mask().has_value());
36 } 38 }
37 39
38 } // namespace aura 40 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/mus/window_tree_host_mus.cc ('k') | ui/aura/test/mus/window_tree_client_private.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698