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

Side by Side Diff: services/ui/ws/window_manager_client_unittest.cc

Issue 2552003002: Ensure compositor initialized before WindowTreeHost is Shown. (Closed)
Patch Set: Fixing WindowServerTest.EstablishConnectionViaFactory 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_client.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 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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 696
697 DISALLOW_COPY_AND_ASSIGN(EstablishConnectionViaFactoryDelegate); 697 DISALLOW_COPY_AND_ASSIGN(EstablishConnectionViaFactoryDelegate);
698 }; 698 };
699 699
700 TEST_F(WindowServerTest, EstablishConnectionViaFactory) { 700 TEST_F(WindowServerTest, EstablishConnectionViaFactory) {
701 EstablishConnectionViaFactoryDelegate delegate(window_manager()); 701 EstablishConnectionViaFactoryDelegate delegate(window_manager());
702 set_window_manager_delegate(&delegate); 702 set_window_manager_delegate(&delegate);
703 aura::WindowTreeClient second_client(connector(), this); 703 aura::WindowTreeClient second_client(connector(), this);
704 second_client.ConnectViaWindowTreeFactory(); 704 second_client.ConnectViaWindowTreeFactory();
705 aura::WindowTreeHostMus window_tree_host_in_second_client(&second_client); 705 aura::WindowTreeHostMus window_tree_host_in_second_client(&second_client);
706 window_tree_host_in_second_client.InitHost();
706 ASSERT_TRUE(second_client.GetRoots().count( 707 ASSERT_TRUE(second_client.GetRoots().count(
707 window_tree_host_in_second_client.window()) > 0); 708 window_tree_host_in_second_client.window()) > 0);
708 // Wait for the window to appear in the wm. 709 // Wait for the window to appear in the wm.
709 ASSERT_TRUE(delegate.QuitOnCreate()); 710 ASSERT_TRUE(delegate.QuitOnCreate());
710 711
711 aura::Window* window_in_wm = delegate.created_window(); 712 aura::Window* window_in_wm = delegate.created_window();
712 ASSERT_TRUE(window_in_wm); 713 ASSERT_TRUE(window_in_wm);
713 714
714 // Change the bounds in the wm, and make sure the child sees it. 715 // Change the bounds in the wm, and make sure the child sees it.
715 const gfx::Rect window_bounds(1, 11, 12, 101); 716 const gfx::Rect window_bounds(1, 11, 12, 101);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 ASSERT_EQ(1u, top_level_in_wm->children().size()); 752 ASSERT_EQ(1u, top_level_in_wm->children().size());
752 aura::Window* second_client_child_in_wm = top_level_in_wm->children()[0]; 753 aura::Window* second_client_child_in_wm = top_level_in_wm->children()[0];
753 ASSERT_EQ(1u, second_client_child_in_wm->children().size()); 754 ASSERT_EQ(1u, second_client_child_in_wm->children().size());
754 aura::Window* transient_in_wm = second_client_child_in_wm->children()[0]; 755 aura::Window* transient_in_wm = second_client_child_in_wm->children()[0];
755 ASSERT_EQ(second_client_child_in_wm, 756 ASSERT_EQ(second_client_child_in_wm,
756 transient_window_client->GetTransientParent(transient_in_wm)); 757 transient_window_client->GetTransientParent(transient_in_wm));
757 } 758 }
758 759
759 } // namespace ws 760 } // namespace ws
760 } // namespace ui 761 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | ui/aura/mus/window_tree_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698