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

Side by Side Diff: content/common/gpu/client/gpu_in_process_context_tests.cc

Issue 1867873002: Move unittests in content/common/gpu/client to gpu/ipc/client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 years, 7 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
OLDNEW
(Empty)
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.
4
5 #include <stdio.h>
6
7 #include <cmath>
8 #include <memory>
9 #include <string>
10 #include <vector>
11
12 #include "gpu/command_buffer/client/gl_in_process_context.h"
13 #include "gpu/command_buffer/client/gles2_implementation.h"
14 #include "gpu/command_buffer/client/shared_memory_limits.h"
15 #include "testing/gtest/include/gtest/gtest.h"
16 #include "ui/gl/gl_surface.h"
17
18 namespace {
19
20 class ContextTestBase : public testing::Test {
21 public:
22 void SetUp() override {
23 gpu::gles2::ContextCreationAttribHelper attributes;
24 attributes.alpha_size = 8;
25 attributes.depth_size = 24;
26 attributes.red_size = 8;
27 attributes.green_size = 8;
28 attributes.blue_size = 8;
29 attributes.stencil_size = 8;
30 attributes.samples = 4;
31 attributes.sample_buffers = 1;
32 attributes.bind_generates_resource = false;
33
34 context_.reset(gpu::GLInProcessContext::Create(
35 nullptr, /* service */
36 nullptr, /* surface */
37 true, /* offscreen */
38 gfx::kNullAcceleratedWidget, /* window */
39 gfx::Size(1, 1), /* size */
40 nullptr, /* share_context */
41 attributes, gfx::PreferDiscreteGpu, gpu::SharedMemoryLimits(),
42 nullptr, /* gpu_memory_buffer_manager */
43 nullptr /* image_factory */));
44 gl_ = context_->GetImplementation();
45 context_support_ = context_->GetImplementation();
46 }
47
48 void TearDown() override { context_.reset(NULL); }
49
50 protected:
51 gpu::gles2::GLES2Interface* gl_;
52 gpu::ContextSupport* context_support_;
53
54 private:
55 std::unique_ptr<gpu::GLInProcessContext> context_;
56 };
57
58 } // namespace
59
60 // Include the actual tests.
61 #define CONTEXT_TEST_F TEST_F
62 #include "content/common/gpu/client/gpu_context_tests.h"
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698