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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "base/test/trace_event_analyzer.h" | 10 #include "base/test/trace_event_analyzer.h" |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, MAYBE_AcceleratedCompositingAllowed) { | 180 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, MAYBE_AcceleratedCompositingAllowed) { |
181 EXPECT_FALSE(GpuDataManager::GetInstance()->IsFeatureBlacklisted( | 181 EXPECT_FALSE(GpuDataManager::GetInstance()->IsFeatureBlacklisted( |
182 gpu::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING)); | 182 gpu::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING)); |
183 | 183 |
184 const base::FilePath url(FILE_PATH_LITERAL("feature_compositing.html")); | 184 const base::FilePath url(FILE_PATH_LITERAL("feature_compositing.html")); |
185 RunEventTest(url, kSwapBuffersEvent, true); | 185 RunEventTest(url, kSwapBuffersEvent, true); |
186 } | 186 } |
187 | 187 |
188 class AcceleratedCompositingBlockedTest : public GpuFeatureTest { | 188 class AcceleratedCompositingBlockedTest : public GpuFeatureTest { |
189 public: | 189 public: |
190 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 190 // Override the blacklist after browser initialization has completed, just |
191 GpuFeatureTest::SetUpInProcessBrowserTestFixture(); | 191 // before launching the actual test. |
| 192 virtual void SetUpOnMainThread() OVERRIDE { |
| 193 GpuFeatureTest::SetUpOnMainThread(); |
192 const std::string json_blacklist = | 194 const std::string json_blacklist = |
193 "{\n" | 195 "{\n" |
194 " \"name\": \"gpu blacklist\",\n" | 196 " \"name\": \"gpu blacklist\",\n" |
195 " \"version\": \"1.0\",\n" | 197 " \"version\": \"1.0\",\n" |
196 " \"entries\": [\n" | 198 " \"entries\": [\n" |
197 " {\n" | 199 " {\n" |
198 " \"id\": 1,\n" | 200 " \"id\": 1,\n" |
199 " \"features\": [\n" | 201 " \"features\": [\n" |
200 " \"accelerated_compositing\"\n" | 202 " \"accelerated_compositing\"\n" |
201 " ]\n" | 203 " ]\n" |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 base::StringPrintf( | 545 base::StringPrintf( |
544 "%d (resize offset %d): IOSurface width %d -> %d; Creates %d " | 546 "%d (resize offset %d): IOSurface width %d -> %d; Creates %d " |
545 "Expected %d", offset_i, offsets[offset_i], | 547 "Expected %d", offset_i, offsets[offset_i], |
546 old_width, new_width, num_creates, expected_creates); | 548 old_width, new_width, num_creates, expected_creates); |
547 } | 549 } |
548 } | 550 } |
549 } | 551 } |
550 #endif | 552 #endif |
551 | 553 |
552 } // namespace | 554 } // namespace |
OLD | NEW |