Infobar material design refresh: bg color
[chromium-blink-merge.git] / gpu / command_buffer / service / gpu_service_test.h
blob7c9c9782f323ad7a7f26e8b8391f06e9bc0fb707
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
3 // found in the LICENSE file.
5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_SERVICE_TEST_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_SERVICE_TEST_H_
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "testing/gmock/include/gmock/gmock.h"
11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "ui/gl/gl_mock.h"
14 namespace gfx {
15 class GLContextStubWithExtensions;
18 namespace gpu {
19 namespace gles2 {
21 // Base class for tests that need mock GL bindings.
22 class GpuServiceTest : public testing::Test {
23 public:
24 GpuServiceTest();
25 ~GpuServiceTest() override;
27 protected:
28 void SetUpWithGLVersion(const char* gl_version, const char* gl_extensions);
29 void SetUp() override;
30 void TearDown() override;
31 gfx::GLContext* GetGLContext();
33 scoped_ptr< ::testing::StrictMock< ::gfx::MockGLInterface> > gl_;
35 private:
36 bool ran_setup_;
37 bool ran_teardown_;
38 scoped_refptr<gfx::GLContextStubWithExtensions> context_;
41 } // namespace gles2
42 } // namespace gpu
44 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_SERVICE_TEST_H_