OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <map> | 5 #include <map> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #if defined(OS_MACOSX) | 10 #if defined(OS_MACOSX) |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "chrome/common/extensions/features/complex_feature.h" | 25 #include "chrome/common/extensions/features/complex_feature.h" |
26 #include "chrome/common/extensions/features/simple_feature.h" | 26 #include "chrome/common/extensions/features/simple_feature.h" |
27 #include "chrome/test/base/test_launcher_utils.h" | 27 #include "chrome/test/base/test_launcher_utils.h" |
28 #include "chrome/test/base/test_switches.h" | 28 #include "chrome/test/base/test_switches.h" |
29 #include "chrome/test/base/tracing.h" | 29 #include "chrome/test/base/tracing.h" |
30 #include "content/public/browser/render_process_host.h" | 30 #include "content/public/browser/render_process_host.h" |
31 #include "content/public/browser/render_view_host.h" | 31 #include "content/public/browser/render_view_host.h" |
32 #include "content/public/common/content_switches.h" | 32 #include "content/public/common/content_switches.h" |
33 #include "extensions/common/feature_switch.h" | 33 #include "extensions/common/feature_switch.h" |
34 #include "extensions/common/features/feature.h" | 34 #include "extensions/common/features/feature.h" |
| 35 #include "extensions/common/switches.h" |
35 #include "media/base/video_frame.h" | 36 #include "media/base/video_frame.h" |
36 #include "media/cast/cast_config.h" | 37 #include "media/cast/cast_config.h" |
37 #include "media/cast/cast_environment.h" | 38 #include "media/cast/cast_environment.h" |
38 #include "media/cast/test/utility/audio_utility.h" | 39 #include "media/cast/test/utility/audio_utility.h" |
39 #include "media/cast/test/utility/barcode.h" | 40 #include "media/cast/test/utility/barcode.h" |
40 #include "media/cast/test/utility/default_config.h" | 41 #include "media/cast/test/utility/default_config.h" |
41 #include "media/cast/test/utility/in_process_receiver.h" | 42 #include "media/cast/test/utility/in_process_receiver.h" |
42 #include "media/cast/test/utility/standalone_cast_environment.h" | 43 #include "media/cast/test/utility/standalone_cast_environment.h" |
43 #include "net/base/ip_endpoint.h" | 44 #include "net/base/ip_endpoint.h" |
44 #include "net/base/net_errors.h" | 45 #include "net/base/net_errors.h" |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 | 340 |
340 if (!HasFlag(kUseGpu)) { | 341 if (!HasFlag(kUseGpu)) { |
341 command_line->AppendSwitch(switches::kDisableGpu); | 342 command_line->AppendSwitch(switches::kDisableGpu); |
342 } else { | 343 } else { |
343 command_line->AppendSwitch(switches::kForceCompositingMode); | 344 command_line->AppendSwitch(switches::kForceCompositingMode); |
344 } | 345 } |
345 | 346 |
346 if (HasFlag(kDisableVsync)) | 347 if (HasFlag(kDisableVsync)) |
347 command_line->AppendSwitch(switches::kDisableGpuVsync); | 348 command_line->AppendSwitch(switches::kDisableGpuVsync); |
348 | 349 |
349 command_line->AppendSwitchASCII(switches::kWhitelistedExtensionID, | 350 command_line->AppendSwitchASCII( |
350 kExtensionId); | 351 extensions::switches::kWhitelistedExtensionID, |
| 352 kExtensionId); |
351 ExtensionApiTest::SetUpCommandLine(command_line); | 353 ExtensionApiTest::SetUpCommandLine(command_line); |
352 } | 354 } |
353 | 355 |
354 void GetTraceEvents(trace_analyzer::TraceAnalyzer* analyzer, | 356 void GetTraceEvents(trace_analyzer::TraceAnalyzer* analyzer, |
355 const std::string& event_name, | 357 const std::string& event_name, |
356 trace_analyzer::TraceEventVector* events) { | 358 trace_analyzer::TraceEventVector* events) { |
357 trace_analyzer::Query query = | 359 trace_analyzer::Query query = |
358 trace_analyzer::Query::EventNameIs(event_name) && | 360 trace_analyzer::Query::EventNameIs(event_name) && |
359 (trace_analyzer::Query::EventPhaseIs(TRACE_EVENT_PHASE_BEGIN) || | 361 (trace_analyzer::Query::EventPhaseIs(TRACE_EVENT_PHASE_BEGIN) || |
360 trace_analyzer::Query::EventPhaseIs(TRACE_EVENT_PHASE_ASYNC_BEGIN) || | 362 trace_analyzer::Query::EventPhaseIs(TRACE_EVENT_PHASE_ASYNC_BEGIN) || |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 // Note: First argument is optional and intentionally left blank. | 613 // Note: First argument is optional and intentionally left blank. |
612 // (it's a prefix for the generated test cases) | 614 // (it's a prefix for the generated test cases) |
613 INSTANTIATE_TEST_CASE_P( | 615 INSTANTIATE_TEST_CASE_P( |
614 , | 616 , |
615 CastV2PerformanceTest, | 617 CastV2PerformanceTest, |
616 testing::Values( | 618 testing::Values( |
617 kUseGpu | k24fps, | 619 kUseGpu | k24fps, |
618 kUseGpu | k30fps, | 620 kUseGpu | k30fps, |
619 kUseGpu | k60fps, | 621 kUseGpu | k60fps, |
620 kDisableVsync | k24fps | kUseGpu)); | 622 kDisableVsync | k24fps | kUseGpu)); |
OLD | NEW |