Chromium Code Reviews| Index: gpu/command_buffer/service/texture_manager_unittest.cc |
| diff --git a/gpu/command_buffer/service/texture_manager_unittest.cc b/gpu/command_buffer/service/texture_manager_unittest.cc |
| index 026b8c240082639c5502277d1764b33fe317f742..ebe80db6d85eebe24790a260a844a62825e816b1 100644 |
| --- a/gpu/command_buffer/service/texture_manager_unittest.cc |
| +++ b/gpu/command_buffer/service/texture_manager_unittest.cc |
| @@ -68,12 +68,8 @@ class TextureManagerTest : public GpuServiceTest { |
| static const bool kUseDefaultTextures = false; |
| TextureManagerTest() { |
| - // Always run with this command line, but the ES3 features are not |
| - // enabled without FeatureInfo::EnableES3Validators(). |
| - base::CommandLine command_line(0, nullptr); |
| - command_line.AppendSwitch(switches::kEnableUnsafeES3APIs); |
| - GpuDriverBugWorkarounds gpu_driver_bug_workaround(&command_line); |
| - feature_info_ = new FeatureInfo(command_line, gpu_driver_bug_workaround); |
| + GpuDriverBugWorkarounds gpu_driver_bug_workaround; |
| + feature_info_ = new FeatureInfo(gpu_driver_bug_workaround); |
| } |
| ~TextureManagerTest() override {} |
| @@ -108,11 +104,12 @@ class TextureManagerTest : public GpuServiceTest { |
| void SetupFeatureInfo(const char* gl_extensions, |
| const char* gl_version, |
| bool enable_es3) { |
| + ContextType context_type = |
| + enable_es3 ? CONTEXT_TYPE_OPENGLES3 : CONTEXT_TYPE_OPENGLES2; |
|
Zhenyao Mo
2016/11/02 21:46:28
nit: wrong indent
Kai Ninomiya
2016/11/02 22:43:21
Done.
|
| TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( |
| - gl_.get(), gl_extensions, "", gl_version, |
| - feature_info_->context_type(), enable_es3); |
| - feature_info_->InitializeForTesting(); |
| - if (enable_es3) { |
| + gl_.get(), gl_extensions, "", gl_version, context_type); |
| + feature_info_->InitializeForTesting(context_type); |
| + if (feature_info_->IsWebGL2OrES3Context()) { |
|
Zhenyao Mo
2016/11/02 21:46:28
Can we ASSERT here?
Kai Ninomiya
2016/11/02 22:43:21
Done.
|
| EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS, _)) |
| .WillOnce(SetArgPointee<1>(8)) |
| .RetiresOnSaturation(); |
| @@ -2200,11 +2197,12 @@ class SharedTextureTest : public GpuServiceTest { |
| void SetupFeatureInfo(const char* gl_extensions, |
| const char* gl_version, |
| bool enable_es3) { |
| + ContextType context_type = |
| + enable_es3 ? CONTEXT_TYPE_OPENGLES3 : CONTEXT_TYPE_OPENGLES2; |
|
Zhenyao Mo
2016/11/02 21:46:28
nit: wrong indent
Kai Ninomiya
2016/11/02 22:43:21
Done.
|
| TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( |
| - gl_.get(), gl_extensions, "", gl_version, |
| - feature_info_->context_type(), enable_es3); |
| - feature_info_->InitializeForTesting(); |
| - if (enable_es3) { |
| + gl_.get(), gl_extensions, "", gl_version, context_type); |
| + feature_info_->InitializeForTesting(context_type); |
| + if (feature_info_->IsWebGL2OrES3Context()) { |
|
Zhenyao Mo
2016/11/02 21:46:28
Can we ASSERT here?
Kai Ninomiya
2016/11/02 22:43:21
Done.
|
| EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS, _)) |
| .WillOnce(SetArgPointee<1>(8)) |
| .RetiresOnSaturation(); |