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/bind_to_current_loop.h" | 5 #include "media/base/bind_to_current_loop.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
| 9 #include "base/memory/free_deleter.h" |
9 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
10 #include "base/synchronization/waitable_event.h" | 11 #include "base/synchronization/waitable_event.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
12 | 13 |
13 namespace media { | 14 namespace media { |
14 | 15 |
15 void BoundBoolSet(bool* var, bool val) { | 16 void BoundBoolSet(bool* var, bool val) { |
16 *var = val; | 17 *var = val; |
17 } | 18 } |
18 | 19 |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 &BoundIntegersSet, &a, &b)); | 162 &BoundIntegersSet, &a, &b)); |
162 cb.Run(1, -1); | 163 cb.Run(1, -1); |
163 EXPECT_EQ(a, 0); | 164 EXPECT_EQ(a, 0); |
164 EXPECT_EQ(b, 0); | 165 EXPECT_EQ(b, 0); |
165 loop_.RunUntilIdle(); | 166 loop_.RunUntilIdle(); |
166 EXPECT_EQ(a, 1); | 167 EXPECT_EQ(a, 1); |
167 EXPECT_EQ(b, -1); | 168 EXPECT_EQ(b, -1); |
168 } | 169 } |
169 | 170 |
170 } // namespace media | 171 } // namespace media |
OLD | NEW |