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_egl_api_implementation.h" | 9 #include "ui/gl/gl_egl_api_implementation.h" |
10 #include "ui/gl/gl_switches.h" | 10 #include "ui/gl/gl_switches.h" |
11 | 11 |
12 namespace gfx { | 12 namespace gl { |
13 | 13 |
14 class EGLApiTest : public testing::Test { | 14 class EGLApiTest : public testing::Test { |
15 public: | 15 public: |
16 void SetUp() override { | 16 void SetUp() override { |
17 fake_client_extension_string_ = ""; | 17 fake_client_extension_string_ = ""; |
18 fake_extension_string_ = ""; | 18 fake_extension_string_ = ""; |
19 | 19 |
20 // TODO(dyen): Add a way to bind mock drivers for testing. | 20 // TODO(dyen): Add a way to bind mock drivers for testing. |
21 g_driver_egl.ClearBindings(); | 21 g_driver_egl.ClearBindings(); |
22 g_driver_egl.fn.eglInitializeFn = &FakeInitialize; | 22 g_driver_egl.fn.eglInitializeFn = &FakeInitialize; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 | 131 |
132 base::CommandLine command_line(base::CommandLine::NO_PROGRAM); | 132 base::CommandLine command_line(base::CommandLine::NO_PROGRAM); |
133 command_line.AppendSwitchASCII(switches::kDisableGLExtensions, | 133 command_line.AppendSwitchASCII(switches::kDisableGLExtensions, |
134 kFakeDisabledExtensions); | 134 kFakeDisabledExtensions); |
135 InitializeAPI(&command_line); | 135 InitializeAPI(&command_line); |
136 | 136 |
137 EXPECT_STREQ(kFilteredClientExtensions, GetExtensions().first); | 137 EXPECT_STREQ(kFilteredClientExtensions, GetExtensions().first); |
138 EXPECT_STREQ(kFilteredExtensions, GetExtensions().second); | 138 EXPECT_STREQ(kFilteredExtensions, GetExtensions().second); |
139 } | 139 } |
140 | 140 |
141 } // namespace gfx | 141 } // namespace gl |
OLD | NEW |