| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "cc/scheduler/begin_frame_source.h" | 7 #include "cc/scheduler/begin_frame_source.h" |
| 8 #include "cc/surfaces/surface_factory_client.h" | 8 #include "cc/surfaces/surface_factory_client.h" |
| 9 #include "cc/surfaces/surface_manager.h" | 9 #include "cc/surfaces/surface_manager.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 class SurfaceManagerTest : public testing::Test { | 67 class SurfaceManagerTest : public testing::Test { |
| 68 public: | 68 public: |
| 69 // These tests don't care about namespace registration, so just preregister | 69 // These tests don't care about namespace registration, so just preregister |
| 70 // a set of namespaces that tests can use freely without worrying if they're | 70 // a set of namespaces that tests can use freely without worrying if they're |
| 71 // valid or not. | 71 // valid or not. |
| 72 enum { MAX_NAMESPACE = 10 }; | 72 enum { MAX_NAMESPACE = 10 }; |
| 73 | 73 |
| 74 SurfaceManagerTest() { | 74 SurfaceManagerTest() { |
| 75 for (size_t i = 0; i < MAX_NAMESPACE; ++i) | 75 for (size_t i = 0; i < MAX_NAMESPACE; ++i) |
| 76 manager_.RegisterSurfaceIdNamespace(i); | 76 manager_.RegisterSurfaceClientId(i); |
| 77 } | 77 } |
| 78 | 78 |
| 79 ~SurfaceManagerTest() override { | 79 ~SurfaceManagerTest() override { |
| 80 for (size_t i = 0; i < MAX_NAMESPACE; ++i) | 80 for (size_t i = 0; i < MAX_NAMESPACE; ++i) |
| 81 manager_.InvalidateSurfaceIdNamespace(i); | 81 manager_.InvalidateSurfaceClientId(i); |
| 82 } | 82 } |
| 83 | 83 |
| 84 protected: | 84 protected: |
| 85 SurfaceManager manager_; | 85 SurfaceManager manager_; |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 TEST_F(SurfaceManagerTest, SingleClients) { | 88 TEST_F(SurfaceManagerTest, SingleClients) { |
| 89 FakeSurfaceFactoryClient client(1); | 89 FakeSurfaceFactoryClient client(1); |
| 90 FakeSurfaceFactoryClient other_client(2); | 90 FakeSurfaceFactoryClient other_client(2); |
| 91 EmptyBeginFrameSource source; | 91 EmptyBeginFrameSource source; |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 } | 372 } |
| 373 | 373 |
| 374 INSTANTIATE_TEST_CASE_P( | 374 INSTANTIATE_TEST_CASE_P( |
| 375 SurfaceManagerOrderingParamTestInstantiation, | 375 SurfaceManagerOrderingParamTestInstantiation, |
| 376 SurfaceManagerOrderingParamTest, | 376 SurfaceManagerOrderingParamTest, |
| 377 ::testing::Combine(::testing::ValuesIn(kRegisterOrderList), | 377 ::testing::Combine(::testing::ValuesIn(kRegisterOrderList), |
| 378 ::testing::ValuesIn(kUnregisterOrderList), | 378 ::testing::ValuesIn(kUnregisterOrderList), |
| 379 ::testing::ValuesIn(kBFSOrderList))); | 379 ::testing::ValuesIn(kBFSOrderList))); |
| 380 | 380 |
| 381 } // namespace cc | 381 } // namespace cc |
| OLD | NEW |