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

Side by Side Diff: ui/gl/glx_api_unittest.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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
« no previous file with comments | « ui/gl/gl_surface_x11.cc ('k') | ui/gl/gpu_switching_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <memory>
6
5 #include "base/command_line.h" 7 #include "base/command_line.h"
6 #include "base/memory/scoped_ptr.h"
7 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
8 #include "ui/gl/gl_glx_api_implementation.h" 9 #include "ui/gl/gl_glx_api_implementation.h"
9 #include "ui/gl/gl_implementation.h" 10 #include "ui/gl/gl_implementation.h"
10 11
11 namespace gfx { 12 namespace gfx {
12 13
13 class GLXApiTest : public testing::Test { 14 class GLXApiTest : public testing::Test {
14 public: 15 public:
15 void SetUp() override { 16 void SetUp() override {
16 fake_extension_string_ = ""; 17 fake_extension_string_ = "";
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 } 65 }
65 66
66 static const char* GL_BINDING_CALL FakeQueryExtensionsString(Display* dpy, 67 static const char* GL_BINDING_CALL FakeQueryExtensionsString(Display* dpy,
67 int screen) { 68 int screen) {
68 return fake_extension_string_; 69 return fake_extension_string_;
69 } 70 }
70 71
71 protected: 72 protected:
72 static const char* fake_extension_string_; 73 static const char* fake_extension_string_;
73 74
74 scoped_ptr<RealGLXApi> api_; 75 std::unique_ptr<RealGLXApi> api_;
75 }; 76 };
76 77
77 const char* GLXApiTest::fake_extension_string_ = ""; 78 const char* GLXApiTest::fake_extension_string_ = "";
78 79
79 TEST_F(GLXApiTest, DisabledExtensionBitTest) { 80 TEST_F(GLXApiTest, DisabledExtensionBitTest) {
80 static const char* kFakeExtensions = "GLX_ARB_create_context"; 81 static const char* kFakeExtensions = "GLX_ARB_create_context";
81 static const char* kFakeDisabledExtensions = "GLX_ARB_create_context"; 82 static const char* kFakeDisabledExtensions = "GLX_ARB_create_context";
82 83
83 SetFakeExtensionString(kFakeExtensions); 84 SetFakeExtensionString(kFakeExtensions);
84 InitializeAPI(nullptr); 85 InitializeAPI(nullptr);
(...skipping 22 matching lines...) Expand all
107 108
108 base::CommandLine command_line(base::CommandLine::NO_PROGRAM); 109 base::CommandLine command_line(base::CommandLine::NO_PROGRAM);
109 command_line.AppendSwitchASCII(switches::kDisableGLExtensions, 110 command_line.AppendSwitchASCII(switches::kDisableGLExtensions,
110 kFakeDisabledExtensions); 111 kFakeDisabledExtensions);
111 InitializeAPI(&command_line); 112 InitializeAPI(&command_line);
112 113
113 EXPECT_STREQ(kFilteredExtensions, GetExtensions()); 114 EXPECT_STREQ(kFilteredExtensions, GetExtensions());
114 } 115 }
115 116
116 } // namespace gfx 117 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_x11.cc ('k') | ui/gl/gpu_switching_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698