OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "media/base/test_helpers.h" | 5 #include "media/base/test_helpers.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/pickle.h" | 10 #include "base/pickle.h" |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 std::string header; | 235 std::string header; |
236 int width = 0; | 236 int width = 0; |
237 int height = 0; | 237 int height = 0; |
238 bool success = pickle.ReadString(&header) && pickle.ReadInt(&width) && | 238 bool success = pickle.ReadString(&header) && pickle.ReadInt(&width) && |
239 pickle.ReadInt(&height); | 239 pickle.ReadInt(&height); |
240 return (success && header == kFakeVideoBufferHeader && | 240 return (success && header == kFakeVideoBufferHeader && |
241 width == config.coded_size().width() && | 241 width == config.coded_size().width() && |
242 height == config.coded_size().height()); | 242 height == config.coded_size().height()); |
243 } | 243 } |
244 | 244 |
| 245 MatchingCallbackVerifier::MatchingCallbackVerifier() : expecting_B_(false) { |
| 246 } |
| 247 |
| 248 MatchingCallbackVerifier::~MatchingCallbackVerifier() { |
| 249 EXPECT_FALSE(expecting_B_); |
| 250 } |
| 251 |
| 252 void MatchingCallbackVerifier::A() { |
| 253 EXPECT_FALSE(expecting_B_); |
| 254 expecting_B_ = true; |
| 255 } |
| 256 |
| 257 void MatchingCallbackVerifier::B() { |
| 258 EXPECT_TRUE(expecting_B_); |
| 259 expecting_B_ = false; |
| 260 } |
| 261 |
245 } // namespace media | 262 } // namespace media |
OLD | NEW |