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

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

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 cmd->Init(1, &client_transformfeedback_id_); 1201 cmd->Init(1, &client_transformfeedback_id_);
1202 decoder_->set_unsafe_es3_apis_enabled(true); 1202 decoder_->set_unsafe_es3_apis_enabled(true);
1203 EXPECT_EQ(error::kInvalidArguments, 1203 EXPECT_EQ(error::kInvalidArguments,
1204 ExecuteImmediateCmd(*cmd, sizeof(&client_transformfeedback_id_))); 1204 ExecuteImmediateCmd(*cmd, sizeof(&client_transformfeedback_id_)));
1205 decoder_->set_unsafe_es3_apis_enabled(false); 1205 decoder_->set_unsafe_es3_apis_enabled(false);
1206 } 1206 }
1207 // TODO(gman): GetActiveAttrib 1207 // TODO(gman): GetActiveAttrib
1208 1208
1209 // TODO(gman): GetActiveUniform 1209 // TODO(gman): GetActiveUniform
1210 1210
1211 // TODO(gman): GetActiveUniformBlockiv
1212
1211 // TODO(gman): GetActiveUniformBlockName 1213 // TODO(gman): GetActiveUniformBlockName
1212 1214
1215 // TODO(gman): GetActiveUniformsiv
1216
1213 // TODO(gman): GetAttachedShaders 1217 // TODO(gman): GetAttachedShaders
1214 1218
1215 // TODO(gman): GetAttribLocation 1219 // TODO(gman): GetAttribLocation
1216 1220
1217 TEST_P(GLES2DecoderTest1, GetBooleanvValidArgs) { 1221 TEST_P(GLES2DecoderTest1, GetBooleanvValidArgs) {
1218 EXPECT_CALL(*gl_, GetError()) 1222 EXPECT_CALL(*gl_, GetError())
1219 .WillOnce(Return(GL_NO_ERROR)) 1223 .WillOnce(Return(GL_NO_ERROR))
1220 .WillOnce(Return(GL_NO_ERROR)) 1224 .WillOnce(Return(GL_NO_ERROR))
1221 .RetiresOnSaturation(); 1225 .RetiresOnSaturation();
1222 SpecializedSetup<cmds::GetBooleanv, 0>(true); 1226 SpecializedSetup<cmds::GetBooleanv, 0>(true);
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
1801 kInvalidSharedMemoryOffset); 1805 kInvalidSharedMemoryOffset);
1802 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); 1806 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
1803 EXPECT_EQ(0u, result->size); 1807 EXPECT_EQ(0u, result->size);
1804 } 1808 }
1805 // TODO(gman): GetShaderInfoLog 1809 // TODO(gman): GetShaderInfoLog
1806 // TODO(gman): GetShaderPrecisionFormat 1810 // TODO(gman): GetShaderPrecisionFormat
1807 1811
1808 // TODO(gman): GetShaderSource 1812 // TODO(gman): GetShaderSource
1809 // TODO(gman): GetString 1813 // TODO(gman): GetString
1810 1814
1811 TEST_P(GLES2DecoderTest1, GetTexParameterfvValidArgs) {
1812 EXPECT_CALL(*gl_, GetError())
1813 .WillOnce(Return(GL_NO_ERROR))
1814 .WillOnce(Return(GL_NO_ERROR))
1815 .RetiresOnSaturation();
1816 SpecializedSetup<cmds::GetTexParameterfv, 0>(true);
1817 typedef cmds::GetTexParameterfv::Result Result;
1818 Result* result = static_cast<Result*>(shared_memory_address_);
1819 EXPECT_CALL(*gl_, GetTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,
1820 result->GetData()));
1821 result->size = 0;
1822 cmds::GetTexParameterfv cmd;
1823 cmd.Init(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, shared_memory_id_,
1824 shared_memory_offset_);
1825 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1826 EXPECT_EQ(
1827 decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_TEXTURE_MAG_FILTER),
1828 result->GetNumResults());
1829 EXPECT_EQ(GL_NO_ERROR, GetGLError());
1830 }
1831
1832 TEST_P(GLES2DecoderTest1, GetTexParameterfvInvalidArgs0_0) {
1833 EXPECT_CALL(*gl_, GetTexParameterfv(_, _, _)).Times(0);
1834 SpecializedSetup<cmds::GetTexParameterfv, 0>(false);
1835 cmds::GetTexParameterfv::Result* result =
1836 static_cast<cmds::GetTexParameterfv::Result*>(shared_memory_address_);
1837 result->size = 0;
1838 cmds::GetTexParameterfv cmd;
1839 cmd.Init(GL_PROXY_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, shared_memory_id_,
1840 shared_memory_offset_);
1841 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1842 EXPECT_EQ(0u, result->size);
1843 EXPECT_EQ(GL_INVALID_ENUM, GetGLError());
1844 }
1845
1846 TEST_P(GLES2DecoderTest1, GetTexParameterfvInvalidArgs1_0) {
1847 EXPECT_CALL(*gl_, GetTexParameterfv(_, _, _)).Times(0);
1848 SpecializedSetup<cmds::GetTexParameterfv, 0>(false);
1849 cmds::GetTexParameterfv::Result* result =
1850 static_cast<cmds::GetTexParameterfv::Result*>(shared_memory_address_);
1851 result->size = 0;
1852 cmds::GetTexParameterfv cmd;
1853 cmd.Init(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, shared_memory_id_,
1854 shared_memory_offset_);
1855 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1856 EXPECT_EQ(0u, result->size);
1857 EXPECT_EQ(GL_INVALID_ENUM, GetGLError());
1858 }
1859
1860 TEST_P(GLES2DecoderTest1, GetTexParameterfvInvalidArgs2_0) {
1861 EXPECT_CALL(*gl_, GetTexParameterfv(_, _, _)).Times(0);
1862 SpecializedSetup<cmds::GetTexParameterfv, 0>(false);
1863 cmds::GetTexParameterfv::Result* result =
1864 static_cast<cmds::GetTexParameterfv::Result*>(shared_memory_address_);
1865 result->size = 0;
1866 cmds::GetTexParameterfv cmd;
1867 cmd.Init(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, kInvalidSharedMemoryId, 0);
1868 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
1869 EXPECT_EQ(0u, result->size);
1870 }
1871
1872 TEST_P(GLES2DecoderTest1, GetTexParameterfvInvalidArgs2_1) {
1873 EXPECT_CALL(*gl_, GetTexParameterfv(_, _, _)).Times(0);
1874 SpecializedSetup<cmds::GetTexParameterfv, 0>(false);
1875 cmds::GetTexParameterfv::Result* result =
1876 static_cast<cmds::GetTexParameterfv::Result*>(shared_memory_address_);
1877 result->size = 0;
1878 cmds::GetTexParameterfv cmd;
1879 cmd.Init(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, shared_memory_id_,
1880 kInvalidSharedMemoryOffset);
1881 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
1882 EXPECT_EQ(0u, result->size);
1883 }
1884
1885 TEST_P(GLES2DecoderTest1, GetTexParameterivValidArgs) {
1886 EXPECT_CALL(*gl_, GetError())
1887 .WillOnce(Return(GL_NO_ERROR))
1888 .WillOnce(Return(GL_NO_ERROR))
1889 .RetiresOnSaturation();
1890 SpecializedSetup<cmds::GetTexParameteriv, 0>(true);
1891 typedef cmds::GetTexParameteriv::Result Result;
1892 Result* result = static_cast<Result*>(shared_memory_address_);
1893 EXPECT_CALL(*gl_, GetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,
1894 result->GetData()));
1895 result->size = 0;
1896 cmds::GetTexParameteriv cmd;
1897 cmd.Init(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, shared_memory_id_,
1898 shared_memory_offset_);
1899 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1900 EXPECT_EQ(
1901 decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_TEXTURE_MAG_FILTER),
1902 result->GetNumResults());
1903 EXPECT_EQ(GL_NO_ERROR, GetGLError());
1904 }
1905
1906 TEST_P(GLES2DecoderTest1, GetTexParameterivInvalidArgs0_0) {
1907 EXPECT_CALL(*gl_, GetTexParameteriv(_, _, _)).Times(0);
1908 SpecializedSetup<cmds::GetTexParameteriv, 0>(false);
1909 cmds::GetTexParameteriv::Result* result =
1910 static_cast<cmds::GetTexParameteriv::Result*>(shared_memory_address_);
1911 result->size = 0;
1912 cmds::GetTexParameteriv cmd;
1913 cmd.Init(GL_PROXY_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, shared_memory_id_,
1914 shared_memory_offset_);
1915 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1916 EXPECT_EQ(0u, result->size);
1917 EXPECT_EQ(GL_INVALID_ENUM, GetGLError());
1918 }
1919
1920 TEST_P(GLES2DecoderTest1, GetTexParameterivInvalidArgs1_0) {
1921 EXPECT_CALL(*gl_, GetTexParameteriv(_, _, _)).Times(0);
1922 SpecializedSetup<cmds::GetTexParameteriv, 0>(false);
1923 cmds::GetTexParameteriv::Result* result =
1924 static_cast<cmds::GetTexParameteriv::Result*>(shared_memory_address_);
1925 result->size = 0;
1926 cmds::GetTexParameteriv cmd;
1927 cmd.Init(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, shared_memory_id_,
1928 shared_memory_offset_);
1929 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1930 EXPECT_EQ(0u, result->size);
1931 EXPECT_EQ(GL_INVALID_ENUM, GetGLError());
1932 }
1933
1934 TEST_P(GLES2DecoderTest1, GetTexParameterivInvalidArgs2_0) {
1935 EXPECT_CALL(*gl_, GetTexParameteriv(_, _, _)).Times(0);
1936 SpecializedSetup<cmds::GetTexParameteriv, 0>(false);
1937 cmds::GetTexParameteriv::Result* result =
1938 static_cast<cmds::GetTexParameteriv::Result*>(shared_memory_address_);
1939 result->size = 0;
1940 cmds::GetTexParameteriv cmd;
1941 cmd.Init(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, kInvalidSharedMemoryId, 0);
1942 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
1943 EXPECT_EQ(0u, result->size);
1944 }
1945
1946 TEST_P(GLES2DecoderTest1, GetTexParameterivInvalidArgs2_1) {
1947 EXPECT_CALL(*gl_, GetTexParameteriv(_, _, _)).Times(0);
1948 SpecializedSetup<cmds::GetTexParameteriv, 0>(false);
1949 cmds::GetTexParameteriv::Result* result =
1950 static_cast<cmds::GetTexParameteriv::Result*>(shared_memory_address_);
1951 result->size = 0;
1952 cmds::GetTexParameteriv cmd;
1953 cmd.Init(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, shared_memory_id_,
1954 kInvalidSharedMemoryOffset);
1955 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
1956 EXPECT_EQ(0u, result->size);
1957 }
1958 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_1_AUTOGEN_H_ 1815 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_1_AUTOGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698