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