Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Unified Diff: gpu/config/gpu_util_unittest.cc

Issue 57633007: Merge gpu_switching_list into gpu_driver_bug_list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: final final Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/config/gpu_util.cc ('k') | gpu/gpu.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/config/gpu_util_unittest.cc
diff --git a/gpu/config/gpu_util_unittest.cc b/gpu/config/gpu_util_unittest.cc
index f3e3f8f73a0e44bedbb7150c188662e91afe7ba5..e1264dbf95bf8deb79991af2f30fb82164d55285 100644
--- a/gpu/config/gpu_util_unittest.cc
+++ b/gpu/config/gpu_util_unittest.cc
@@ -4,37 +4,9 @@
#include "gpu/config/gpu_util.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "ui/gl/gl_switches.h"
namespace gpu {
-TEST(GpuUtilTest, GpuSwitchingOptionFromString) {
- // Test StringToGpuSwitchingOption.
- EXPECT_EQ(StringToGpuSwitchingOption(
- switches::kGpuSwitchingOptionNameAutomatic),
- GPU_SWITCHING_OPTION_AUTOMATIC);
- EXPECT_EQ(StringToGpuSwitchingOption(
- switches::kGpuSwitchingOptionNameForceDiscrete),
- GPU_SWITCHING_OPTION_FORCE_DISCRETE);
- EXPECT_EQ(StringToGpuSwitchingOption(
- switches::kGpuSwitchingOptionNameForceIntegrated),
- GPU_SWITCHING_OPTION_FORCE_INTEGRATED);
- EXPECT_EQ(StringToGpuSwitchingOption("xxx"), GPU_SWITCHING_OPTION_UNKNOWN);
-}
-
-TEST(GpuUtilTest, GpuSwitchingOptionToString) {
- // Test GpuSwitchingOptionToString.
- EXPECT_STREQ(
- GpuSwitchingOptionToString(GPU_SWITCHING_OPTION_AUTOMATIC).c_str(),
- switches::kGpuSwitchingOptionNameAutomatic);
- EXPECT_STREQ(
- GpuSwitchingOptionToString(GPU_SWITCHING_OPTION_FORCE_DISCRETE).c_str(),
- switches::kGpuSwitchingOptionNameForceDiscrete);
- EXPECT_STREQ(
- GpuSwitchingOptionToString(GPU_SWITCHING_OPTION_FORCE_INTEGRATED).c_str(),
- switches::kGpuSwitchingOptionNameForceIntegrated);
-}
-
TEST(GpuUtilTest, MergeFeatureSets) {
{
// Merge two empty sets.
@@ -75,4 +47,25 @@ TEST(GpuUtilTest, MergeFeatureSets) {
}
}
+TEST(GpuUtilTest, StringToFeatureSet) {
+ {
+ // zero feature.
+ std::set<int> features;
+ StringToFeatureSet("", &features);
+ EXPECT_EQ(0u, features.size());
+ }
+ {
+ // One features.
+ std::set<int> features;
+ StringToFeatureSet("4", &features);
+ EXPECT_EQ(1u, features.size());
+ }
+ {
+ // Multiple features.
+ std::set<int> features;
+ StringToFeatureSet("1,9", &features);
+ EXPECT_EQ(2u, features.size());
+ }
+}
+
} // namespace gpu
« no previous file with comments | « gpu/config/gpu_util.cc ('k') | gpu/gpu.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698