OLD | NEW |
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_transport.h" | 5 #include "extensions/browser/api/cast_channel/cast_transport.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <queue> | 8 #include <queue> |
9 | 9 |
10 #include "base/test/simple_test_tick_clock.h" | 10 #include "base/test/simple_test_tick_clock.h" |
11 #include "extensions/browser/api/cast_channel/cast_framer.h" | 11 #include "extensions/browser/api/cast_channel/cast_framer.h" |
12 #include "extensions/browser/api/cast_channel/cast_socket.h" | 12 #include "extensions/browser/api/cast_channel/cast_socket.h" |
13 #include "extensions/browser/api/cast_channel/cast_test_util.h" | 13 #include "extensions/browser/api/cast_channel/cast_test_util.h" |
14 #include "extensions/browser/api/cast_channel/logger.h" | 14 #include "extensions/browser/api/cast_channel/logger.h" |
15 #include "extensions/browser/api/cast_channel/logger_util.h" | 15 #include "extensions/browser/api/cast_channel/logger_util.h" |
16 #include "extensions/common/api/cast_channel/cast_channel.pb.h" | 16 #include "extensions/common/api/cast_channel/cast_channel.pb.h" |
17 #include "net/base/completion_callback.h" | 17 #include "net/base/completion_callback.h" |
18 #include "net/base/net_errors.h" | 18 #include "net/base/net_errors.h" |
19 #include "net/log/capturing_net_log.h" | 19 #include "net/log/test_net_log.h" |
20 #include "net/socket/socket.h" | 20 #include "net/socket/socket.h" |
21 #include "testing/gmock/include/gmock/gmock.h" | 21 #include "testing/gmock/include/gmock/gmock.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 | 23 |
24 using testing::_; | 24 using testing::_; |
25 using testing::DoAll; | 25 using testing::DoAll; |
26 using testing::InSequence; | 26 using testing::InSequence; |
27 using testing::Invoke; | 27 using testing::Invoke; |
28 using testing::NotNull; | 28 using testing::NotNull; |
29 using testing::Return; | 29 using testing::Return; |
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 MessageFramer::MessageHeader::header_size() - 1)), | 635 MessageFramer::MessageHeader::header_size() - 1)), |
636 Return(serialized_message.size() - | 636 Return(serialized_message.size() - |
637 MessageFramer::MessageHeader::header_size()))) | 637 MessageFramer::MessageHeader::header_size()))) |
638 .RetiresOnSaturation(); | 638 .RetiresOnSaturation(); |
639 EXPECT_CALL(*delegate_, OnError(CHANNEL_ERROR_INVALID_MESSAGE)); | 639 EXPECT_CALL(*delegate_, OnError(CHANNEL_ERROR_INVALID_MESSAGE)); |
640 transport_->Start(); | 640 transport_->Start(); |
641 } | 641 } |
642 } // namespace cast_channel | 642 } // namespace cast_channel |
643 } // namespace core_api | 643 } // namespace core_api |
644 } // namespace extensions | 644 } // namespace extensions |
OLD | NEW |