Index: ui/gl/gl_context_mock_version.h |
diff --git a/ui/gl/gl_context_mock_version.h b/ui/gl/gl_context_mock_version.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..11b1a2c8fb20d6bcd7964044a2d42c6d10255dd1 |
--- /dev/null |
+++ b/ui/gl/gl_context_mock_version.h |
@@ -0,0 +1,29 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_GL_GL_CONTEXT_MOCK_VERSION_H_ |
+#define UI_GL_GL_CONTEXT_MOCK_VERSION_H_ |
+ |
+#include "ui/gl/gl_context_stub.h" |
+ |
+namespace gfx { |
+ |
+// A GLContext that only reports its version for unit tests. |
+class GL_EXPORT GLContextMockVersion : public GLContextStub { |
+ public: |
+ GLContextMockVersion(const char* version_str); |
+ |
+ protected: |
+ virtual std::string GetGLVersion() OVERRIDE; |
+ |
+ virtual ~GLContextMockVersion(); |
piman
2013/12/04 22:45:12
nit: blank line before 'private:'
oetuaho
2013/12/05 09:47:14
Done.
|
+ private: |
+ const char* version_str_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(GLContextMockVersion); |
+}; |
+ |
+} // namespace gfx |
+ |
+#endif // UI_GL_GL_CONTEXT_MOCK_VERSION_H_ |