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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h

Issue 2182443003: WebGL 2: Fix bugs in negativetextureapi.html for Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update code per zmo's review: fix the bug in cmd buffer, instead of Blink WebGL Created 4 years, 4 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // This file is auto-generated from 5 // This file is auto-generated from
6 // gpu/command_buffer/build_gles2_cmd_buffer.py 6 // gpu/command_buffer/build_gles2_cmd_buffer.py
7 // It's formatted by clang-format using chromium coding style: 7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename 8 // clang-format -i -style=chromium filename
9 // DO NOT EDIT! 9 // DO NOT EDIT!
10 10
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 310
311 TEST_P(GLES2DecoderTest1, CopyTexSubImage2DInvalidArgs7_0) { 311 TEST_P(GLES2DecoderTest1, CopyTexSubImage2DInvalidArgs7_0) {
312 EXPECT_CALL(*gl_, CopyTexSubImage2D(_, _, _, _, _, _, _, _)).Times(0); 312 EXPECT_CALL(*gl_, CopyTexSubImage2D(_, _, _, _, _, _, _, _)).Times(0);
313 SpecializedSetup<cmds::CopyTexSubImage2D, 0>(false); 313 SpecializedSetup<cmds::CopyTexSubImage2D, 0>(false);
314 cmds::CopyTexSubImage2D cmd; 314 cmds::CopyTexSubImage2D cmd;
315 cmd.Init(GL_TEXTURE_2D, 2, 3, 4, 5, 6, 7, -1); 315 cmd.Init(GL_TEXTURE_2D, 2, 3, 4, 5, 6, 7, -1);
316 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 316 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
317 EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); 317 EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
318 } 318 }
319 319
320 TEST_P(GLES2DecoderTest1, CopyTexSubImage3DValidArgs) {
Zhenyao Mo 2016/07/26 13:25:55 Please add a manual GLES3DecoderTest CopyTexSubIma
yunchao 2016/07/26 13:30:50 Yeah. I am doing this, but have some bugs currentl
321 EXPECT_CALL(*gl_, CopyTexSubImage3D(GL_TEXTURE_3D, 2, 3, 4, 5, 6, 7, 8, 9));
322 SpecializedSetup<cmds::CopyTexSubImage3D, 0>(true);
323 cmds::CopyTexSubImage3D cmd;
324 cmd.Init(GL_TEXTURE_3D, 2, 3, 4, 5, 6, 7, 8, 9);
325 decoder_->set_unsafe_es3_apis_enabled(true);
326 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
327 EXPECT_EQ(GL_NO_ERROR, GetGLError());
328 decoder_->set_unsafe_es3_apis_enabled(false);
329 EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd));
330 }
331
332 TEST_P(GLES2DecoderTest1, CreateProgramValidArgs) { 320 TEST_P(GLES2DecoderTest1, CreateProgramValidArgs) {
333 EXPECT_CALL(*gl_, CreateProgram()).WillOnce(Return(kNewServiceId)); 321 EXPECT_CALL(*gl_, CreateProgram()).WillOnce(Return(kNewServiceId));
334 SpecializedSetup<cmds::CreateProgram, 0>(true); 322 SpecializedSetup<cmds::CreateProgram, 0>(true);
335 cmds::CreateProgram cmd; 323 cmds::CreateProgram cmd;
336 cmd.Init(kNewClientId); 324 cmd.Init(kNewClientId);
337 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 325 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
338 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 326 EXPECT_EQ(GL_NO_ERROR, GetGLError());
339 EXPECT_TRUE(GetProgram(kNewClientId)); 327 EXPECT_TRUE(GetProgram(kNewClientId));
340 } 328 }
341 329
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after
1350 cmds::GetProgramiv::Result* result = 1338 cmds::GetProgramiv::Result* result =
1351 static_cast<cmds::GetProgramiv::Result*>(shared_memory_address_); 1339 static_cast<cmds::GetProgramiv::Result*>(shared_memory_address_);
1352 result->size = 0; 1340 result->size = 0;
1353 cmds::GetProgramiv cmd; 1341 cmds::GetProgramiv cmd;
1354 cmd.Init(client_program_id_, GL_DELETE_STATUS, shared_memory_id_, 1342 cmd.Init(client_program_id_, GL_DELETE_STATUS, shared_memory_id_,
1355 kInvalidSharedMemoryOffset); 1343 kInvalidSharedMemoryOffset);
1356 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); 1344 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
1357 EXPECT_EQ(0u, result->size); 1345 EXPECT_EQ(0u, result->size);
1358 } 1346 }
1359 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_1_AUTOGEN_H_ 1347 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_1_AUTOGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698