| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/file_util.h" | 5 #include "base/file_util.h" |
| 6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
| 8 #include "base/test/trace_event_analyzer.h" | 8 #include "base/test/trace_event_analyzer.h" |
| 9 #include "base/version.h" | 9 #include "base/version.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 GpuFeatureFlags flags = GpuDataManager::GetInstance()->GetGpuFeatureFlags(); | 93 GpuFeatureFlags flags = GpuDataManager::GetInstance()->GetGpuFeatureFlags(); |
| 94 EXPECT_EQ( | 94 EXPECT_EQ( |
| 95 flags.flags(), | 95 flags.flags(), |
| 96 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureAcceleratedCompositing)); | 96 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureAcceleratedCompositing)); |
| 97 | 97 |
| 98 const bool expect_gpu_process = false; | 98 const bool expect_gpu_process = false; |
| 99 const FilePath url(FILE_PATH_LITERAL("feature_compositing.html")); | 99 const FilePath url(FILE_PATH_LITERAL("feature_compositing.html")); |
| 100 RunTest(url, expect_gpu_process); | 100 RunTest(url, expect_gpu_process); |
| 101 } | 101 } |
| 102 | 102 |
| 103 #if defined(OS_LINUX) |
| 104 // http://crbug.com/104142 |
| 105 #define WebGLAllowed FLAKY_WebGLAllowed |
| 106 #endif |
| 103 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, WebGLAllowed) { | 107 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, WebGLAllowed) { |
| 104 GpuFeatureFlags flags = GpuDataManager::GetInstance()->GetGpuFeatureFlags(); | 108 GpuFeatureFlags flags = GpuDataManager::GetInstance()->GetGpuFeatureFlags(); |
| 105 EXPECT_EQ(flags.flags(), 0u); | 109 EXPECT_EQ(flags.flags(), 0u); |
| 106 | 110 |
| 107 const bool expect_gpu_process = true; | 111 const bool expect_gpu_process = true; |
| 108 const FilePath url(FILE_PATH_LITERAL("feature_webgl.html")); | 112 const FilePath url(FILE_PATH_LITERAL("feature_webgl.html")); |
| 109 RunTest(url, expect_gpu_process); | 113 RunTest(url, expect_gpu_process); |
| 110 } | 114 } |
| 111 | 115 |
| 112 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, WebGLBlocked) { | 116 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, WebGLBlocked) { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 flags.flags(), | 172 flags.flags(), |
| 169 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureAccelerated2dCanvas)); | 173 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureAccelerated2dCanvas)); |
| 170 | 174 |
| 171 const bool expect_gpu_process = false; | 175 const bool expect_gpu_process = false; |
| 172 const FilePath url(FILE_PATH_LITERAL("feature_canvas2d.html")); | 176 const FilePath url(FILE_PATH_LITERAL("feature_canvas2d.html")); |
| 173 RunTest(url, expect_gpu_process); | 177 RunTest(url, expect_gpu_process); |
| 174 } | 178 } |
| 175 | 179 |
| 176 } // namespace anonymous | 180 } // namespace anonymous |
| 177 | 181 |
| OLD | NEW |