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

Unified Diff: chrome/test/gpu/gpu_feature_browsertest.cc

Issue 10944037: Add field trial for enabling Stage3D in XP (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix browser_tests Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chrome_gpu_util.cc ('k') | content/browser/gpu/gpu_data_manager_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/gpu/gpu_feature_browsertest.cc
diff --git a/chrome/test/gpu/gpu_feature_browsertest.cc b/chrome/test/gpu/gpu_feature_browsertest.cc
index 09355eabc8e1353e27ba8715ef1bb11f430f982b..78da1a2588ee76f09be647ea35f99ee17e486559 100644
--- a/chrome/test/gpu/gpu_feature_browsertest.cc
+++ b/chrome/test/gpu/gpu_feature_browsertest.cc
@@ -29,6 +29,10 @@
#include "ui/surface/io_surface_support_mac.h"
#endif
+#if defined(OS_WIN)
+#include "base/win/windows_version.h"
+#endif
+
using content::GpuDataManager;
using content::GpuFeatureType;
using trace_analyzer::Query;
@@ -177,6 +181,16 @@ IN_PROC_BROWSER_TEST_F(GpuFeatureTest, AcceleratedCompositingAllowed) {
RunTest(url, EXPECT_GPU_SWAP_BUFFERS);
}
+// Flash Stage3D may be blacklisted for other reasons on XP, so ignore it.
+GpuFeatureType IgnoreGpuFeatures(GpuFeatureType type) {
+#if defined(OS_WIN)
+ if (base::win::GetVersion() < base::win::VERSION_VISTA)
+ return static_cast<GpuFeatureType>(type &
+ ~content::GPU_FEATURE_TYPE_FLASH_STAGE3D);
+#endif
+ return type;
+}
+
IN_PROC_BROWSER_TEST_F(GpuFeatureTest, AcceleratedCompositingBlocked) {
const std::string json_blacklist =
"{\n"
@@ -194,6 +208,7 @@ IN_PROC_BROWSER_TEST_F(GpuFeatureTest, AcceleratedCompositingBlocked) {
SetupBlacklist(json_blacklist);
GpuFeatureType type =
GpuDataManager::GetInstance()->GetBlacklistedFeatures();
+ type = IgnoreGpuFeatures(type);
EXPECT_EQ(type, content::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING);
const FilePath url(FILE_PATH_LITERAL("feature_compositing.html"));
@@ -240,6 +255,7 @@ IN_PROC_BROWSER_TEST_F(GpuFeatureTest, WebGLBlocked) {
SetupBlacklist(json_blacklist);
GpuFeatureType type =
GpuDataManager::GetInstance()->GetBlacklistedFeatures();
+ type = IgnoreGpuFeatures(type);
EXPECT_EQ(type, content::GPU_FEATURE_TYPE_WEBGL);
const FilePath url(FILE_PATH_LITERAL("feature_webgl.html"));
@@ -306,6 +322,7 @@ IN_PROC_BROWSER_TEST_F(GpuFeatureTest, MultisamplingBlocked) {
SetupBlacklist(json_blacklist);
GpuFeatureType type =
GpuDataManager::GetInstance()->GetBlacklistedFeatures();
+ type = IgnoreGpuFeatures(type);
EXPECT_EQ(type, content::GPU_FEATURE_TYPE_MULTISAMPLING);
const FilePath url(FILE_PATH_LITERAL("feature_multisampling.html"));
@@ -359,6 +376,7 @@ IN_PROC_BROWSER_TEST_F(GpuFeatureTest, Canvas2DBlocked) {
SetupBlacklist(json_blacklist);
GpuFeatureType type =
GpuDataManager::GetInstance()->GetBlacklistedFeatures();
+ type = IgnoreGpuFeatures(type);
EXPECT_EQ(type, content::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS);
const FilePath url(FILE_PATH_LITERAL("feature_canvas2d.html"));
« no previous file with comments | « chrome/browser/chrome_gpu_util.cc ('k') | content/browser/gpu/gpu_data_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698