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

Side by Side Diff: ui/gl/wgl_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/test/gl_test_helper.cc ('k') | ui/keyboard/content/keyboard_ui_content.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_implementation.h" 9 #include "ui/gl/gl_implementation.h"
9 #include "ui/gl/gl_surface_wgl.h" 10 #include "ui/gl/gl_surface_wgl.h"
10 #include "ui/gl/gl_wgl_api_implementation.h" 11 #include "ui/gl/gl_wgl_api_implementation.h"
11 12
12 typedef std::pair<std::string, std::string> stringpair; 13 typedef std::pair<std::string, std::string> stringpair;
13 14
14 namespace gfx { 15 namespace gfx {
15 16
16 class WGLApiTest : public testing::Test { 17 class WGLApiTest : public testing::Test {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } 74 }
74 75
75 static const char* GL_BINDING_CALL FakeGetExtensionsStringEXT() { 76 static const char* GL_BINDING_CALL FakeGetExtensionsStringEXT() {
76 return fake_ext_extension_string_; 77 return fake_ext_extension_string_;
77 } 78 }
78 79
79 protected: 80 protected:
80 static const char* fake_ext_extension_string_; 81 static const char* fake_ext_extension_string_;
81 static const char* fake_arb_extension_string_; 82 static const char* fake_arb_extension_string_;
82 83
83 scoped_ptr<RealWGLApi> api_; 84 std::unique_ptr<RealWGLApi> api_;
84 }; 85 };
85 86
86 const char* WGLApiTest::fake_ext_extension_string_ = ""; 87 const char* WGLApiTest::fake_ext_extension_string_ = "";
87 const char* WGLApiTest::fake_arb_extension_string_ = ""; 88 const char* WGLApiTest::fake_arb_extension_string_ = "";
88 89
89 TEST_F(WGLApiTest, DisabledExtensionBitTest) { 90 TEST_F(WGLApiTest, DisabledExtensionBitTest) {
90 static const char* kFakeExtensions = "WGL_ARB_extensions_string"; 91 static const char* kFakeExtensions = "WGL_ARB_extensions_string";
91 static const char* kFakeDisabledExtensions = "WGL_ARB_extensions_string"; 92 static const char* kFakeDisabledExtensions = "WGL_ARB_extensions_string";
92 93
93 InitializeAPI(nullptr); 94 InitializeAPI(nullptr);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 InitializeAPI(nullptr); 145 InitializeAPI(nullptr);
145 EXPECT_EQ(stringpair(kFakeExtensions, kFakeExtensions), 146 EXPECT_EQ(stringpair(kFakeExtensions, kFakeExtensions),
146 GetExtensions()); 147 GetExtensions());
147 148
148 InitializeAPI(&command_line); 149 InitializeAPI(&command_line);
149 EXPECT_EQ(stringpair(kFilteredExtensions, kFilteredExtensions), 150 EXPECT_EQ(stringpair(kFilteredExtensions, kFilteredExtensions),
150 GetExtensions()); 151 GetExtensions());
151 } 152 }
152 153
153 } // namespace gfx 154 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/test/gl_test_helper.cc ('k') | ui/keyboard/content/keyboard_ui_content.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698