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

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

Issue 6250198: More out-of-lining of test code, along with a bunch of GMOCK objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really fix the gyp files this time Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_base.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 14 matching lines...) Expand all
25 using ::testing::Pointee; 25 using ::testing::Pointee;
26 using ::testing::Return; 26 using ::testing::Return;
27 using ::testing::SetArrayArgument; 27 using ::testing::SetArrayArgument;
28 using ::testing::SetArgumentPointee; 28 using ::testing::SetArgumentPointee;
29 using ::testing::StrEq; 29 using ::testing::StrEq;
30 using ::testing::StrictMock; 30 using ::testing::StrictMock;
31 31
32 namespace gpu { 32 namespace gpu {
33 namespace gles2 { 33 namespace gles2 {
34 34
35 GLES2DecoderTestBase::GLES2DecoderTestBase()
36 : client_buffer_id_(100),
37 client_framebuffer_id_(101),
38 client_program_id_(102),
39 client_renderbuffer_id_(103),
40 client_shader_id_(104),
41 client_texture_id_(106),
42 client_element_buffer_id_(107) {
43 memset(immediate_buffer_, 0xEE, sizeof(immediate_buffer_));
44 }
45
46 GLES2DecoderTestBase::~GLES2DecoderTestBase() {}
47
35 void GLES2DecoderTestBase::SetUp() { 48 void GLES2DecoderTestBase::SetUp() {
36 InitDecoder(""); 49 InitDecoder("");
37 } 50 }
38 51
39 void GLES2DecoderTestBase::InitDecoder(const char* extensions) { 52 void GLES2DecoderTestBase::InitDecoder(const char* extensions) {
40 gl_.reset(new StrictMock<MockGLInterface>()); 53 gl_.reset(new StrictMock<MockGLInterface>());
41 ::gfx::GLInterface::SetGLInterface(gl_.get()); 54 ::gfx::GLInterface::SetGLInterface(gl_.get());
42 group_ = ContextGroup::Ref(new ContextGroup()); 55 group_ = ContextGroup::Ref(new ContextGroup());
43 56
44 InSequence sequence; 57 InSequence sequence;
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 797
785 const char* GLES2DecoderWithShaderTestBase::kAttrib1Name = "attrib1"; 798 const char* GLES2DecoderWithShaderTestBase::kAttrib1Name = "attrib1";
786 const char* GLES2DecoderWithShaderTestBase::kAttrib2Name = "attrib2"; 799 const char* GLES2DecoderWithShaderTestBase::kAttrib2Name = "attrib2";
787 const char* GLES2DecoderWithShaderTestBase::kAttrib3Name = "attrib3"; 800 const char* GLES2DecoderWithShaderTestBase::kAttrib3Name = "attrib3";
788 const char* GLES2DecoderWithShaderTestBase::kUniform1Name = "uniform1"; 801 const char* GLES2DecoderWithShaderTestBase::kUniform1Name = "uniform1";
789 const char* GLES2DecoderWithShaderTestBase::kUniform2Name = "uniform2[0]"; 802 const char* GLES2DecoderWithShaderTestBase::kUniform2Name = "uniform2[0]";
790 const char* GLES2DecoderWithShaderTestBase::kUniform3Name = "uniform3[0]"; 803 const char* GLES2DecoderWithShaderTestBase::kUniform3Name = "uniform3[0]";
791 804
792 } // namespace gles2 805 } // namespace gles2
793 } // namespace gpu 806 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698