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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/debug/trace_event_impl.h" | 6 #include "base/debug/trace_event_impl.h" |
7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "base/test/trace_event_analyzer.h" | 9 #include "base/test/trace_event_analyzer.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 class WebRtcGetUserMediaBrowserTest: public WebRtcContentBrowserTest, | 78 class WebRtcGetUserMediaBrowserTest: public WebRtcContentBrowserTest, |
79 public testing::WithParamInterface<bool> { | 79 public testing::WithParamInterface<bool> { |
80 public: | 80 public: |
81 WebRtcGetUserMediaBrowserTest() : trace_log_(NULL) {} | 81 WebRtcGetUserMediaBrowserTest() : trace_log_(NULL) {} |
82 virtual ~WebRtcGetUserMediaBrowserTest() {} | 82 virtual ~WebRtcGetUserMediaBrowserTest() {} |
83 | 83 |
84 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 84 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
85 WebRtcContentBrowserTest::SetUpCommandLine(command_line); | 85 WebRtcContentBrowserTest::SetUpCommandLine(command_line); |
86 | 86 |
87 bool enable_audio_track_processing = GetParam(); | 87 bool enable_audio_track_processing = GetParam(); |
88 if (enable_audio_track_processing) | 88 if (!enable_audio_track_processing) |
89 command_line->AppendSwitch(switches::kEnableAudioTrackProcessing); | 89 command_line->AppendSwitch(switches::kDisableAudioTrackProcessing); |
90 } | 90 } |
91 | 91 |
92 void StartTracing() { | 92 void StartTracing() { |
93 CHECK(trace_log_ == NULL) << "Can only can start tracing once"; | 93 CHECK(trace_log_ == NULL) << "Can only can start tracing once"; |
94 trace_log_ = base::debug::TraceLog::GetInstance(); | 94 trace_log_ = base::debug::TraceLog::GetInstance(); |
95 trace_log_->SetEnabled(base::debug::CategoryFilter("video"), | 95 trace_log_->SetEnabled(base::debug::CategoryFilter("video"), |
96 base::debug::TraceLog::RECORDING_MODE, | 96 base::debug::TraceLog::RECORDING_MODE, |
97 base::debug::TraceLog::ENABLE_SAMPLING); | 97 base::debug::TraceLog::ENABLE_SAMPLING); |
98 // Check that we are indeed recording. | 98 // Check that we are indeed recording. |
99 EXPECT_EQ(trace_log_->GetNumTracesRecorded(), 1); | 99 EXPECT_EQ(trace_log_->GetNumTracesRecorded(), 1); |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 {640, 640, 360, 360, 10, 30}, | 598 {640, 640, 360, 360, 10, 30}, |
599 {640, 640, 480, 480, 10, 30}, | 599 {640, 640, 480, 480, 10, 30}, |
600 {960, 960, 720, 720, 10, 30}, | 600 {960, 960, 720, 720, 10, 30}, |
601 {1280, 1280, 720, 720, 10, 30}}; | 601 {1280, 1280, 720, 720, 10, 30}}; |
602 | 602 |
603 INSTANTIATE_TEST_CASE_P(UserMedia, | 603 INSTANTIATE_TEST_CASE_P(UserMedia, |
604 WebRtcConstraintsBrowserTest, | 604 WebRtcConstraintsBrowserTest, |
605 testing::ValuesIn(kAllUserMediaSizes)); | 605 testing::ValuesIn(kAllUserMediaSizes)); |
606 | 606 |
607 } // namespace content | 607 } // namespace content |
OLD | NEW |