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 1d1cba480a84bbfdd7d754b815588c7a9c9daa3a..97cc76b50e08899db14cacdb38f6ef3ead6c5401 100644 |
--- a/gpu/command_buffer/service/feature_info_unittest.cc |
+++ b/gpu/command_buffer/service/feature_info_unittest.cc |
@@ -45,13 +45,30 @@ class FeatureInfoTest : public testing::Test { |
const char* extensions, const char* version) { |
TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( |
gl_.get(), extensions, version); |
+ info_ = new FeatureInfo(); |
+ info_->Initialize(); |
+ } |
+ |
+ void SetupWithCommandLine(const CommandLine& command_line) { |
+ info_ = new FeatureInfo(command_line); |
+ } |
+ |
+ void SetupInitExpectationsWithCommandLine( |
+ const char* extensions, const CommandLine& command_line) { |
+ TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( |
+ gl_.get(), extensions, ""); |
+ info_ = new FeatureInfo(command_line); |
+ info_->Initialize(); |
+ } |
+ |
+ void SetupWithoutInit() { |
+ info_ = new FeatureInfo(); |
} |
protected: |
virtual void SetUp() { |
gl_.reset(new ::testing::StrictMock< ::gfx::MockGLInterface>()); |
::gfx::GLInterface::SetGLInterface(gl_.get()); |
- info_ = new FeatureInfo(); |
} |
virtual void TearDown() { |
@@ -75,6 +92,7 @@ struct FormatInfo { |
} // anonymous namespace. |
TEST_F(FeatureInfoTest, Basic) { |
+ SetupWithoutInit(); |
// Test it starts off uninitialized. |
EXPECT_FALSE(info_->feature_flags().chromium_framebuffer_multisample); |
EXPECT_FALSE(info_->feature_flags().multisampled_render_to_texture); |
@@ -199,7 +217,6 @@ TEST_F(FeatureInfoTest, Basic) { |
TEST_F(FeatureInfoTest, InitializeNoExtensions) { |
SetupInitExpectations(""); |
- info_->Initialize(NULL); |
// Check default extensions are there |
EXPECT_THAT(info_->extensions(), HasSubstr("GL_CHROMIUM_resource_safe")); |
EXPECT_THAT(info_->extensions(), HasSubstr("GL_CHROMIUM_strict_attribs")); |
@@ -272,21 +289,18 @@ TEST_F(FeatureInfoTest, InitializeNoExtensions) { |
TEST_F(FeatureInfoTest, InitializeNPOTExtensionGLES) { |
SetupInitExpectations("GL_OES_texture_npot"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_texture_npot")); |
EXPECT_TRUE(info_->feature_flags().npot_ok); |
} |
TEST_F(FeatureInfoTest, InitializeNPOTExtensionGL) { |
SetupInitExpectations("GL_ARB_texture_non_power_of_two"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_texture_npot")); |
EXPECT_TRUE(info_->feature_flags().npot_ok); |
} |
TEST_F(FeatureInfoTest, InitializeDXTExtensionGLES2) { |
SetupInitExpectations("GL_EXT_texture_compression_dxt1"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), |
HasSubstr("GL_EXT_texture_compression_dxt1")); |
EXPECT_TRUE(info_->validators()->compressed_texture_format.IsValid( |
@@ -301,7 +315,6 @@ TEST_F(FeatureInfoTest, InitializeDXTExtensionGLES2) { |
TEST_F(FeatureInfoTest, InitializeDXTExtensionGL) { |
SetupInitExpectations("GL_EXT_texture_compression_s3tc"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), |
HasSubstr("GL_EXT_texture_compression_dxt1")); |
EXPECT_THAT(info_->extensions(), |
@@ -320,7 +333,6 @@ TEST_F(FeatureInfoTest, InitializeDXTExtensionGL) { |
TEST_F(FeatureInfoTest, InitializeEXT_texture_format_BGRA8888GLES2) { |
SetupInitExpectations("GL_EXT_texture_format_BGRA8888"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), |
HasSubstr("GL_EXT_texture_format_BGRA8888")); |
EXPECT_TRUE(info_->validators()->texture_format.IsValid( |
@@ -333,7 +345,6 @@ TEST_F(FeatureInfoTest, InitializeEXT_texture_format_BGRA8888GLES2) { |
TEST_F(FeatureInfoTest, InitializeEXT_texture_format_BGRA8888GL) { |
SetupInitExpectations("GL_EXT_bgra"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), |
HasSubstr("GL_EXT_texture_format_BGRA8888")); |
EXPECT_THAT(info_->extensions(), |
@@ -350,7 +361,6 @@ TEST_F(FeatureInfoTest, InitializeEXT_texture_format_BGRA8888GL) { |
TEST_F(FeatureInfoTest, InitializeEXT_texture_format_BGRA8888Apple) { |
SetupInitExpectations("GL_APPLE_texture_format_BGRA8888"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), |
HasSubstr("GL_EXT_texture_format_BGRA8888")); |
EXPECT_TRUE(info_->validators()->texture_format.IsValid( |
@@ -363,7 +373,6 @@ TEST_F(FeatureInfoTest, InitializeEXT_texture_format_BGRA8888Apple) { |
TEST_F(FeatureInfoTest, InitializeEXT_read_format_bgra) { |
SetupInitExpectations("GL_EXT_read_format_bgra"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), |
HasSubstr("GL_EXT_read_format_bgra")); |
EXPECT_FALSE(info_->validators()->texture_format.IsValid( |
@@ -376,7 +385,6 @@ TEST_F(FeatureInfoTest, InitializeEXT_read_format_bgra) { |
TEST_F(FeatureInfoTest, InitializeOES_texture_floatGLES2) { |
SetupInitExpectations("GL_OES_texture_float"); |
- info_->Initialize(NULL); |
EXPECT_FALSE(info_->feature_flags().enable_texture_float_linear); |
EXPECT_FALSE(info_->feature_flags().enable_texture_half_float_linear); |
EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_texture_float")); |
@@ -411,7 +419,6 @@ TEST_F(FeatureInfoTest, InitializeOES_texture_floatGLES2) { |
TEST_F(FeatureInfoTest, InitializeOES_texture_float_linearGLES2) { |
SetupInitExpectations("GL_OES_texture_float GL_OES_texture_float_linear"); |
- info_->Initialize(NULL); |
EXPECT_TRUE(info_->feature_flags().enable_texture_float_linear); |
EXPECT_FALSE(info_->feature_flags().enable_texture_half_float_linear); |
EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_texture_float")); |
@@ -445,7 +452,6 @@ TEST_F(FeatureInfoTest, InitializeOES_texture_float_linearGLES2) { |
TEST_F(FeatureInfoTest, InitializeOES_texture_half_floatGLES2) { |
SetupInitExpectations("GL_OES_texture_half_float"); |
- info_->Initialize(NULL); |
EXPECT_FALSE(info_->feature_flags().enable_texture_float_linear); |
EXPECT_FALSE(info_->feature_flags().enable_texture_half_float_linear); |
EXPECT_THAT(info_->extensions(), Not(HasSubstr("GL_OES_texture_float"))); |
@@ -481,7 +487,6 @@ TEST_F(FeatureInfoTest, InitializeOES_texture_half_floatGLES2) { |
TEST_F(FeatureInfoTest, InitializeOES_texture_half_float_linearGLES2) { |
SetupInitExpectations( |
"GL_OES_texture_half_float GL_OES_texture_half_float_linear"); |
- info_->Initialize(NULL); |
EXPECT_FALSE(info_->feature_flags().enable_texture_float_linear); |
EXPECT_TRUE(info_->feature_flags().enable_texture_half_float_linear); |
EXPECT_THAT(info_->extensions(), Not(HasSubstr("GL_OES_texture_float"))); |
@@ -516,7 +521,6 @@ TEST_F(FeatureInfoTest, InitializeOES_texture_half_float_linearGLES2) { |
TEST_F(FeatureInfoTest, InitializeEXT_framebuffer_multisample) { |
SetupInitExpectations("GL_EXT_framebuffer_multisample"); |
- info_->Initialize(NULL); |
EXPECT_TRUE(info_->feature_flags().chromium_framebuffer_multisample); |
EXPECT_THAT(info_->extensions(), |
HasSubstr("GL_CHROMIUM_framebuffer_multisample")); |
@@ -534,7 +538,6 @@ TEST_F(FeatureInfoTest, InitializeEXT_framebuffer_multisample) { |
TEST_F(FeatureInfoTest, InitializeEXT_multisampled_render_to_texture) { |
SetupInitExpectations("GL_EXT_multisampled_render_to_texture"); |
- info_->Initialize(NULL); |
EXPECT_TRUE(info_->feature_flags( |
).multisampled_render_to_texture); |
EXPECT_FALSE(info_->feature_flags( |
@@ -551,7 +554,6 @@ TEST_F(FeatureInfoTest, InitializeEXT_multisampled_render_to_texture) { |
TEST_F(FeatureInfoTest, InitializeIMG_multisampled_render_to_texture) { |
SetupInitExpectations("GL_IMG_multisampled_render_to_texture"); |
- info_->Initialize(NULL); |
EXPECT_TRUE(info_->feature_flags( |
).use_img_for_multisampled_render_to_texture); |
EXPECT_TRUE(info_->feature_flags( |
@@ -568,7 +570,6 @@ TEST_F(FeatureInfoTest, InitializeIMG_multisampled_render_to_texture) { |
TEST_F(FeatureInfoTest, InitializeEXT_texture_filter_anisotropic) { |
SetupInitExpectations("GL_EXT_texture_filter_anisotropic"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), |
HasSubstr("GL_EXT_texture_filter_anisotropic")); |
EXPECT_TRUE(info_->validators()->texture_parameter.IsValid( |
@@ -579,7 +580,6 @@ TEST_F(FeatureInfoTest, InitializeEXT_texture_filter_anisotropic) { |
TEST_F(FeatureInfoTest, InitializeEXT_ARB_depth_texture) { |
SetupInitExpectations("GL_ARB_depth_texture"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), |
HasSubstr("GL_GOOGLE_depth_texture")); |
EXPECT_THAT(info_->extensions(), |
@@ -600,7 +600,6 @@ TEST_F(FeatureInfoTest, InitializeEXT_ARB_depth_texture) { |
TEST_F(FeatureInfoTest, InitializeOES_ARB_depth_texture) { |
SetupInitExpectations("GL_OES_depth_texture"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), |
HasSubstr("GL_GOOGLE_depth_texture")); |
EXPECT_THAT(info_->extensions(), |
@@ -621,7 +620,6 @@ TEST_F(FeatureInfoTest, InitializeOES_ARB_depth_texture) { |
TEST_F(FeatureInfoTest, InitializeANGLE_depth_texture) { |
SetupInitExpectations("GL_ANGLE_depth_texture"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), |
HasSubstr("GL_GOOGLE_depth_texture")); |
EXPECT_THAT(info_->extensions(), |
@@ -650,7 +648,6 @@ TEST_F(FeatureInfoTest, InitializeANGLE_depth_texture) { |
TEST_F(FeatureInfoTest, InitializeEXT_packed_depth_stencil) { |
SetupInitExpectations("GL_EXT_packed_depth_stencil"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), |
HasSubstr("GL_OES_packed_depth_stencil")); |
EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid( |
@@ -664,7 +661,6 @@ TEST_F(FeatureInfoTest, InitializeEXT_packed_depth_stencil) { |
TEST_F(FeatureInfoTest, InitializeOES_packed_depth_stencil) { |
SetupInitExpectations("GL_OES_packed_depth_stencil"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), |
HasSubstr("GL_OES_packed_depth_stencil")); |
EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid( |
@@ -679,7 +675,6 @@ TEST_F(FeatureInfoTest, InitializeOES_packed_depth_stencil) { |
TEST_F(FeatureInfoTest, |
InitializeOES_packed_depth_stencil_and_GL_ARB_depth_texture) { |
SetupInitExpectations("GL_OES_packed_depth_stencil GL_ARB_depth_texture"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), |
HasSubstr("GL_OES_packed_depth_stencil")); |
EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid( |
@@ -700,7 +695,6 @@ TEST_F(FeatureInfoTest, |
TEST_F(FeatureInfoTest, InitializeOES_depth24) { |
SetupInitExpectations("GL_OES_depth24"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_depth24")); |
EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid( |
GL_DEPTH_COMPONENT24)); |
@@ -708,7 +702,6 @@ TEST_F(FeatureInfoTest, InitializeOES_depth24) { |
TEST_F(FeatureInfoTest, InitializeOES_standard_derivatives) { |
SetupInitExpectations("GL_OES_standard_derivatives"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), HasSubstr("GL_OES_standard_derivatives")); |
EXPECT_TRUE(info_->feature_flags().oes_standard_derivatives); |
EXPECT_TRUE(info_->validators()->hint_target.IsValid( |
@@ -719,7 +712,6 @@ TEST_F(FeatureInfoTest, InitializeOES_standard_derivatives) { |
TEST_F(FeatureInfoTest, InitializeOES_rgb8_rgba8) { |
SetupInitExpectations("GL_OES_rgb8_rgba8"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), |
HasSubstr("GL_OES_rgb8_rgba8")); |
EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid( |
@@ -730,7 +722,6 @@ TEST_F(FeatureInfoTest, InitializeOES_rgb8_rgba8) { |
TEST_F(FeatureInfoTest, InitializeOES_EGL_image_external) { |
SetupInitExpectations("GL_OES_EGL_image_external"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), |
HasSubstr("GL_OES_EGL_image_external")); |
EXPECT_TRUE(info_->feature_flags().oes_egl_image_external); |
@@ -746,7 +737,6 @@ TEST_F(FeatureInfoTest, InitializeOES_EGL_image_external) { |
TEST_F(FeatureInfoTest, InitializeOES_compressed_ETC1_RGB8_texture) { |
SetupInitExpectations("GL_OES_compressed_ETC1_RGB8_texture"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), |
HasSubstr("GL_OES_compressed_ETC1_RGB8_texture")); |
EXPECT_TRUE(info_->validators()->compressed_texture_format.IsValid( |
@@ -757,7 +747,6 @@ TEST_F(FeatureInfoTest, InitializeOES_compressed_ETC1_RGB8_texture) { |
TEST_F(FeatureInfoTest, InitializeCHROMIUM_stream_texture) { |
SetupInitExpectations("GL_CHROMIUM_stream_texture"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), |
HasSubstr("GL_CHROMIUM_stream_texture")); |
EXPECT_TRUE(info_->feature_flags().chromium_stream_texture); |
@@ -765,7 +754,6 @@ TEST_F(FeatureInfoTest, InitializeCHROMIUM_stream_texture) { |
TEST_F(FeatureInfoTest, InitializeEXT_occlusion_query_boolean) { |
SetupInitExpectations("GL_EXT_occlusion_query_boolean"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), |
HasSubstr("GL_EXT_occlusion_query_boolean")); |
EXPECT_TRUE(info_->feature_flags().occlusion_query_boolean); |
@@ -777,7 +765,6 @@ TEST_F(FeatureInfoTest, InitializeEXT_occlusion_query_boolean) { |
TEST_F(FeatureInfoTest, InitializeARB_occlusion_query) { |
SetupInitExpectations("GL_ARB_occlusion_query"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), |
HasSubstr("GL_EXT_occlusion_query_boolean")); |
EXPECT_TRUE(info_->feature_flags().occlusion_query_boolean); |
@@ -789,7 +776,6 @@ TEST_F(FeatureInfoTest, InitializeARB_occlusion_query) { |
TEST_F(FeatureInfoTest, InitializeARB_occlusion_query2) { |
SetupInitExpectations("GL_ARB_occlusion_query2 GL_ARB_occlusion_query2"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), |
HasSubstr("GL_EXT_occlusion_query_boolean")); |
EXPECT_TRUE(info_->feature_flags().occlusion_query_boolean); |
@@ -801,7 +787,6 @@ TEST_F(FeatureInfoTest, InitializeARB_occlusion_query2) { |
TEST_F(FeatureInfoTest, InitializeOES_vertex_array_object) { |
SetupInitExpectations("GL_OES_vertex_array_object"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), |
HasSubstr("GL_OES_vertex_array_object")); |
EXPECT_TRUE(info_->feature_flags().native_vertex_array_object); |
@@ -809,7 +794,6 @@ TEST_F(FeatureInfoTest, InitializeOES_vertex_array_object) { |
TEST_F(FeatureInfoTest, InitializeARB_vertex_array_object) { |
SetupInitExpectations("GL_ARB_vertex_array_object"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), |
HasSubstr("GL_OES_vertex_array_object")); |
EXPECT_TRUE(info_->feature_flags().native_vertex_array_object); |
@@ -817,7 +801,6 @@ TEST_F(FeatureInfoTest, InitializeARB_vertex_array_object) { |
TEST_F(FeatureInfoTest, InitializeAPPLE_vertex_array_object) { |
SetupInitExpectations("GL_APPLE_vertex_array_object"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), |
HasSubstr("GL_OES_vertex_array_object")); |
EXPECT_TRUE(info_->feature_flags().native_vertex_array_object); |
@@ -825,7 +808,6 @@ TEST_F(FeatureInfoTest, InitializeAPPLE_vertex_array_object) { |
TEST_F(FeatureInfoTest, InitializeNo_vertex_array_object) { |
SetupInitExpectations(""); |
- info_->Initialize(NULL); |
// Even if the native extensions are not available the implementation |
// may still emulate the GL_OES_vertex_array_object functionality. In this |
// scenario native_vertex_array_object must be false. |
@@ -836,39 +818,35 @@ TEST_F(FeatureInfoTest, InitializeNo_vertex_array_object) { |
TEST_F(FeatureInfoTest, InitializeOES_element_index_uint) { |
SetupInitExpectations("GL_OES_element_index_uint"); |
- info_->Initialize(NULL); |
EXPECT_THAT(info_->extensions(), |
HasSubstr("GL_OES_element_index_uint")); |
EXPECT_TRUE(info_->validators()->index_type.IsValid(GL_UNSIGNED_INT)); |
} |
TEST_F(FeatureInfoTest, InitializeVAOsWithClientSideArrays) { |
- SetupInitExpectations("GL_OES_vertex_array_object"); |
CommandLine command_line(0, NULL); |
command_line.AppendSwitchASCII( |
switches::kGpuDriverBugWorkarounds, |
base::IntToString(gpu::USE_CLIENT_SIDE_ARRAYS_FOR_STREAM_BUFFERS)); |
- info_->AddFeatures(command_line); |
+ SetupInitExpectationsWithCommandLine("GL_OES_vertex_array_object", |
+ command_line); |
EXPECT_TRUE(info_->workarounds().use_client_side_arrays_for_stream_buffers); |
EXPECT_FALSE(info_->feature_flags().native_vertex_array_object); |
} |
TEST_F(FeatureInfoTest, InitializeEXT_frag_depth) { |
SetupInitExpectations("GL_EXT_frag_depth"); |
- info_->Initialize(NULL); |
EXPECT_TRUE(info_->feature_flags().ext_frag_depth); |
EXPECT_THAT(info_->extensions(), HasSubstr("GL_EXT_frag_depth")); |
} |
TEST_F(FeatureInfoTest, InitializeSamplersWithARBSamplerObjects) { |
SetupInitExpectationsWithGLVersion("GL_ARB_sampler_objects", "OpenGL 3.0"); |
- info_->Initialize(NULL); |
EXPECT_TRUE(info_->feature_flags().enable_samplers); |
} |
TEST_F(FeatureInfoTest, InitializeWithES3) { |
SetupInitExpectationsWithGLVersion("", "OpenGL ES 3.0"); |
- info_->Initialize(NULL); |
EXPECT_TRUE(info_->feature_flags().enable_samplers); |
EXPECT_TRUE(info_->feature_flags().map_buffer_range); |
EXPECT_FALSE(info_->feature_flags().use_async_readpixels); |
@@ -876,39 +854,33 @@ TEST_F(FeatureInfoTest, InitializeWithES3) { |
TEST_F(FeatureInfoTest, InitializeWithoutSamplers) { |
SetupInitExpectationsWithGLVersion("", "OpenGL GL 3.0"); |
- info_->Initialize(NULL); |
EXPECT_FALSE(info_->feature_flags().enable_samplers); |
} |
TEST_F(FeatureInfoTest, InitializeWithES3AndFences) { |
SetupInitExpectationsWithGLVersion("EGL_KHR_fence_sync", "OpenGL ES 3.0"); |
- info_->Initialize(NULL); |
EXPECT_TRUE(info_->feature_flags().use_async_readpixels); |
} |
TEST_F(FeatureInfoTest, ParseDriverBugWorkaroundsSingle) { |
- SetupInitExpectations(""); |
CommandLine command_line(0, NULL); |
command_line.AppendSwitchASCII( |
switches::kGpuDriverBugWorkarounds, |
base::IntToString(gpu::EXIT_ON_CONTEXT_LOST)); |
- EXPECT_FALSE(info_->workarounds().exit_on_context_lost); |
- info_->AddFeatures(command_line); |
+ // Workarounds should get parsed without the need for a context. |
+ SetupWithCommandLine(command_line); |
EXPECT_TRUE(info_->workarounds().exit_on_context_lost); |
} |
TEST_F(FeatureInfoTest, ParseDriverBugWorkaroundsMultiple) { |
- SetupInitExpectations(""); |
CommandLine command_line(0, NULL); |
command_line.AppendSwitchASCII( |
switches::kGpuDriverBugWorkarounds, |
base::IntToString(gpu::EXIT_ON_CONTEXT_LOST) + "," + |
base::IntToString(gpu::MAX_CUBE_MAP_TEXTURE_SIZE_LIMIT_1024) + "," + |
base::IntToString(gpu::MAX_TEXTURE_SIZE_LIMIT_4096)); |
- EXPECT_FALSE(info_->workarounds().exit_on_context_lost); |
- EXPECT_EQ(0, info_->workarounds().max_cube_map_texture_size); |
- EXPECT_EQ(0, info_->workarounds().max_texture_size); |
- info_->AddFeatures(command_line); |
+ // Workarounds should get parsed without the need for a context. |
+ SetupWithCommandLine(command_line); |
EXPECT_TRUE(info_->workarounds().exit_on_context_lost); |
EXPECT_EQ(1024, info_->workarounds().max_cube_map_texture_size); |
EXPECT_EQ(4096, info_->workarounds().max_texture_size); |