X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fcontent%2Fbrowser%2Fgpu%2Fgpu_data_manager_impl_private_unittest.cc;h=661e506f902532e33be48e208d9df2ce565e2a0c;hb=3545e9f2671f595d2a2f3ee75ca0393b01e35ef6;hp=41458edb5e92e46ac016e48d14bca3788cd50af3;hpb=7d210d4c7e9ba36e635eabc5b5780495f8a63292;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/content/browser/gpu/gpu_data_manager_impl_private_unittest.cc b/src/content/browser/gpu/gpu_data_manager_impl_private_unittest.cc index 41458ed..661e506 100644 --- a/src/content/browser/gpu/gpu_data_manager_impl_private_unittest.cc +++ b/src/content/browser/gpu/gpu_data_manager_impl_private_unittest.cc @@ -14,6 +14,10 @@ #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h" +#if defined(OS_WIN) +#include "base/win/windows_version.h" +#endif + #define LONG_STRING_CONST(...) #__VA_ARGS__ namespace content { @@ -284,6 +288,22 @@ TEST_F(GpuDataManagerImplPrivateTest, SwiftShaderRendering2) { gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS)); } +TEST_F(GpuDataManagerImplPrivateTest, WarpEnabledOverridesSwiftShader) { + // If WARP fallback is enabled on Windows 8 it should not allow SwiftShader + // to be enabled. +#if defined(OS_WIN) + if (base::win::GetVersion() >= base::win::VERSION_WIN8) { + ScopedGpuDataManagerImplPrivate manager; + manager->ForceWarpModeForTesting(); + const base::FilePath test_path(FILE_PATH_LITERAL("AnyPath")); + manager->RegisterSwiftShaderPath(test_path); + manager->DisableHardwareAcceleration(); + EXPECT_TRUE(manager->ShouldUseWarp()); + EXPECT_FALSE(manager->ShouldUseSwiftShader()); + } +#endif +} + TEST_F(GpuDataManagerImplPrivateTest, GpuInfoUpdate) { ScopedGpuDataManagerImpl manager;