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

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

Issue 2581503002: Adds additional_client_area to client area (Closed)
Patch Set: merge Created 4 years 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/views/mus/desktop_window_tree_host_mus.h » ('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 "ui/aura/test/aura_mus_test_base.h" 7 #include "ui/aura/test/aura_mus_test_base.h"
8 #include "ui/aura/test/mus/test_window_tree.h" 8 #include "ui/aura/test/mus/test_window_tree.h"
9 9
10 namespace aura { 10 namespace aura {
11 11
12 using WindowTreeHostMusTest = aura::test::AuraMusClientTestBase; 12 using WindowTreeHostMusTest = aura::test::AuraMusClientTestBase;
13 13
14 TEST_F(WindowTreeHostMusTest, UpdateClientArea) { 14 TEST_F(WindowTreeHostMusTest, UpdateClientArea) {
15 std::unique_ptr<WindowTreeHostMus> window_tree_host_mus = 15 std::unique_ptr<WindowTreeHostMus> window_tree_host_mus =
16 base::MakeUnique<WindowTreeHostMus>(window_tree_client_impl()); 16 base::MakeUnique<WindowTreeHostMus>(window_tree_client_impl());
17 17
18 gfx::Insets new_insets(10, 11, 12, 13); 18 gfx::Insets new_insets(10, 11, 12, 13);
19 window_tree_host_mus->SetClientArea(new_insets); 19 window_tree_host_mus->SetClientArea(new_insets, std::vector<gfx::Rect>());
20 EXPECT_EQ(new_insets, window_tree()->last_client_area()); 20 EXPECT_EQ(new_insets, window_tree()->last_client_area());
21 } 21 }
22 22
23 TEST_F(WindowTreeHostMusTest, SetHitTestMask) { 23 TEST_F(WindowTreeHostMusTest, SetHitTestMask) {
24 std::unique_ptr<WindowTreeHostMus> window_tree_host_mus = 24 std::unique_ptr<WindowTreeHostMus> window_tree_host_mus =
25 base::MakeUnique<WindowTreeHostMus>(window_tree_client_impl()); 25 base::MakeUnique<WindowTreeHostMus>(window_tree_client_impl());
26 26
27 EXPECT_FALSE(window_tree()->last_hit_test_mask().has_value()); 27 EXPECT_FALSE(window_tree()->last_hit_test_mask().has_value());
28 gfx::Rect mask(10, 10, 10, 10); 28 gfx::Rect mask(10, 10, 10, 10);
29 window_tree_host_mus->SetHitTestMask(mask); 29 window_tree_host_mus->SetHitTestMask(mask);
30 ASSERT_TRUE(window_tree()->last_hit_test_mask().has_value()); 30 ASSERT_TRUE(window_tree()->last_hit_test_mask().has_value());
31 EXPECT_EQ(mask, window_tree()->last_hit_test_mask()); 31 EXPECT_EQ(mask, window_tree()->last_hit_test_mask());
32 32
33 window_tree_host_mus->SetHitTestMask(base::nullopt); 33 window_tree_host_mus->SetHitTestMask(base::nullopt);
34 ASSERT_FALSE(window_tree()->last_hit_test_mask().has_value()); 34 ASSERT_FALSE(window_tree()->last_hit_test_mask().has_value());
35 } 35 }
36 36
37 } // namespace aura 37 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/mus/window_tree_host_mus.cc ('k') | ui/views/mus/desktop_window_tree_host_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698