OLD | NEW |
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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "content/public/browser/gpu_data_manager.h" | 22 #include "content/public/browser/gpu_data_manager.h" |
23 #include "content/public/common/gpu_info.h" | 23 #include "content/public/common/gpu_info.h" |
24 #include "grit/generated_resources.h" | 24 #include "grit/generated_resources.h" |
25 #include "ui/base/l10n/l10n_util.h" | 25 #include "ui/base/l10n/l10n_util.h" |
26 #include "ui/gl/gl_switches.h" | 26 #include "ui/gl/gl_switches.h" |
27 | 27 |
28 namespace extensions { | 28 namespace extensions { |
29 | 29 |
30 class RequirementsCheckerBrowserTest : public ExtensionBrowserTest { | 30 class RequirementsCheckerBrowserTest : public ExtensionBrowserTest { |
31 public: | 31 public: |
32 void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 32 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
33 // In linux, we need to launch GPU process to decide if WebGL is allowed. | 33 // In linux, we need to launch GPU process to decide if WebGL is allowed. |
34 // Run it on top of osmesa to avoid bot driver issues. | 34 // Run it on top of osmesa to avoid bot driver issues. |
35 #if defined(OS_LINUX) | 35 #if defined(OS_LINUX) |
36 CHECK(test_launcher_utils::OverrideGLImplementation( | 36 CHECK(test_launcher_utils::OverrideGLImplementation( |
37 command_line, gfx::kGLImplementationOSMesaName)) << | 37 command_line, gfx::kGLImplementationOSMesaName)) << |
38 "kUseGL must not be set multiple times!"; | 38 "kUseGL must not be set multiple times!"; |
39 #endif | 39 #endif |
40 } | 40 } |
41 | 41 |
42 scoped_refptr<const Extension> LoadExtensionFromDirName( | 42 scoped_refptr<const Extension> LoadExtensionFromDirName( |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 LoadExtensionFromDirName("require_3d")); | 184 LoadExtensionFromDirName("require_3d")); |
185 ASSERT_TRUE(extension.get()); | 185 ASSERT_TRUE(extension.get()); |
186 | 186 |
187 checker_.Check(extension, base::Bind( | 187 checker_.Check(extension, base::Bind( |
188 &RequirementsCheckerBrowserTest::ValidateRequirementErrors, | 188 &RequirementsCheckerBrowserTest::ValidateRequirementErrors, |
189 base::Unretained(this), std::vector<std::string>())); | 189 base::Unretained(this), std::vector<std::string>())); |
190 content::BrowserThread::GetBlockingPool()->FlushForTesting(); | 190 content::BrowserThread::GetBlockingPool()->FlushForTesting(); |
191 } | 191 } |
192 | 192 |
193 } // extensions | 193 } // extensions |
OLD | NEW |