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

Side by Side Diff: remoting/client/chromoting_client_runtime_unittest.cc

Issue 1764503002: Adding container class for chromoting client runtimes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Jni runtime now holds a scoped_ptr<ChromotingClientRuntime>. Created 4 years, 9 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 (c) 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 "base/message_loop/message_loop.h"
6 #include "base/run_loop.h"
7 #include "remoting/base/auto_thread_task_runner.h"
8 #include "remoting/client/chromoting_client_runtime.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10
11 namespace remoting {
12
13 // A simple test that starts and stop the runtime. This tests the runtime
14 // operates properly and all threads and message loops are valid.
15 TEST(ChromotingClientRuntimeTest, StartAndStop) {
16 base::MessageLoopForUI message_loop;
17 base::RunLoop run_loop;
18
19 scoped_ptr<ChromotingClientRuntime> runtime =
20 ChromotingClientRuntime::Create();
21
22 EXPECT_TRUE(runtime);
Lambros 2016/03/09 00:06:18 EXPECT_TRUE(x); if (!x) return; can be replaced wi
nicholss 2016/03/09 16:54:27 Done.
23 if (!runtime)
24 return;
25 EXPECT_TRUE(runtime->network_task_runner().get());
26 EXPECT_TRUE(runtime->ui_task_runner().get());
27 EXPECT_TRUE(runtime->display_task_runner().get());
28 EXPECT_TRUE(runtime->file_task_runner().get());
29 EXPECT_TRUE(runtime->url_requester().get());
30
31 runtime.reset();
Lambros 2016/03/09 00:06:18 This line is a no-op, |runtime| goes out of scope
nicholss 2016/03/09 16:54:28 Done.
32 }
33
34 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698