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

Side by Side Diff: services/ui/ws/window_manager_client_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 | « no previous file | ui/aura/mus/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 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
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
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
OLDNEW
« no previous file with comments | « no previous file | ui/aura/mus/window_tree_host_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698