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

Side by Side Diff: services/ui/view_manager/tests/view_manager_test_base.cc

Issue 1949233002: Create a RegisterViewAssociate method in ViewManager (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: add tests to mojo tests Created 4 years, 7 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "services/ui/view_manager/tests/view_manager_test_base.h"
6
7 #include "base/run_loop.h"
8 #include "mojo/public/cpp/application/application_test_base.h"
9 #include "mojo/public/cpp/application/connect.h"
10 #include "mojo/services/ui/views/interfaces/view_manager.mojom.h"
11 #include "mojo/services/ui/views/interfaces/views.mojom.h"
12
13 namespace view_manager {
14 namespace test {
15
16 ViewManagerTestBase::ViewManagerTestBase() : weak_factory_(this) {}
17
18 ViewManagerTestBase::~ViewManagerTestBase() {}
19
20 void ViewManagerTestBase::SetUp() {
21 mojo::test::ApplicationTestBase::SetUp();
22 quit_message_loop_callback_ =
23 base::Bind(&ViewManagerTestBase::QuitMessageLoopCallback,
24 weak_factory_.GetWeakPtr());
25 }
26
27 void ViewManagerTestBase::QuitMessageLoopCallback() {
28 base::MessageLoop::current()->Quit();
29 }
30
31 void ViewManagerTestBase::KickMessageLoop() {
32 base::MessageLoop::current()->PostDelayedTask(
33 FROM_HERE, quit_message_loop_callback_, kDefaultMessageDelay);
34 base::MessageLoop::current()->Run();
35 }
36
37 } // namespace test
38 } // namespace view_manager
OLDNEW
« no previous file with comments | « services/ui/view_manager/tests/view_manager_test_base.h ('k') | services/ui/view_manager/view_associate_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698