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

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: 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
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 #if defined(USE_OZONE)
357 // mojo::test::ServiceTest::
358 std::unique_ptr<base::MessageLoop> CreateMessageLoop() override {
359 // TYPE_UI is needed for platform events coming from libevent.
sky 2017/02/02 16:27:05 Is there any harm in doing this every where, not j
rjkroege 2017/02/02 16:38:42 There is a possibility of increased flake (see dis
kylechar 2017/02/02 18:01:29 rjkroege: Confusingly, this is actually something
360 return base::MakeUnique<base::MessageLoop>(base::MessageLoop::TYPE_UI);
361 }
362 #endif
363
356 std::unique_ptr<EmbedDetails> embed_details_; 364 std::unique_ptr<EmbedDetails> embed_details_;
357 365
358 std::unique_ptr<ClientAreaChange> client_area_change_; 366 std::unique_ptr<ClientAreaChange> client_area_change_;
359 367
360 DISALLOW_COPY_AND_ASSIGN(WindowServerTest); 368 DISALLOW_COPY_AND_ASSIGN(WindowServerTest);
361 }; 369 };
362 370
363 TEST_F(WindowServerTest, RootWindow) { 371 TEST_F(WindowServerTest, RootWindow) {
364 ASSERT_NE(nullptr, window_manager()); 372 ASSERT_NE(nullptr, window_manager());
365 EXPECT_EQ(1u, window_manager()->GetRoots().size()); 373 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()); 768 ASSERT_EQ(1u, top_level_in_wm->children().size());
761 aura::Window* second_client_child_in_wm = top_level_in_wm->children()[0]; 769 aura::Window* second_client_child_in_wm = top_level_in_wm->children()[0];
762 ASSERT_EQ(1u, second_client_child_in_wm->children().size()); 770 ASSERT_EQ(1u, second_client_child_in_wm->children().size());
763 aura::Window* transient_in_wm = second_client_child_in_wm->children()[0]; 771 aura::Window* transient_in_wm = second_client_child_in_wm->children()[0];
764 ASSERT_EQ(second_client_child_in_wm, 772 ASSERT_EQ(second_client_child_in_wm,
765 transient_window_client->GetTransientParent(transient_in_wm)); 773 transient_window_client->GetTransientParent(transient_in_wm));
766 } 774 }
767 775
768 } // namespace ws 776 } // namespace ws
769 } // namespace ui 777 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | testing/buildbot/chromium.chromiumos.json » ('j') | testing/buildbot/chromium.chromiumos.json » ('J')

Powered by Google App Engine
This is Rietveld 408576698