OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "gpu/command_buffer/service/gles2_cmd_decoder_unittest.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 9 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 88 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
89 } | 89 } |
90 } | 90 } |
91 | 91 |
92 void GLES3DecoderTest::SetUp() { | 92 void GLES3DecoderTest::SetUp() { |
93 base::CommandLine command_line(0, NULL); | 93 base::CommandLine command_line(0, NULL); |
94 command_line.AppendSwitch(switches::kEnableUnsafeES3APIs); | 94 command_line.AppendSwitch(switches::kEnableUnsafeES3APIs); |
95 InitState init; | 95 InitState init; |
96 init.gl_version = "OpenGL ES 3.0"; | 96 init.gl_version = "OpenGL ES 3.0"; |
97 init.bind_generates_resource = true; | 97 init.bind_generates_resource = true; |
| 98 init.webgl_version = 2; |
98 InitDecoderWithCommandLine(init, &command_line); | 99 InitDecoderWithCommandLine(init, &command_line); |
99 } | 100 } |
100 | 101 |
101 | 102 |
102 TEST_P(GLES3DecoderTest, Basic) { | 103 TEST_P(GLES3DecoderTest, Basic) { |
103 // Make sure the setup is correct for ES3. | 104 // Make sure the setup is correct for ES3. |
104 EXPECT_TRUE(decoder_->unsafe_es3_apis_enabled()); | 105 EXPECT_TRUE(decoder_->unsafe_es3_apis_enabled()); |
105 EXPECT_TRUE(feature_info()->validators()->texture_bind_target.IsValid( | 106 EXPECT_TRUE(feature_info()->validators()->texture_bind_target.IsValid( |
106 GL_TEXTURE_3D)); | 107 GL_TEXTURE_3D)); |
107 } | 108 } |
(...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1334 INSTANTIATE_TEST_CASE_P(Service, | 1335 INSTANTIATE_TEST_CASE_P(Service, |
1335 GLES2DecoderRGBBackbufferTest, | 1336 GLES2DecoderRGBBackbufferTest, |
1336 ::testing::Bool()); | 1337 ::testing::Bool()); |
1337 | 1338 |
1338 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderDoCommandsTest, ::testing::Bool()); | 1339 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderDoCommandsTest, ::testing::Bool()); |
1339 | 1340 |
1340 INSTANTIATE_TEST_CASE_P(Service, GLES3DecoderTest, ::testing::Bool()); | 1341 INSTANTIATE_TEST_CASE_P(Service, GLES3DecoderTest, ::testing::Bool()); |
1341 | 1342 |
1342 } // namespace gles2 | 1343 } // namespace gles2 |
1343 } // namespace gpu | 1344 } // namespace gpu |
OLD | NEW |