Supervised user whitelists: Cleanup
[chromium-blink-merge.git] / content / common / gpu / client / gpu_in_process_context_tests.cc
blob6e740572211a8eb4d73fcd609fb062dc7fdb5229
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.
5 #include <stdio.h>
6 #include <cmath>
7 #include <string>
8 #include <vector>
10 #include "content/public/test/unittest_test_suite.h"
11 #include "gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.h"
12 #include "testing/gtest/include/gtest/gtest.h"
13 #include "ui/gl/gl_surface.h"
15 namespace {
17 using gpu_blink::WebGraphicsContext3DInProcessCommandBufferImpl;
19 class ContextTestBase : public testing::Test {
20 public:
21 void SetUp() override {
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_->InitializeOnCurrentThread();
28 context_support_ = context_->GetContextSupport();
31 void TearDown() override { context_.reset(NULL); }
33 protected:
34 scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> context_;
35 gpu::ContextSupport* context_support_;
38 } // namespace
40 // Include the actual tests.
41 #define CONTEXT_TEST_F TEST_F
42 #include "content/common/gpu/client/gpu_context_tests.h"