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

Side by Side Diff: chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc

Issue 10984040: Enable gpu crash tests in content (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: refine Created 8 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <vector> 5 #include <vector>
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 11 matching lines...) Expand all
22 #include "chrome/browser/ui/browser_tabstrip.h" 22 #include "chrome/browser/ui/browser_tabstrip.h"
23 #include "chrome/common/chrome_notification_types.h" 23 #include "chrome/common/chrome_notification_types.h"
24 #include "chrome/common/chrome_switches.h" 24 #include "chrome/common/chrome_switches.h"
25 #include "chrome/test/base/test_launcher_utils.h" 25 #include "chrome/test/base/test_launcher_utils.h"
26 #include "chrome/test/base/ui_test_utils.h" 26 #include "chrome/test/base/ui_test_utils.h"
27 #include "content/public/browser/gpu_data_manager.h" 27 #include "content/public/browser/gpu_data_manager.h"
28 #include "content/public/browser/notification_observer.h" 28 #include "content/public/browser/notification_observer.h"
29 #include "content/public/browser/notification_registrar.h" 29 #include "content/public/browser/notification_registrar.h"
30 #include "content/public/common/gpu_info.h" 30 #include "content/public/common/gpu_info.h"
31 #include "content/public/test/browser_test_utils.h" 31 #include "content/public/test/browser_test_utils.h"
32 #include "content/public/test/test_launcher_utils.h"
32 #include "net/base/mock_host_resolver.h" 33 #include "net/base/mock_host_resolver.h"
33 #include "ui/gl/gl_switches.h" 34 #include "ui/gl/gl_switches.h"
34 35
35 using content::GpuFeatureType; 36 using content::GpuFeatureType;
36 37
37 namespace utils = extension_function_test_utils; 38 namespace utils = extension_function_test_utils;
38 39
39 namespace extensions { 40 namespace extensions {
40 41
41 namespace { 42 namespace {
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 private: 232 private:
232 std::vector<FilePath> test_crx_; 233 std::vector<FilePath> test_crx_;
233 }; 234 };
234 235
235 class ExtensionWebstoreGetWebGLStatusTest : public InProcessBrowserTest { 236 class ExtensionWebstoreGetWebGLStatusTest : public InProcessBrowserTest {
236 public: 237 public:
237 void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 238 void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
238 // In linux, we need to launch GPU process to decide if WebGL is allowed. 239 // In linux, we need to launch GPU process to decide if WebGL is allowed.
239 // Run it on top of osmesa to avoid bot driver issues. 240 // Run it on top of osmesa to avoid bot driver issues.
240 #if defined(OS_LINUX) 241 #if defined(OS_LINUX)
241 CHECK(test_launcher_utils::OverrideGLImplementation( 242 CHECK(content::OverrideGLImplementation(
242 command_line, gfx::kGLImplementationOSMesaName)) << 243 command_line, gfx::kGLImplementationOSMesaName)) <<
243 "kUseGL must not be set multiple times!"; 244 "kUseGL must not be set multiple times!";
244 #endif 245 #endif
245 } 246 }
246 247
247 protected: 248 protected:
248 void RunTest(bool webgl_allowed) { 249 void RunTest(bool webgl_allowed) {
249 static const char kEmptyArgs[] = "[]"; 250 static const char kEmptyArgs[] = "[]";
250 static const char kWebGLStatusAllowed[] = "webgl_allowed"; 251 static const char kWebGLStatusAllowed[] = "webgl_allowed";
251 static const char kWebGLStatusBlocked[] = "webgl_blocked"; 252 static const char kWebGLStatusBlocked[] = "webgl_blocked";
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 GpuFeatureType type = 471 GpuFeatureType type =
471 content::GpuDataManager::GetInstance()->GetBlacklistedFeatures(); 472 content::GpuDataManager::GetInstance()->GetBlacklistedFeatures();
472 EXPECT_EQ((type & content::GPU_FEATURE_TYPE_WEBGL), 473 EXPECT_EQ((type & content::GPU_FEATURE_TYPE_WEBGL),
473 content::GPU_FEATURE_TYPE_WEBGL); 474 content::GPU_FEATURE_TYPE_WEBGL);
474 475
475 bool webgl_allowed = false; 476 bool webgl_allowed = false;
476 RunTest(webgl_allowed); 477 RunTest(webgl_allowed);
477 } 478 }
478 479
479 } // namespace extensions 480 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/browser_tag_browsertest.cc » ('j') | content/public/test/test_launcher_utils.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698