1 // Copyright 2013 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.
10 #include "content/public/test/unittest_test_suite.h"
11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "ui/gl/gl_surface.h"
13 #include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h"
17 using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl;
19 class ContextTestBase : public testing::Test {
21 virtual void SetUp() {
22 blink::WebGraphicsContext3D::Attributes attributes;
23 bool lose_context_when_out_of_memory = false;
24 typedef WebGraphicsContext3DInProcessCommandBufferImpl WGC3DIPCBI;
25 context_ = WGC3DIPCBI::CreateOffscreenContext(
26 attributes, lose_context_when_out_of_memory);
27 context_->makeContextCurrent();
28 context_support_ = context_->GetContextSupport();
31 virtual void TearDown() {
36 scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> context_;
37 gpu::ContextSupport* context_support_;
42 // Include the actual tests.
43 #define CONTEXT_TEST_F TEST_F
44 #include "content/common/gpu/client/gpu_context_tests.h"