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

Side by Side Diff: chrome/test/gpu/gpu_feature_browsertest.cc

Issue 9509001: Add basic threaded compositor test to gpu_feature_browsertest.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disabling because of assertion Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/data/gpu/feature_compositing.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/test/trace_event_analyzer.h" 9 #include "base/test/trace_event_analyzer.h"
10 #include "base/version.h" 10 #include "base/version.h"
11 #include "chrome/browser/gpu_blacklist.h" 11 #include "chrome/browser/gpu_blacklist.h"
12 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
13 #include "chrome/common/chrome_paths.h" 13 #include "chrome/common/chrome_paths.h"
14 #include "chrome/common/chrome_switches.h"
14 #include "chrome/test/base/in_process_browser_test.h" 15 #include "chrome/test/base/in_process_browser_test.h"
15 #include "chrome/test/base/test_launcher_utils.h" 16 #include "chrome/test/base/test_launcher_utils.h"
16 #include "chrome/test/base/tracing.h" 17 #include "chrome/test/base/tracing.h"
17 #include "chrome/test/base/ui_test_utils.h" 18 #include "chrome/test/base/ui_test_utils.h"
18 #include "content/public/browser/gpu_data_manager.h" 19 #include "content/public/browser/gpu_data_manager.h"
19 #include "content/public/common/content_switches.h" 20 #include "content/public/common/content_switches.h"
20 #include "net/base/net_util.h" 21 #include "net/base/net_util.h"
21 #include "ui/gfx/gl/gl_switches.h" 22 #include "ui/gfx/gl/gl_switches.h"
22 23
23 using content::GpuDataManager; 24 using content::GpuDataManager;
(...skipping 24 matching lines...) Expand all
48 49
49 // Do not use mesa if real GPU is required. 50 // Do not use mesa if real GPU is required.
50 if (!command_line->HasSwitch("use-gpu-in-tests")) { 51 if (!command_line->HasSwitch("use-gpu-in-tests")) {
51 #if !defined(OS_MACOSX) 52 #if !defined(OS_MACOSX)
52 CHECK(test_launcher_utils::OverrideGLImplementation( 53 CHECK(test_launcher_utils::OverrideGLImplementation(
53 command_line, gfx::kGLImplementationOSMesaName)) << 54 command_line, gfx::kGLImplementationOSMesaName)) <<
54 "kUseGL must not be set by test framework code!"; 55 "kUseGL must not be set by test framework code!";
55 #endif 56 #endif
56 } 57 }
57 command_line->AppendSwitch(switches::kDisablePopupBlocking); 58 command_line->AppendSwitch(switches::kDisablePopupBlocking);
59 command_line->AppendSwitchASCII(switches::kWindowSize, "400,300");
58 } 60 }
59 61
60 void SetupBlacklist(const std::string& json_blacklist) { 62 void SetupBlacklist(const std::string& json_blacklist) {
61 GpuBlacklist* blacklist = GpuBlacklist::GetInstance(); 63 GpuBlacklist* blacklist = GpuBlacklist::GetInstance();
62 ASSERT_TRUE(blacklist->LoadGpuBlacklist( 64 ASSERT_TRUE(blacklist->LoadGpuBlacklist(
63 "1.0", json_blacklist, GpuBlacklist::kAllOs)); 65 "1.0", json_blacklist, GpuBlacklist::kAllOs));
64 blacklist->UpdateGpuDataManager(); 66 blacklist->UpdateGpuDataManager();
65 } 67 }
66 68
67 // If expected_reply is NULL, we don't check the reply content. 69 // If expected_reply is NULL, we don't check the reply content.
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 CanOpenPopupAndRenderWithWebGLCanvas) { 318 CanOpenPopupAndRenderWithWebGLCanvas) {
317 const FilePath url(FILE_PATH_LITERAL("webgl_popup.html")); 319 const FilePath url(FILE_PATH_LITERAL("webgl_popup.html"));
318 RunTest(url, "\"SUCCESS\"", false); 320 RunTest(url, "\"SUCCESS\"", false);
319 } 321 }
320 322
321 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, CanOpenPopupAndRenderWith2DCanvas) { 323 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, CanOpenPopupAndRenderWith2DCanvas) {
322 const FilePath url(FILE_PATH_LITERAL("canvas_popup.html")); 324 const FilePath url(FILE_PATH_LITERAL("canvas_popup.html"));
323 RunTest(url, "\"SUCCESS\"", false); 325 RunTest(url, "\"SUCCESS\"", false);
324 } 326 }
325 327
328 class ThreadedCompositorTest : public GpuFeatureTest {
329 public:
330 virtual void SetUpCommandLine(CommandLine* command_line) {
331 GpuFeatureTest::SetUpCommandLine(command_line);
332 command_line->AppendSwitch(switches::kEnableThreadedCompositing);
333 }
334 };
335
336 IN_PROC_BROWSER_TEST_F(ThreadedCompositorTest, DISABLED_ThreadedCompositor) {
337 const FilePath url(FILE_PATH_LITERAL("feature_compositing.html"));
338 RunTest(url, EXPECT_GPU_SWAP_BUFFERS);
339 }
340
326 } // namespace anonymous 341 } // namespace anonymous
327 342
OLDNEW
« no previous file with comments | « chrome/test/data/gpu/feature_compositing.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698