summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorzmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-13 05:06:08 +0000
committerzmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-13 05:06:08 +0000
commit830631c03aaeb418faf2dac3cf9e8424a84d8d0d (patch)
treee85eec947944417ae14bca5b82bcdfae105200cd /chrome/test
parent0ebd5f48f8af65401e916be4ead925d1c51277b1 (diff)
downloadchromium_src-830631c03aaeb418faf2dac3cf9e8424a84d8d0d.zip
chromium_src-830631c03aaeb418faf2dac3cf9e8424a84d8d0d.tar.gz
chromium_src-830631c03aaeb418faf2dac3cf9e8424a84d8d0d.tar.bz2
Add a static function for easy test bot config specification.
BUG= TEST=gpu related tests R=jbates Review URL: https://chromiumcodereview.appspot.com/10545144 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141858 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/gpu/gpu_feature_browsertest.cc41
1 files changed, 7 insertions, 34 deletions
diff --git a/chrome/test/gpu/gpu_feature_browsertest.cc b/chrome/test/gpu/gpu_feature_browsertest.cc
index f6aa6ab..0cace7a 100644
--- a/chrome/test/gpu/gpu_feature_browsertest.cc
+++ b/chrome/test/gpu/gpu_feature_browsertest.cc
@@ -253,39 +253,22 @@ IN_PROC_BROWSER_TEST_F(GpuFeatureTest, MultisamplingAllowed) {
if (use_gl == gfx::kGLImplementationOSMesaName)
return;
-#if defined(OS_LINUX) || defined(OS_MACOSX)
// Linux Intel uses mesa driver, where multisampling is not supported.
// Multisampling is also not supported on virtualized mac os.
- GPUTestBotConfig test_bot;
- test_bot.LoadCurrentConfig(NULL);
-
- const std::vector<uint32>& gpu_vendor = test_bot.gpu_vendor();
-#if defined(OS_LINUX)
- if (gpu_vendor.size() == 1 && gpu_vendor[0] == 0x8086)
- return;
-#endif // defined(OS_LINUX)
-
-#if defined(OS_MACOSX)
- if (gpu_vendor.size() == 1 && gpu_vendor[0] == 0x15AD)
+ std::vector<std::string> configs;
+ configs.push_back("LINUX INTEL");
+ configs.push_back("MAC VMWARE");
+ if (GPUTestBotConfig::CurrentConfigMatches(configs))
return;
-#endif // defined(OS_MACOSX)
-
-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
const FilePath url(FILE_PATH_LITERAL("feature_multisampling.html"));
RunTest(url, "\"TRUE\"", true);
}
IN_PROC_BROWSER_TEST_F(GpuFeatureTest, MultisamplingBlocked) {
-#if defined(OS_MACOSX)
// Multisampling fails on virtualized mac os.
- GPUTestBotConfig test_bot;
- test_bot.LoadCurrentConfig(NULL);
-
- const std::vector<uint32>& gpu_vendor = test_bot.gpu_vendor();
- if (gpu_vendor.size() == 1 && gpu_vendor[0] == 0x15AD)
+ if (GPUTestBotConfig::CurrentConfigMatches("MAC VMWARE"))
return;
-#endif
const std::string json_blacklist =
"{\n"
@@ -317,28 +300,18 @@ class WebGLMultisamplingTest : public GpuFeatureTest {
};
IN_PROC_BROWSER_TEST_F(WebGLMultisamplingTest, MultisamplingDisabled) {
-#if defined(OS_MACOSX)
// Multisampling fails on virtualized mac os.
- GPUTestBotConfig test_bot;
- test_bot.LoadCurrentConfig(NULL);
-
- const std::vector<uint32>& gpu_vendor = test_bot.gpu_vendor();
- if (gpu_vendor.size() == 1 && gpu_vendor[0] == 0x15AD)
+ if (GPUTestBotConfig::CurrentConfigMatches("MAC VMWARE"))
return;
-#endif
const FilePath url(FILE_PATH_LITERAL("feature_multisampling.html"));
RunTest(url, "\"FALSE\"", true);
}
IN_PROC_BROWSER_TEST_F(GpuFeatureTest, Canvas2DAllowed) {
-#if defined(OS_WIN)
// Accelerated canvas 2D is not supported on XP.
- GPUTestBotConfig test_bot;
- test_bot.LoadCurrentConfig(NULL);
- if (test_bot.os() == GPUTestConfig::kOsWinXP)
+ if (GPUTestBotConfig::CurrentConfigMatches("XP"))
return;
-#endif
GpuFeatureType type = GpuDataManager::GetInstance()->GetGpuFeatureType();
EXPECT_EQ(type, 0);