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

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

Issue 2661163006: Get mus_ws_unittests working with Ozone X11. (Closed)
Patch Set: Always use TYPE_UI. Created 3 years, 10 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 | « no previous file | testing/buildbot/chromium.chromiumos.json » ('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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 }; 346 };
347 347
348 void EmbedCallbackImpl(bool result) { 348 void EmbedCallbackImpl(bool result) {
349 embed_details_->callback_run = true; 349 embed_details_->callback_run = true;
350 embed_details_->embed_result = result; 350 embed_details_->embed_result = result;
351 if (embed_details_->waiting && 351 if (embed_details_->waiting &&
352 (!result || embed_details_->result->window_tree_client)) 352 (!result || embed_details_->result->window_tree_client))
353 EXPECT_TRUE(WindowServerTestBase::QuitRunLoop()); 353 EXPECT_TRUE(WindowServerTestBase::QuitRunLoop());
354 } 354 }
355 355
356 // mojo::test::ServiceTest::
357 std::unique_ptr<base::MessageLoop> CreateMessageLoop() override {
358 // The window server is expected to run with a TYPE_UI message loop.
359 return base::MakeUnique<base::MessageLoop>(base::MessageLoop::TYPE_UI);
360 }
361
356 std::unique_ptr<EmbedDetails> embed_details_; 362 std::unique_ptr<EmbedDetails> embed_details_;
357 363
358 std::unique_ptr<ClientAreaChange> client_area_change_; 364 std::unique_ptr<ClientAreaChange> client_area_change_;
359 365
360 DISALLOW_COPY_AND_ASSIGN(WindowServerTest); 366 DISALLOW_COPY_AND_ASSIGN(WindowServerTest);
361 }; 367 };
362 368
363 TEST_F(WindowServerTest, RootWindow) { 369 TEST_F(WindowServerTest, RootWindow) {
364 ASSERT_NE(nullptr, window_manager()); 370 ASSERT_NE(nullptr, window_manager());
365 EXPECT_EQ(1u, window_manager()->GetRoots().size()); 371 EXPECT_EQ(1u, window_manager()->GetRoots().size());
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 ASSERT_EQ(1u, top_level_in_wm->children().size()); 766 ASSERT_EQ(1u, top_level_in_wm->children().size());
761 aura::Window* second_client_child_in_wm = top_level_in_wm->children()[0]; 767 aura::Window* second_client_child_in_wm = top_level_in_wm->children()[0];
762 ASSERT_EQ(1u, second_client_child_in_wm->children().size()); 768 ASSERT_EQ(1u, second_client_child_in_wm->children().size());
763 aura::Window* transient_in_wm = second_client_child_in_wm->children()[0]; 769 aura::Window* transient_in_wm = second_client_child_in_wm->children()[0];
764 ASSERT_EQ(second_client_child_in_wm, 770 ASSERT_EQ(second_client_child_in_wm,
765 transient_window_client->GetTransientParent(transient_in_wm)); 771 transient_window_client->GetTransientParent(transient_in_wm));
766 } 772 }
767 773
768 } // namespace ws 774 } // namespace ws
769 } // namespace ui 775 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | testing/buildbot/chromium.chromiumos.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698