| 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/task_runner_util.h" | 5 #include "base/task_runner_util.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| 11 #include "base/message_loop/message_loop.h" |
| 11 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 14 |
| 14 namespace base { | 15 namespace base { |
| 15 | 16 |
| 16 namespace { | 17 namespace { |
| 17 | 18 |
| 18 int ReturnFourtyTwo() { | 19 int ReturnFourtyTwo() { |
| 19 return 42; | 20 return 42; |
| 20 } | 21 } |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 PostTaskAndReplyWithResult(message_loop.task_runner().get(), FROM_HERE, | 116 PostTaskAndReplyWithResult(message_loop.task_runner().get(), FROM_HERE, |
| 116 Bind(&CreateScopedFoo), Bind(&ExpectScopedFoo)); | 117 Bind(&CreateScopedFoo), Bind(&ExpectScopedFoo)); |
| 117 | 118 |
| 118 RunLoop().RunUntilIdle(); | 119 RunLoop().RunUntilIdle(); |
| 119 | 120 |
| 120 EXPECT_EQ(1, g_foo_destruct_count); | 121 EXPECT_EQ(1, g_foo_destruct_count); |
| 121 EXPECT_EQ(1, g_foo_free_count); | 122 EXPECT_EQ(1, g_foo_free_count); |
| 122 } | 123 } |
| 123 | 124 |
| 124 } // namespace base | 125 } // namespace base |
| OLD | NEW |