Index: content/common/gpu/gpu_memory_buffer_factory_unittest.cc |
diff --git a/content/common/gpu/gpu_memory_buffer_factory_unittest.cc b/content/common/gpu/gpu_memory_buffer_factory_unittest.cc |
deleted file mode 100644 |
index dbd9b7602e0cf59aa3f82bb7dd1693e60e1aea8f..0000000000000000000000000000000000000000 |
--- a/content/common/gpu/gpu_memory_buffer_factory_unittest.cc |
+++ /dev/null |
@@ -1,58 +0,0 @@ |
-// Copyright 2014 The Chromium Authors. All rights reserved. |
-// Use of this source code is governed by a BSD-style license that can be |
-// found in the LICENSE file. |
- |
-#include "content/common/gpu/gpu_memory_buffer_factory.h" |
- |
-#include "testing/gtest/include/gtest/gtest.h" |
- |
-namespace content { |
-namespace { |
- |
-class GpuMemoryBufferFactoryTest |
- : public testing::TestWithParam<gfx::GpuMemoryBufferType> { |
- public: |
- GpuMemoryBufferFactoryTest() : factory_(nullptr) {} |
- |
- // Overridden from testing::Test: |
- void SetUp() override { |
- factory_ = GpuMemoryBufferFactory::Create(GetParam()); |
- factory_->GetSupportedGpuMemoryBufferConfigurations( |
- &supported_configurations_); |
- } |
- void TearDown() override { factory_.reset(); } |
- |
- protected: |
- scoped_ptr<GpuMemoryBufferFactory> factory_; |
- std::vector<GpuMemoryBufferFactory::Configuration> supported_configurations_; |
-}; |
- |
-TEST_P(GpuMemoryBufferFactoryTest, CreateAndDestroy) { |
- const gfx::GpuMemoryBufferId kBufferId(1); |
- const int kClientId = 1; |
- |
- gfx::Size buffer_size(2, 2); |
- |
- for (auto configuration : supported_configurations_) { |
- gfx::GpuMemoryBufferHandle handle = factory_->CreateGpuMemoryBuffer( |
- kBufferId, buffer_size, configuration.format, configuration.usage, |
- kClientId, gfx::kNullPluginWindow); |
- EXPECT_EQ(handle.type, GetParam()); |
- factory_->DestroyGpuMemoryBuffer(kBufferId, kClientId); |
- } |
-} |
- |
-std::vector<gfx::GpuMemoryBufferType> |
-GetSupportedGpuMemoryBufferFactoryTypes() { |
- std::vector<gfx::GpuMemoryBufferType> supported_types; |
- GpuMemoryBufferFactory::GetSupportedTypes(&supported_types); |
- return supported_types; |
-} |
- |
-INSTANTIATE_TEST_CASE_P( |
- GpuMemoryBufferFactoryTests, |
- GpuMemoryBufferFactoryTest, |
- ::testing::ValuesIn(GetSupportedGpuMemoryBufferFactoryTypes())); |
- |
-} // namespace |
-} // namespace content |