| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <utility> | 5 #include <utility> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 | 240 |
| 241 mutable base::Lock lock_; | 241 mutable base::Lock lock_; |
| 242 bool ping_called_; | 242 bool ping_called_; |
| 243 | 243 |
| 244 DISALLOW_COPY_AND_ASSIGN(TestSyncServiceThread); | 244 DISALLOW_COPY_AND_ASSIGN(TestSyncServiceThread); |
| 245 }; | 245 }; |
| 246 | 246 |
| 247 class SyncMethodTest : public testing::Test { | 247 class SyncMethodTest : public testing::Test { |
| 248 public: | 248 public: |
| 249 SyncMethodTest() {} | 249 SyncMethodTest() {} |
| 250 ~SyncMethodTest() override { loop_.RunUntilIdle(); } | 250 ~SyncMethodTest() override { base::RunLoop().RunUntilIdle(); } |
| 251 | 251 |
| 252 protected: | 252 protected: |
| 253 base::MessageLoop loop_; | 253 base::MessageLoop loop_; |
| 254 }; | 254 }; |
| 255 | 255 |
| 256 template <typename T> | 256 template <typename T> |
| 257 class SyncMethodCommonTest : public SyncMethodTest { | 257 class SyncMethodCommonTest : public SyncMethodTest { |
| 258 public: | 258 public: |
| 259 SyncMethodCommonTest() {} | 259 SyncMethodCommonTest() {} |
| 260 ~SyncMethodCommonTest() override {} | 260 ~SyncMethodCommonTest() override {} |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 int32_t result_value = -1; | 733 int32_t result_value = -1; |
| 734 ASSERT_TRUE(master_ptr_->Echo(456, &result_value)); | 734 ASSERT_TRUE(master_ptr_->Echo(456, &result_value)); |
| 735 EXPECT_EQ(456, result_value); | 735 EXPECT_EQ(456, result_value); |
| 736 } | 736 } |
| 737 | 737 |
| 738 // TODO(yzshen): Add more tests related to associated interfaces. | 738 // TODO(yzshen): Add more tests related to associated interfaces. |
| 739 | 739 |
| 740 } // namespace | 740 } // namespace |
| 741 } // namespace test | 741 } // namespace test |
| 742 } // namespace mojo | 742 } // namespace mojo |
| OLD | NEW |