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

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

Issue 10689108: Aura: Have ui::Layer implement WebKit::WebExternalTextureLayerClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nuke TestImageTransportFactory. Created 8 years, 5 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
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/common/chrome_switches.h"
15 #include "chrome/test/base/in_process_browser_test.h" 15 #include "chrome/test/base/in_process_browser_test.h"
16 #include "chrome/test/base/test_launcher_utils.h" 16 #include "chrome/test/base/test_launcher_utils.h"
17 #include "chrome/test/base/tracing.h" 17 #include "chrome/test/base/tracing.h"
18 #include "chrome/test/base/ui_test_utils.h" 18 #include "chrome/test/base/ui_test_utils.h"
19 #include "content/public/browser/gpu_data_manager.h" 19 #include "content/public/browser/gpu_data_manager.h"
20 #include "content/public/common/content_switches.h" 20 #include "content/public/common/content_switches.h"
21 #include "content/test/gpu/gpu_test_config.h" 21 #include "content/test/gpu/gpu_test_config.h"
22 #include "content/test/gpu/test_switches.h" 22 #include "content/test/gpu/test_switches.h"
23 #include "net/base/net_util.h" 23 #include "net/base/net_util.h"
24 #include "ui/gl/gl_switches.h" 24 #include "ui/gl/gl_switches.h"
25 #include "ui/compositor/compositor_setup.h"
25 #if defined(OS_MACOSX) 26 #if defined(OS_MACOSX)
26 #include "ui/surface/io_surface_support_mac.h" 27 #include "ui/surface/io_surface_support_mac.h"
27 #endif 28 #endif
28 29
29 using content::GpuDataManager; 30 using content::GpuDataManager;
30 using content::GpuFeatureType; 31 using content::GpuFeatureType;
31 using trace_analyzer::Query; 32 using trace_analyzer::Query;
32 using trace_analyzer::TraceAnalyzer; 33 using trace_analyzer::TraceAnalyzer;
33 using trace_analyzer::TraceEventVector; 34 using trace_analyzer::TraceEventVector;
34 35
(...skipping 24 matching lines...) Expand all
59 if (!command_line->HasSwitch(switches::kUseGpuInTests)) { 60 if (!command_line->HasSwitch(switches::kUseGpuInTests)) {
60 #if !defined(OS_MACOSX) 61 #if !defined(OS_MACOSX)
61 CHECK(test_launcher_utils::OverrideGLImplementation( 62 CHECK(test_launcher_utils::OverrideGLImplementation(
62 command_line, gfx::kGLImplementationOSMesaName)) << 63 command_line, gfx::kGLImplementationOSMesaName)) <<
63 "kUseGL must not be set by test framework code!"; 64 "kUseGL must not be set by test framework code!";
64 #endif 65 #endif
65 } else { 66 } else {
66 gpu_enabled_ = true; 67 gpu_enabled_ = true;
67 } 68 }
68 command_line->AppendSwitch(switches::kDisablePopupBlocking); 69 command_line->AppendSwitch(switches::kDisablePopupBlocking);
70 ui::DisableTestCompositor();
69 command_line->AppendSwitchASCII(switches::kWindowSize, "400,300"); 71 command_line->AppendSwitchASCII(switches::kWindowSize, "400,300");
70 } 72 }
71 73
72 void SetupBlacklist(const std::string& json_blacklist) { 74 void SetupBlacklist(const std::string& json_blacklist) {
73 GpuBlacklist* blacklist = GpuBlacklist::GetInstance(); 75 GpuBlacklist* blacklist = GpuBlacklist::GetInstance();
74 ASSERT_TRUE(blacklist->LoadGpuBlacklist( 76 ASSERT_TRUE(blacklist->LoadGpuBlacklist(
75 json_blacklist, GpuBlacklist::kAllOs)); 77 json_blacklist, GpuBlacklist::kAllOs));
76 blacklist->UpdateGpuDataManager(); 78 blacklist->UpdateGpuDataManager();
77 } 79 }
78 80
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 // indicate that the renderer is not simply spinning on RAF. 413 // indicate that the renderer is not simply spinning on RAF.
412 EXPECT_GT(stats.mean_us, 15000.0); 414 EXPECT_GT(stats.mean_us, 15000.0);
413 415
414 // Print out the trace events upon error to debug failures. 416 // Print out the trace events upon error to debug failures.
415 if (stats.mean_us <= 15000.0) { 417 if (stats.mean_us <= 15000.0) {
416 fprintf(stderr, "\n\nTRACE JSON:\n\n%s\n\n", trace_events_json_.c_str()); 418 fprintf(stderr, "\n\nTRACE JSON:\n\n%s\n\n", trace_events_json_.c_str());
417 } 419 }
418 } 420 }
419 421
420 } // namespace anonymous 422 } // namespace anonymous
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698