OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/ref_counted.h" | 5 #include "base/ref_counted.h" |
6 #include "media/base/data_buffer.h" | 6 #include "media/base/data_buffer.h" |
7 #include "remoting/jingle_glue/jingle_channel.h" | 7 #include "remoting/jingle_glue/jingle_channel.h" |
8 #include "remoting/jingle_glue/jingle_thread.h" | 8 #include "remoting/jingle_glue/jingle_thread.h" |
9 #include "testing/gmock/include/gmock/gmock.h" | 9 #include "testing/gmock/include/gmock/gmock.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 MockCallback callback; | 131 MockCallback callback; |
132 | 132 |
133 EXPECT_CALL(*stream, Close()) | 133 EXPECT_CALL(*stream, Close()) |
134 .Times(1); | 134 .Times(1); |
135 | 135 |
136 scoped_refptr<JingleChannel> channel = new JingleChannel(&callback); | 136 scoped_refptr<JingleChannel> channel = new JingleChannel(&callback); |
137 | 137 |
138 channel->thread_ = &thread; | 138 channel->thread_ = &thread; |
139 channel->stream_.reset(stream); | 139 channel->stream_.reset(stream); |
140 channel->state_ = JingleChannel::OPEN; | 140 channel->state_ = JingleChannel::OPEN; |
| 141 |
| 142 EXPECT_CALL(callback, OnStateChange(channel.get(), JingleChannel::CLOSED)) |
| 143 .Times(1); |
| 144 |
141 thread.Start(); | 145 thread.Start(); |
142 channel->Close(); | 146 channel->Close(); |
143 thread.Stop(); | 147 thread.Stop(); |
144 } | 148 } |
145 | 149 |
146 } // namespace remoting | 150 } // namespace remoting |
OLD | NEW |