| 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 "base/threading/thread.h" | 5 #include "base/threading/thread.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 11 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" | 11 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 #include "testing/platform_test.h" | 13 #include "testing/platform_test.h" |
| 14 | 14 |
| 15 using base::Thread; | 15 using base::Thread; |
| 16 | 16 |
| 17 typedef PlatformTest ThreadTest; | 17 typedef PlatformTest ThreadTest; |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 | 230 |
| 231 // Upon leaving this scope, the thread is deleted. | 231 // Upon leaving this scope, the thread is deleted. |
| 232 } | 232 } |
| 233 | 233 |
| 234 // Check the order of events during shutdown. | 234 // Check the order of events during shutdown. |
| 235 ASSERT_EQ(static_cast<size_t>(THREAD_NUM_EVENTS), captured_events.size()); | 235 ASSERT_EQ(static_cast<size_t>(THREAD_NUM_EVENTS), captured_events.size()); |
| 236 EXPECT_EQ(THREAD_EVENT_INIT, captured_events[0]); | 236 EXPECT_EQ(THREAD_EVENT_INIT, captured_events[0]); |
| 237 EXPECT_EQ(THREAD_EVENT_CLEANUP, captured_events[1]); | 237 EXPECT_EQ(THREAD_EVENT_CLEANUP, captured_events[1]); |
| 238 EXPECT_EQ(THREAD_EVENT_MESSAGE_LOOP_DESTROYED, captured_events[2]); | 238 EXPECT_EQ(THREAD_EVENT_MESSAGE_LOOP_DESTROYED, captured_events[2]); |
| 239 } | 239 } |
| OLD | NEW |