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

Side by Side Diff: dbus/test_server.cc

Issue 10540032: dbus: Add test_server.cc used for manual testing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « dbus/dbus.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 "base/at_exit.h"
6 #include "base/command_line.h"
7 #include "base/test/test_timeouts.h"
8 #include "dbus/bus.h"
9 #include "dbus/test_service.h"
10
11 int main(int argc, char** argv) {
12 base::AtExitManager exit_manager;
13 CommandLine::Init(argc, argv);
14 TestTimeouts::Initialize();
15
16 base::Thread* dbus_thread = new base::Thread("D-Bus Thread");
17 base::Thread::Options thread_options;
18 thread_options.message_loop_type = MessageLoop::TYPE_IO;
19 CHECK(dbus_thread->StartWithOptions(thread_options));
20
21 dbus::TestService::Options options;
22 options.dbus_thread_message_loop_proxy = dbus_thread->message_loop_proxy();
23 dbus::TestService* test_service = new dbus::TestService(options);
24 CHECK(test_service->StartService());
25 CHECK(test_service->WaitUntilServiceIsStarted());
26 CHECK(test_service->HasDBusThread());
27 base::PlatformThread::Join(dbus_thread->thread_handle());
28 }
OLDNEW
« no previous file with comments | « dbus/dbus.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698