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

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

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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 | « remoting/client/chromoting_client_runtime.cc ('k') | remoting/client/client_status_logger.cc » ('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 (c) 2016 The Chromium Authors. All rights reserved. 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 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 "base/message_loop/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "remoting/base/auto_thread_task_runner.h" 7 #include "remoting/base/auto_thread_task_runner.h"
8 #include "remoting/client/chromoting_client_runtime.h" 8 #include "remoting/client/chromoting_client_runtime.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace remoting { 11 namespace remoting {
12 12
13 #if defined(OS_IOS) || defined(OS_ANDROID) 13 #if defined(OS_IOS) || defined(OS_ANDROID)
14 14
15 // A simple test that starts and stop the runtime. This tests the runtime 15 // A simple test that starts and stop the runtime. This tests the runtime
16 // operates properly and all threads and message loops are valid. 16 // operates properly and all threads and message loops are valid.
17 TEST(ChromotingClientRuntimeTest, StartAndStop) { 17 TEST(ChromotingClientRuntimeTest, StartAndStop) {
18 scoped_ptr<base::MessageLoopForUI> ui_loop; 18 std::unique_ptr<base::MessageLoopForUI> ui_loop;
19 ui_loop.reset(new base::MessageLoopForUI()); 19 ui_loop.reset(new base::MessageLoopForUI());
20 #if defined(OS_IOS) 20 #if defined(OS_IOS)
21 ui_loop->Attach(); 21 ui_loop->Attach();
22 #endif 22 #endif
23 23
24 scoped_ptr<ChromotingClientRuntime> runtime = 24 std::unique_ptr<ChromotingClientRuntime> runtime =
25 ChromotingClientRuntime::Create(ui_loop.get()); 25 ChromotingClientRuntime::Create(ui_loop.get());
26 26
27 ASSERT_TRUE(runtime); 27 ASSERT_TRUE(runtime);
28 EXPECT_TRUE(runtime->network_task_runner().get()); 28 EXPECT_TRUE(runtime->network_task_runner().get());
29 EXPECT_TRUE(runtime->ui_task_runner().get()); 29 EXPECT_TRUE(runtime->ui_task_runner().get());
30 EXPECT_TRUE(runtime->display_task_runner().get()); 30 EXPECT_TRUE(runtime->display_task_runner().get());
31 EXPECT_TRUE(runtime->file_task_runner().get()); 31 EXPECT_TRUE(runtime->file_task_runner().get());
32 EXPECT_TRUE(runtime->url_requester().get()); 32 EXPECT_TRUE(runtime->url_requester().get());
33 } 33 }
34 34
35 #endif 35 #endif
36 36
37 } // namespace remoting 37 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/chromoting_client_runtime.cc ('k') | remoting/client/client_status_logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698