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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc

Issue 2592253002: Disallow GL_SAMPLES_PASSED as a query target. (Closed)
Patch Set: Made the unit test actually work. Created 4 years 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
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after
1477 void SetExpectationsForNCommands(int num_commands) { 1477 void SetExpectationsForNCommands(int num_commands) {
1478 for (int i = 0; i < num_commands; i++) 1478 for (int i = 0; i < num_commands; i++)
1479 SetupExpectationsForEnableDisable(GL_BLEND, true); 1479 SetupExpectationsForEnableDisable(GL_BLEND, true);
1480 } 1480 }
1481 1481
1482 protected: 1482 protected:
1483 Enable cmds_[3]; 1483 Enable cmds_[3];
1484 int entries_per_cmd_; 1484 int entries_per_cmd_;
1485 }; 1485 };
1486 1486
1487 TEST_P(GLES3DecoderTest, BeginInvalidTargetQueryFails) {
1488 BeginQueryEXT begin_cmd;
1489 begin_cmd.Init(GL_SAMPLES_PASSED,
1490 kNewClientId,
1491 kSharedMemoryId,
1492 kSharedMemoryOffset);
1493 EXPECT_EQ(error::kNoError, ExecuteCmd(begin_cmd));
1494 EXPECT_EQ(GL_INVALID_ENUM, GetGLError());
1495 }
1496
1497
1487 TEST_P(GLES3DecoderTest, BindTransformFeedbackValidArgs) { 1498 TEST_P(GLES3DecoderTest, BindTransformFeedbackValidArgs) {
1488 EXPECT_CALL(*gl_, BindTransformFeedback(GL_TRANSFORM_FEEDBACK, 1499 EXPECT_CALL(*gl_, BindTransformFeedback(GL_TRANSFORM_FEEDBACK,
1489 kServiceTransformFeedbackId)); 1500 kServiceTransformFeedbackId));
1490 SpecializedSetup<BindTransformFeedback, 0>(true); 1501 SpecializedSetup<BindTransformFeedback, 0>(true);
1491 BindTransformFeedback cmd; 1502 BindTransformFeedback cmd;
1492 cmd.Init(GL_TRANSFORM_FEEDBACK, client_transformfeedback_id_); 1503 cmd.Init(GL_TRANSFORM_FEEDBACK, client_transformfeedback_id_);
1493 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 1504 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1494 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 1505 EXPECT_EQ(GL_NO_ERROR, GetGLError());
1495 } 1506 }
1496 1507
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1805 INSTANTIATE_TEST_CASE_P(Service, GLES3DecoderWithShaderTest, ::testing::Bool()); 1816 INSTANTIATE_TEST_CASE_P(Service, GLES3DecoderWithShaderTest, ::testing::Bool());
1806 1817
1807 INSTANTIATE_TEST_CASE_P(Service, GLES3DecoderManualInitTest, ::testing::Bool()); 1818 INSTANTIATE_TEST_CASE_P(Service, GLES3DecoderManualInitTest, ::testing::Bool());
1808 1819
1809 INSTANTIATE_TEST_CASE_P(Service, 1820 INSTANTIATE_TEST_CASE_P(Service,
1810 GLES3DecoderRGBBackbufferTest, 1821 GLES3DecoderRGBBackbufferTest,
1811 ::testing::Bool()); 1822 ::testing::Bool());
1812 1823
1813 } // namespace gles2 1824 } // namespace gles2
1814 } // namespace gpu 1825 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698