OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/bind.h" | 5 #include "base/bind.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "chrome/browser/extensions/api/cast_channel/cast_channel_api.h" | |
9 #include "chrome/browser/extensions/api/cast_channel/cast_socket.h" | |
10 #include "chrome/browser/extensions/extension_apitest.h" | 8 #include "chrome/browser/extensions/extension_apitest.h" |
11 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
12 #include "chrome/common/extensions/api/cast_channel.h" | |
13 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
| 11 #include "extensions/browser/api/cast_channel/cast_channel_api.h" |
| 12 #include "extensions/browser/api/cast_channel/cast_socket.h" |
| 13 #include "extensions/common/api/cast_channel.h" |
14 #include "extensions/common/switches.h" | 14 #include "extensions/common/switches.h" |
15 #include "net/base/capturing_net_log.h" | 15 #include "net/base/capturing_net_log.h" |
16 #include "net/base/completion_callback.h" | 16 #include "net/base/completion_callback.h" |
17 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
18 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
19 #include "testing/gmock_mutant.h" | 19 #include "testing/gmock_mutant.h" |
20 | 20 |
21 namespace cast_channel = extensions::api::cast_channel; | 21 namespace cast_channel = extensions::core_api::cast_channel; |
22 using cast_channel::CastSocket; | 22 using cast_channel::CastSocket; |
23 using cast_channel::ChannelError; | 23 using cast_channel::ChannelError; |
24 using cast_channel::MessageInfo; | 24 using cast_channel::MessageInfo; |
25 using cast_channel::ReadyState; | 25 using cast_channel::ReadyState; |
26 | 26 |
27 using ::testing::_; | 27 using ::testing::_; |
28 using ::testing::A; | 28 using ::testing::A; |
29 using ::testing::DoAll; | 29 using ::testing::DoAll; |
30 using ::testing::Invoke; | 30 using ::testing::Invoke; |
31 using ::testing::InSequence; | 31 using ::testing::InSequence; |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 .WillRepeatedly(Return(cast_channel::READY_STATE_CLOSED)); | 252 .WillRepeatedly(Return(cast_channel::READY_STATE_CLOSED)); |
253 EXPECT_CALL(*mock_cast_socket_, Close(_)); | 253 EXPECT_CALL(*mock_cast_socket_, Close(_)); |
254 | 254 |
255 EXPECT_TRUE(RunExtensionSubtest("cast_channel/api", | 255 EXPECT_TRUE(RunExtensionSubtest("cast_channel/api", |
256 "test_open_error.html")); | 256 "test_open_error.html")); |
257 | 257 |
258 ResultCatcher catcher; | 258 ResultCatcher catcher; |
259 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 259 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
260 } | 260 } |
261 | 261 |
OLD | NEW |