| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/browser/gpu/gpu_util.h" | 5 #include "gpu/config/gpu_util.h" |
| 6 #include "testing/gtest/include/gtest/gtest.h" | 6 #include "testing/gtest/include/gtest/gtest.h" |
| 7 #include "ui/gl/gl_switches.h" | 7 #include "ui/gl/gl_switches.h" |
| 8 | 8 |
| 9 namespace content { | 9 namespace gpu { |
| 10 | 10 |
| 11 TEST(GpuUtilTest, GpuSwitchingOptionFromString) { | 11 TEST(GpuUtilTest, GpuSwitchingOptionFromString) { |
| 12 // Test StringToGpuSwitchingOption. | 12 // Test StringToGpuSwitchingOption. |
| 13 EXPECT_EQ(StringToGpuSwitchingOption( | 13 EXPECT_EQ(StringToGpuSwitchingOption( |
| 14 switches::kGpuSwitchingOptionNameAutomatic), | 14 switches::kGpuSwitchingOptionNameAutomatic), |
| 15 GPU_SWITCHING_OPTION_AUTOMATIC); | 15 GPU_SWITCHING_OPTION_AUTOMATIC); |
| 16 EXPECT_EQ(StringToGpuSwitchingOption( | 16 EXPECT_EQ(StringToGpuSwitchingOption( |
| 17 switches::kGpuSwitchingOptionNameForceDiscrete), | 17 switches::kGpuSwitchingOptionNameForceDiscrete), |
| 18 GPU_SWITCHING_OPTION_FORCE_DISCRETE); | 18 GPU_SWITCHING_OPTION_FORCE_DISCRETE); |
| 19 EXPECT_EQ(StringToGpuSwitchingOption( | 19 EXPECT_EQ(StringToGpuSwitchingOption( |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 std::set<int> src; | 68 std::set<int> src; |
| 69 std::set<int> dst; | 69 std::set<int> dst; |
| 70 src.insert(1); | 70 src.insert(1); |
| 71 dst.insert(2); | 71 dst.insert(2); |
| 72 EXPECT_EQ(1u, dst.size()); | 72 EXPECT_EQ(1u, dst.size()); |
| 73 MergeFeatureSets(&dst, src); | 73 MergeFeatureSets(&dst, src); |
| 74 EXPECT_EQ(2u, dst.size()); | 74 EXPECT_EQ(2u, dst.size()); |
| 75 } | 75 } |
| 76 } | 76 } |
| 77 | 77 |
| 78 } // namespace content | 78 } // namespace gpu |
| OLD | NEW |