| 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 "media/mojo/services/strong_binding_set.h" | 5 #include "media/mojo/services/strong_binding_set.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/memory/ptr_util.h" |
| 8 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 9 #include "base/test/test_message_loop.h" | 10 #include "base/test/test_message_loop.h" |
| 10 #include "mojo/public/cpp/bindings/interface_request.h" | 11 #include "mojo/public/cpp/bindings/interface_request.h" |
| 11 #include "services/service_manager/tests/test.mojom.h" | 12 #include "services/service_manager/tests/test.mojom.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 14 |
| 14 namespace media { | 15 namespace media { |
| 15 | 16 |
| 16 namespace { | 17 namespace { |
| 17 | 18 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 EXPECT_EQ(1, TestServiceImpl::instance_count); | 97 EXPECT_EQ(1, TestServiceImpl::instance_count); |
| 97 | 98 |
| 98 EXPECT_FALSE(bindings_->RemoveBinding(kInvalidBindingId)); | 99 EXPECT_FALSE(bindings_->RemoveBinding(kInvalidBindingId)); |
| 99 EXPECT_EQ(1, TestServiceImpl::instance_count); | 100 EXPECT_EQ(1, TestServiceImpl::instance_count); |
| 100 | 101 |
| 101 EXPECT_TRUE(bindings_->RemoveBinding(binding_id_2_)); | 102 EXPECT_TRUE(bindings_->RemoveBinding(binding_id_2_)); |
| 102 EXPECT_EQ(0, TestServiceImpl::instance_count); | 103 EXPECT_EQ(0, TestServiceImpl::instance_count); |
| 103 } | 104 } |
| 104 | 105 |
| 105 } // namespace media | 106 } // namespace media |
| OLD | NEW |