| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 } | 645 } |
| 646 | 646 |
| 647 TEST_F(WindowServerTest, ClientAreaChanged) { | 647 TEST_F(WindowServerTest, ClientAreaChanged) { |
| 648 aura::Window* window = NewVisibleWindow(GetFirstWMRoot(), window_manager()); | 648 aura::Window* window = NewVisibleWindow(GetFirstWMRoot(), window_manager()); |
| 649 | 649 |
| 650 std::unique_ptr<EmbedResult> embed_result = Embed(window_manager(), window); | 650 std::unique_ptr<EmbedResult> embed_result = Embed(window_manager(), window); |
| 651 ASSERT_TRUE(embed_result->IsValid()); | 651 ASSERT_TRUE(embed_result->IsValid()); |
| 652 | 652 |
| 653 // Verify change from embedded makes it to parent. | 653 // Verify change from embedded makes it to parent. |
| 654 const gfx::Insets insets(1, 2, 3, 4); | 654 const gfx::Insets insets(1, 2, 3, 4); |
| 655 embed_result->window_tree_host->SetClientArea(insets); | 655 embed_result->window_tree_host->SetClientArea(insets, |
| 656 std::vector<gfx::Rect>()); |
| 656 std::unique_ptr<ClientAreaChange> client_area_change = | 657 std::unique_ptr<ClientAreaChange> client_area_change = |
| 657 WaitForClientAreaToChange(); | 658 WaitForClientAreaToChange(); |
| 658 ASSERT_TRUE(client_area_change); | 659 ASSERT_TRUE(client_area_change); |
| 659 EXPECT_EQ(window, client_area_change->window); | 660 EXPECT_EQ(window, client_area_change->window); |
| 660 EXPECT_EQ(insets, client_area_change->insets); | 661 EXPECT_EQ(insets, client_area_change->insets); |
| 661 } | 662 } |
| 662 | 663 |
| 663 class EstablishConnectionViaFactoryDelegate : public TestWindowManagerDelegate { | 664 class EstablishConnectionViaFactoryDelegate : public TestWindowManagerDelegate { |
| 664 public: | 665 public: |
| 665 explicit EstablishConnectionViaFactoryDelegate(aura::WindowTreeClient* client) | 666 explicit EstablishConnectionViaFactoryDelegate(aura::WindowTreeClient* client) |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 ASSERT_EQ(1u, top_level_in_wm->children().size()); | 756 ASSERT_EQ(1u, top_level_in_wm->children().size()); |
| 756 aura::Window* second_client_child_in_wm = top_level_in_wm->children()[0]; | 757 aura::Window* second_client_child_in_wm = top_level_in_wm->children()[0]; |
| 757 ASSERT_EQ(1u, second_client_child_in_wm->children().size()); | 758 ASSERT_EQ(1u, second_client_child_in_wm->children().size()); |
| 758 aura::Window* transient_in_wm = second_client_child_in_wm->children()[0]; | 759 aura::Window* transient_in_wm = second_client_child_in_wm->children()[0]; |
| 759 ASSERT_EQ(second_client_child_in_wm, | 760 ASSERT_EQ(second_client_child_in_wm, |
| 760 transient_window_client->GetTransientParent(transient_in_wm)); | 761 transient_window_client->GetTransientParent(transient_in_wm)); |
| 761 } | 762 } |
| 762 | 763 |
| 763 } // namespace ws | 764 } // namespace ws |
| 764 } // namespace ui | 765 } // namespace ui |
| OLD | NEW |