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

Side by Side Diff: components/cast_channel/cast_socket_service_unittest.cc

Issue 2913033003: [cast_channel] Move cast_channel related files from //extensions to //components (Closed)
Patch Set: fix buildbot compile errors Created 3 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
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 "extensions/browser/api/cast_channel/cast_socket_service.h" 5 #include "components/cast_channel/cast_socket_service.h"
6 #include "components/cast_channel/cast_test_util.h"
6 #include "content/public/test/test_browser_thread_bundle.h" 7 #include "content/public/test/test_browser_thread_bundle.h"
7 #include "extensions/browser/api/cast_channel/cast_test_util.h"
8 8
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 using testing::_; 11 using testing::_;
12 using testing::SaveArg; 12 using testing::SaveArg;
13 13
14 namespace extensions {
15 namespace api {
16 namespace cast_channel { 14 namespace cast_channel {
17 15
18 class CastSocketServiceTest : public testing::Test { 16 class CastSocketServiceTest : public testing::Test {
19 public: 17 public:
20 CastSocketServiceTest() 18 CastSocketServiceTest()
21 : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP), 19 : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
22 cast_socket_service_(new CastSocketService()) {} 20 cast_socket_service_(new CastSocketService()) {}
23 21
24 protected: 22 protected:
25 content::TestBrowserThreadBundle thread_bundle_; 23 content::TestBrowserThreadBundle thread_bundle_;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 EXPECT_CALL(*mock_socket, set_id(_)); 66 EXPECT_CALL(*mock_socket, set_id(_));
69 67
70 auto* mock_socket_ptr = mock_socket.get(); 68 auto* mock_socket_ptr = mock_socket.get();
71 channel_id = cast_socket_service_->AddSocket(std::move(mock_socket)); 69 channel_id = cast_socket_service_->AddSocket(std::move(mock_socket));
72 EXPECT_EQ(mock_socket_ptr, cast_socket_service_->GetSocket(channel_id)); 70 EXPECT_EQ(mock_socket_ptr, cast_socket_service_->GetSocket(channel_id));
73 socket = cast_socket_service_->RemoveSocket(channel_id); 71 socket = cast_socket_service_->RemoveSocket(channel_id);
74 EXPECT_TRUE(socket); 72 EXPECT_TRUE(socket);
75 } 73 }
76 74
77 } // namespace cast_channel 75 } // namespace cast_channel
78 } // namespace api
79 } // namespace extensions
OLDNEW
« no previous file with comments | « components/cast_channel/cast_socket_service_factory.cc ('k') | components/cast_channel/cast_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698