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

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

Issue 1129693004: Disabled extensions in bug list now automatically removes the extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added InitializeWithContext() call to unit test Created 5 years, 7 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 | « gpu/config/gpu_driver_bug_list_json.cc ('k') | ui/gl/gl_gl_api_implementation.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 "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_gl_api_implementation.h" 8 #include "ui/gl/gl_gl_api_implementation.h"
9 #include "ui/gl/gl_implementation.h" 9 #include "ui/gl/gl_implementation.h"
10 #include "ui/gl/gl_switches.h" 10 #include "ui/gl/gl_switches.h"
(...skipping 24 matching lines...) Expand all
35 num_fake_extension_strings_ = 0; 35 num_fake_extension_strings_ = 0;
36 fake_extension_strings_ = nullptr; 36 fake_extension_strings_ = nullptr;
37 } 37 }
38 38
39 void InitializeAPI(base::CommandLine* command_line) { 39 void InitializeAPI(base::CommandLine* command_line) {
40 api_.reset(new RealGLApi()); 40 api_.reset(new RealGLApi());
41 if (command_line) 41 if (command_line)
42 api_->InitializeWithCommandLine(driver_.get(), command_line); 42 api_->InitializeWithCommandLine(driver_.get(), command_line);
43 else 43 else
44 api_->Initialize(driver_.get()); 44 api_->Initialize(driver_.get());
45 api_->InitializeWithContext();
45 } 46 }
46 47
47 void SetFakeExtensionString(const char* fake_string) { 48 void SetFakeExtensionString(const char* fake_string) {
48 SetGLImplementation(kGLImplementationDesktopGL); 49 SetGLImplementation(kGLImplementationDesktopGL);
49 fake_extension_string_ = fake_string; 50 fake_extension_string_ = fake_string;
50 } 51 }
51 52
52 void SetFakeExtensionStrings(const char** fake_strings, uint32_t count) { 53 void SetFakeExtensionStrings(const char** fake_strings, uint32_t count) {
53 SetGLImplementation(kGLImplementationDesktopGLCoreProfile); 54 SetGLImplementation(kGLImplementationDesktopGLCoreProfile);
54 num_fake_extension_strings_ = count; 55 num_fake_extension_strings_ = count;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 kFakeDisabledExtensions); 145 kFakeDisabledExtensions);
145 InitializeAPI(&command_line); 146 InitializeAPI(&command_line);
146 147
147 EXPECT_EQ(arraysize(kFilteredExtensions), GetNumExtensions()); 148 EXPECT_EQ(arraysize(kFilteredExtensions), GetNumExtensions());
148 for (uint32_t i = 0; i < arraysize(kFilteredExtensions); ++i) { 149 for (uint32_t i = 0; i < arraysize(kFilteredExtensions); ++i) {
149 EXPECT_STREQ(kFilteredExtensions[i], GetExtensioni(i)); 150 EXPECT_STREQ(kFilteredExtensions[i], GetExtensioni(i));
150 } 151 }
151 } 152 }
152 153
153 } // namespace gpu 154 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/config/gpu_driver_bug_list_json.cc ('k') | ui/gl/gl_gl_api_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698