| 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 #ifndef EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_TEST_UTIL_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_TEST_UTIL_H_ | 
| 6 #define EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_TEST_UTIL_H_ | 6 #define EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_TEST_UTIL_H_ | 
| 7 | 7 | 
| 8 #include <string> | 8 #include <string> | 
| 9 #include <utility> | 9 #include <utility> | 
| 10 | 10 | 
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 85   MOCK_CONST_METHOD0(ready_state, ReadyState()); | 85   MOCK_CONST_METHOD0(ready_state, ReadyState()); | 
| 86   MOCK_CONST_METHOD0(error_state, ChannelError()); | 86   MOCK_CONST_METHOD0(error_state, ChannelError()); | 
| 87   MOCK_CONST_METHOD0(keep_alive, bool(void)); | 87   MOCK_CONST_METHOD0(keep_alive, bool(void)); | 
| 88   MOCK_CONST_METHOD0(audio_only, bool(void)); | 88   MOCK_CONST_METHOD0(audio_only, bool(void)); | 
| 89   MOCK_METHOD1(SetErrorState, void(ChannelError error_state)); | 89   MOCK_METHOD1(SetErrorState, void(ChannelError error_state)); | 
| 90 | 90 | 
| 91   CastTransport* transport() const override { return mock_transport_.get(); } | 91   CastTransport* transport() const override { return mock_transport_.get(); } | 
| 92 | 92 | 
| 93   MockCastTransport* mock_transport() const { return mock_transport_.get(); } | 93   MockCastTransport* mock_transport() const { return mock_transport_.get(); } | 
| 94 | 94 | 
|  | 95   const std::string& owner_extension_id() const override; | 
|  | 96 | 
| 95  private: | 97  private: | 
| 96   std::unique_ptr<MockCastTransport> mock_transport_; | 98   std::unique_ptr<MockCastTransport> mock_transport_; | 
| 97   std::unique_ptr<CastTransport::Delegate> delegate_; | 99   std::unique_ptr<CastTransport::Delegate> delegate_; | 
|  | 100   std::string owner_extension_id_; | 
| 98 | 101 | 
| 99   DISALLOW_COPY_AND_ASSIGN(MockCastSocket); | 102   DISALLOW_COPY_AND_ASSIGN(MockCastSocket); | 
| 100 }; | 103 }; | 
| 101 | 104 | 
| 102 // Creates the IPEndpoint 192.168.1.1. | 105 // Creates the IPEndpoint 192.168.1.1. | 
| 103 net::IPEndPoint CreateIPEndPointForTest(); | 106 net::IPEndPoint CreateIPEndPointForTest(); | 
| 104 | 107 | 
| 105 // Checks if two proto messages are the same. | 108 // Checks if two proto messages are the same. | 
| 106 // From | 109 // From | 
| 107 // third_party/cacheinvalidation/overrides/google/cacheinvalidation/deps/gmock.h | 110 // third_party/cacheinvalidation/overrides/google/cacheinvalidation/deps/gmock.h | 
| (...skipping 10 matching lines...) Expand all  Loading... | 
| 118                 AND_1_VALUE_PARAMS(rv)) { | 121                 AND_1_VALUE_PARAMS(rv)) { | 
| 119   base::ThreadTaskRunnerHandle::Get()->PostTask( | 122   base::ThreadTaskRunnerHandle::Get()->PostTask( | 
| 120       FROM_HERE, base::Bind(testing::get<cb_idx>(args), rv)); | 123       FROM_HERE, base::Bind(testing::get<cb_idx>(args), rv)); | 
| 121 } | 124 } | 
| 122 | 125 | 
| 123 }  // namespace cast_channel | 126 }  // namespace cast_channel | 
| 124 }  // namespace api | 127 }  // namespace api | 
| 125 }  // namespace extensions | 128 }  // namespace extensions | 
| 126 | 129 | 
| 127 #endif  // EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_TEST_UTIL_H_ | 130 #endif  // EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_TEST_UTIL_H_ | 
| OLD | NEW | 
|---|