| Index: gpu/command_buffer/service/feature_info_unittest.cc
|
| diff --git a/gpu/command_buffer/service/feature_info_unittest.cc b/gpu/command_buffer/service/feature_info_unittest.cc
|
| index fdff1754715e1cb480f141363685d0be4dd56b24..8321e6868ca645cd8a3d02b799a0858e4af21de0 100644
|
| --- a/gpu/command_buffer/service/feature_info_unittest.cc
|
| +++ b/gpu/command_buffer/service/feature_info_unittest.cc
|
| @@ -8,6 +8,7 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/strings/string_number_conversions.h"
|
| #include "gpu/command_buffer/service/gpu_service_test.h"
|
| +#include "gpu/command_buffer/service/gpu_switches.h"
|
| #include "gpu/command_buffer/service/test_helper.h"
|
| #include "gpu/command_buffer/service/texture_manager.h"
|
| #include "gpu/config/gpu_driver_bug_workaround_type.h"
|
| @@ -77,6 +78,18 @@ class FeatureInfoTest
|
| info_->Initialize();
|
| }
|
|
|
| + void SetupInitExpectationsWithGLVersionAndCommandLine(
|
| + const char* extensions,
|
| + const char* renderer,
|
| + const char* version,
|
| + const base::CommandLine& command_line) {
|
| + GpuServiceTest::SetUpWithGLVersion(version, extensions);
|
| + TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(
|
| + gl_.get(), extensions, renderer, version);
|
| + info_ = new FeatureInfo(command_line);
|
| + info_->Initialize();
|
| + }
|
| +
|
| void SetupWithCommandLine(const base::CommandLine& command_line) {
|
| GpuServiceTest::SetUp();
|
| info_ = new FeatureInfo(command_line);
|
| @@ -1191,31 +1204,49 @@ TEST_P(FeatureInfoTest, BlendEquationAdvancedDisabled) {
|
| EXPECT_FALSE(info_->feature_flags().blend_equation_advanced_coherent);
|
| }
|
|
|
| -TEST_P(FeatureInfoTest, InitializeCHROMIUM_path_rendering) {
|
| +TEST_P(FeatureInfoTest, InitializeCHROMIUM_path_rendering_no_cmdline_switch) {
|
| SetupInitExpectationsWithGLVersion(
|
| "GL_ARB_compatibility GL_NV_path_rendering GL_EXT_direct_state_access",
|
| "", "4.3");
|
| + EXPECT_FALSE(info_->feature_flags().chromium_path_rendering);
|
| + EXPECT_THAT(info_->extensions(),
|
| + Not(HasSubstr("GL_CHROMIUM_path_rendering")));
|
| +}
|
| +
|
| +TEST_P(FeatureInfoTest, InitializeCHROMIUM_path_rendering) {
|
| + base::CommandLine command_line(0, NULL);
|
| + command_line.AppendSwitch(switches::kEnableGLPathRendering);
|
| + SetupInitExpectationsWithGLVersionAndCommandLine(
|
| + "GL_ARB_compatibility GL_NV_path_rendering GL_EXT_direct_state_access",
|
| + "", "4.3", command_line);
|
| EXPECT_TRUE(info_->feature_flags().chromium_path_rendering);
|
| EXPECT_THAT(info_->extensions(), HasSubstr("GL_CHROMIUM_path_rendering"));
|
| }
|
|
|
| TEST_P(FeatureInfoTest, InitializeCHROMIUM_path_rendering2) {
|
| - SetupInitExpectationsWithGLVersion(
|
| - "GL_NV_path_rendering", "", "OpenGL ES 3.1");
|
| + base::CommandLine command_line(0, NULL);
|
| + command_line.AppendSwitch(switches::kEnableGLPathRendering);
|
| + SetupInitExpectationsWithGLVersionAndCommandLine(
|
| + "GL_NV_path_rendering", "", "OpenGL ES 3.1", command_line);
|
| EXPECT_TRUE(info_->feature_flags().chromium_path_rendering);
|
| EXPECT_THAT(info_->extensions(), HasSubstr("GL_CHROMIUM_path_rendering"));
|
| }
|
|
|
| TEST_P(FeatureInfoTest, InitializeNoCHROMIUM_path_rendering) {
|
| - SetupInitExpectationsWithGLVersion("GL_ARB_compatibility", "", "4.3");
|
| + base::CommandLine command_line(0, NULL);
|
| + command_line.AppendSwitch(switches::kEnableGLPathRendering);
|
| + SetupInitExpectationsWithGLVersionAndCommandLine("GL_ARB_compatibility", "",
|
| + "4.3", command_line);
|
| EXPECT_FALSE(info_->feature_flags().chromium_path_rendering);
|
| EXPECT_THAT(info_->extensions(),
|
| Not(HasSubstr("GL_CHROMIUM_path_rendering")));
|
| }
|
|
|
| TEST_P(FeatureInfoTest, InitializeNoCHROMIUM_path_rendering2) {
|
| - SetupInitExpectationsWithGLVersion(
|
| - "GL_ARB_compatibility GL_NV_path_rendering", "", "4.3");
|
| + base::CommandLine command_line(0, NULL);
|
| + command_line.AppendSwitch(switches::kEnableGLPathRendering);
|
| + SetupInitExpectationsWithGLVersionAndCommandLine(
|
| + "GL_ARB_compatibility GL_NV_path_rendering", "", "4.3", command_line);
|
| EXPECT_FALSE(info_->feature_flags().chromium_path_rendering);
|
| EXPECT_THAT(info_->extensions(),
|
| Not(HasSubstr("GL_CHROMIUM_path_rendering")));
|
|
|