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_glx_api_implementation.h" | 9 #include "ui/gl/gl_glx_api_implementation.h" |
10 #include "ui/gl/gl_implementation.h" | 10 #include "ui/gl/gl_implementation.h" |
11 | 11 |
12 namespace gfx { | 12 namespace gl { |
13 | 13 |
14 class GLXApiTest : public testing::Test { | 14 class GLXApiTest : public testing::Test { |
15 public: | 15 public: |
16 void SetUp() override { | 16 void SetUp() override { |
17 fake_extension_string_ = ""; | 17 fake_extension_string_ = ""; |
18 | 18 |
19 g_driver_glx.ClearBindings(); | 19 g_driver_glx.ClearBindings(); |
20 g_driver_glx.fn.glXQueryExtensionsStringFn = &FakeQueryExtensionsString; | 20 g_driver_glx.fn.glXQueryExtensionsStringFn = &FakeQueryExtensionsString; |
21 SetGLImplementation(kGLImplementationMockGL); | 21 SetGLImplementation(kGLImplementationMockGL); |
22 SetGLGetProcAddressProc( | 22 SetGLGetProcAddressProc( |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 EXPECT_STREQ(kFakeExtensions, GetExtensions()); | 107 EXPECT_STREQ(kFakeExtensions, GetExtensions()); |
108 | 108 |
109 base::CommandLine command_line(base::CommandLine::NO_PROGRAM); | 109 base::CommandLine command_line(base::CommandLine::NO_PROGRAM); |
110 command_line.AppendSwitchASCII(switches::kDisableGLExtensions, | 110 command_line.AppendSwitchASCII(switches::kDisableGLExtensions, |
111 kFakeDisabledExtensions); | 111 kFakeDisabledExtensions); |
112 InitializeAPI(&command_line); | 112 InitializeAPI(&command_line); |
113 | 113 |
114 EXPECT_STREQ(kFilteredExtensions, GetExtensions()); | 114 EXPECT_STREQ(kFilteredExtensions, GetExtensions()); |
115 } | 115 } |
116 | 116 |
117 } // namespace gfx | 117 } // namespace gl |
OLD | NEW |