OLD | NEW |
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> | 5 #include <memory> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 #include "ui/gl/gl_implementation.h" | 9 #include "ui/gl/gl_implementation.h" |
10 #include "ui/gl/gl_surface_wgl.h" | 10 #include "ui/gl/gl_surface_wgl.h" |
11 #include "ui/gl/gl_wgl_api_implementation.h" | 11 #include "ui/gl/gl_wgl_api_implementation.h" |
12 | 12 |
13 typedef std::pair<std::string, std::string> stringpair; | 13 typedef std::pair<std::string, std::string> stringpair; |
14 | 14 |
15 namespace gfx { | 15 namespace gl { |
16 | 16 |
17 class WGLApiTest : public testing::Test { | 17 class WGLApiTest : public testing::Test { |
18 public: | 18 public: |
19 void SetUp() override { | 19 void SetUp() override { |
20 GLSurfaceWGL::InitializeOneOffForTesting(); | 20 GLSurfaceWGL::InitializeOneOffForTesting(); |
21 fake_arb_extension_string_ = ""; | 21 fake_arb_extension_string_ = ""; |
22 fake_ext_extension_string_ = ""; | 22 fake_ext_extension_string_ = ""; |
23 | 23 |
24 g_driver_wgl.ClearBindings(); | 24 g_driver_wgl.ClearBindings(); |
25 g_driver_wgl.fn.wglGetExtensionsStringARBFn = &FakeGetExtensionsStringARB; | 25 g_driver_wgl.fn.wglGetExtensionsStringARBFn = &FakeGetExtensionsStringARB; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 144 |
145 InitializeAPI(nullptr); | 145 InitializeAPI(nullptr); |
146 EXPECT_EQ(stringpair(kFakeExtensions, kFakeExtensions), | 146 EXPECT_EQ(stringpair(kFakeExtensions, kFakeExtensions), |
147 GetExtensions()); | 147 GetExtensions()); |
148 | 148 |
149 InitializeAPI(&command_line); | 149 InitializeAPI(&command_line); |
150 EXPECT_EQ(stringpair(kFilteredExtensions, kFilteredExtensions), | 150 EXPECT_EQ(stringpair(kFilteredExtensions, kFilteredExtensions), |
151 GetExtensions()); | 151 GetExtensions()); |
152 } | 152 } |
153 | 153 |
154 } // namespace gfx | 154 } // namespace gl |
OLD | NEW |