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

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

Issue 1203513004: Respect the disabled extension list during binding initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 5 years, 6 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 | « no previous file | ui/gl/generate_bindings.py » ('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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "ui/gl/gl_egl_api_implementation.h" 8 #include "ui/gl/gl_egl_api_implementation.h"
9 #include "ui/gl/gl_switches.h" 9 #include "ui/gl/gl_switches.h"
10 10
(...skipping 21 matching lines...) Expand all
32 fake_extension_string_ = ""; 32 fake_extension_string_ = "";
33 } 33 }
34 34
35 void InitializeAPI(base::CommandLine* command_line) { 35 void InitializeAPI(base::CommandLine* command_line) {
36 api_.reset(new RealEGLApi()); 36 api_.reset(new RealEGLApi());
37 g_current_egl_context = api_.get(); 37 g_current_egl_context = api_.get();
38 if (command_line) 38 if (command_line)
39 api_->InitializeWithCommandLine(&g_driver_egl, command_line); 39 api_->InitializeWithCommandLine(&g_driver_egl, command_line);
40 else 40 else
41 api_->Initialize(&g_driver_egl); 41 api_->Initialize(&g_driver_egl);
42 api_->InitializeFilteredExtensions();
43 } 42 }
44 43
45 void SetFakeExtensionString(const char* fake_string) { 44 void SetFakeExtensionString(const char* fake_string) {
46 fake_extension_string_ = fake_string; 45 fake_extension_string_ = fake_string;
47 } 46 }
48 47
49 static EGLBoolean GL_BINDING_CALL FakeInitialize(EGLDisplay display, 48 static EGLBoolean GL_BINDING_CALL FakeInitialize(EGLDisplay display,
50 EGLint * major, 49 EGLint * major,
51 EGLint * minor) { 50 EGLint * minor) {
52 return EGL_TRUE; 51 return EGL_TRUE;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 95
97 base::CommandLine command_line(base::CommandLine::NO_PROGRAM); 96 base::CommandLine command_line(base::CommandLine::NO_PROGRAM);
98 command_line.AppendSwitchASCII(switches::kDisableGLExtensions, 97 command_line.AppendSwitchASCII(switches::kDisableGLExtensions,
99 kFakeDisabledExtensions); 98 kFakeDisabledExtensions);
100 InitializeAPI(&command_line); 99 InitializeAPI(&command_line);
101 100
102 EXPECT_STREQ(kFilteredExtensions, GetExtensions()); 101 EXPECT_STREQ(kFilteredExtensions, GetExtensions());
103 } 102 }
104 103
105 } // namespace gfx 104 } // namespace gfx
OLDNEW
« no previous file with comments | « no previous file | ui/gl/generate_bindings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698