OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/compiler_specific.h" |
6 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
7 #include "base/threading/thread.h" | 8 #include "base/threading/thread.h" |
8 #include "jingle/glue/thread_wrapper.h" | 9 #include "jingle/glue/thread_wrapper.h" |
9 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
11 | 12 |
12 using ::testing::DoAll; | 13 using ::testing::DoAll; |
13 using ::testing::InSequence; | 14 using ::testing::InSequence; |
14 using ::testing::InvokeWithoutArgs; | 15 using ::testing::InvokeWithoutArgs; |
15 using ::testing::Mock; | 16 using ::testing::Mock; |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 | 295 |
295 TEST_F(ThreadWrapperTest, Dispose) { | 296 TEST_F(ThreadWrapperTest, Dispose) { |
296 bool deleted_; | 297 bool deleted_; |
297 thread_->Dispose(new DeletableObject(&deleted_)); | 298 thread_->Dispose(new DeletableObject(&deleted_)); |
298 EXPECT_FALSE(deleted_); | 299 EXPECT_FALSE(deleted_); |
299 message_loop_.RunAllPending(); | 300 message_loop_.RunAllPending(); |
300 EXPECT_TRUE(deleted_); | 301 EXPECT_TRUE(deleted_); |
301 } | 302 } |
302 | 303 |
303 } // namespace jingle_glue | 304 } // namespace jingle_glue |
OLD | NEW |