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

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

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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 contains the mock GLES2Decoder class. 5 // This file contains the mock GLES2Decoder class.
6 6
7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ 7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_
8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ 8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 12 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
13 #include "base/callback.h" 13 #include "base/callback.h"
14 #include "testing/gmock/include/gmock/gmock.h" 14 #include "testing/gmock/include/gmock/gmock.h"
15 #include "ui/gfx/size.h" 15 #include "ui/gfx/size.h"
16 16
17 namespace gpu { 17 namespace gpu {
18 class GLContext; 18 class GLContext;
19 19
20 namespace gles2 { 20 namespace gles2 {
21 21
22 class ContextGroup; 22 class ContextGroup;
23 class MockGLES2Decoder : public GLES2Decoder { 23 class MockGLES2Decoder : public GLES2Decoder {
24 public: 24 public:
25 MockGLES2Decoder() 25 MockGLES2Decoder();
26 : GLES2Decoder() { 26 virtual ~MockGLES2Decoder();
27 ON_CALL(*this, GetCommandName(testing::_))
28 .WillByDefault(testing::Return(""));
29 ON_CALL(*this, MakeCurrent())
30 .WillByDefault(testing::Return(true));
31 }
32 27
33 MOCK_METHOD6(Initialize, bool(gfx::GLContext* context, 28 MOCK_METHOD6(Initialize, bool(gfx::GLContext* context,
34 const gfx::Size& size, 29 const gfx::Size& size,
35 const char* allowed_extensions, 30 const char* allowed_extensions,
36 const std::vector<int32>& attribs, 31 const std::vector<int32>& attribs,
37 GLES2Decoder* parent, 32 GLES2Decoder* parent,
38 uint32 parent_texture_id)); 33 uint32 parent_texture_id));
39 MOCK_METHOD0(Destroy, void()); 34 MOCK_METHOD0(Destroy, void());
40 MOCK_METHOD1(ResizeOffscreenFrameBuffer, void(const gfx::Size& size)); 35 MOCK_METHOD1(ResizeOffscreenFrameBuffer, void(const gfx::Size& size));
41 MOCK_METHOD0(UpdateOffscreenFrameBufferSize, bool()); 36 MOCK_METHOD0(UpdateOffscreenFrameBufferSize, bool());
(...skipping 11 matching lines...) Expand all
53 uint32* service_texture_id)); 48 uint32* service_texture_id));
54 MOCK_CONST_METHOD1(GetCommandName, const char*(unsigned int command_id)); 49 MOCK_CONST_METHOD1(GetCommandName, const char*(unsigned int command_id));
55 50
56 DISALLOW_COPY_AND_ASSIGN(MockGLES2Decoder); 51 DISALLOW_COPY_AND_ASSIGN(MockGLES2Decoder);
57 }; 52 };
58 53
59 } // namespace gles2 54 } // namespace gles2
60 } // namespace gpu 55 } // namespace gpu
61 56
62 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ 57 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698