| 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/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "base/threading/platform_thread.h" | 8 #include "base/threading/platform_thread.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "content/browser/media/webrtc_internals.h" | 10 #include "content/browser/media/webrtc_internals.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 class WebRtcBrowserTest : public WebRtcContentBrowserTest, | 36 class WebRtcBrowserTest : public WebRtcContentBrowserTest, |
| 37 public testing::WithParamInterface<bool> { | 37 public testing::WithParamInterface<bool> { |
| 38 public: | 38 public: |
| 39 WebRtcBrowserTest() {} | 39 WebRtcBrowserTest() {} |
| 40 virtual ~WebRtcBrowserTest() {} | 40 virtual ~WebRtcBrowserTest() {} |
| 41 | 41 |
| 42 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 42 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 43 WebRtcContentBrowserTest::SetUpCommandLine(command_line); | 43 WebRtcContentBrowserTest::SetUpCommandLine(command_line); |
| 44 | 44 |
| 45 bool enable_audio_track_processing = GetParam(); | 45 bool enable_audio_track_processing = GetParam(); |
| 46 if (enable_audio_track_processing) | 46 if (!enable_audio_track_processing) |
| 47 command_line->AppendSwitch(switches::kEnableAudioTrackProcessing); | 47 command_line->AppendSwitch(switches::kDisableAudioTrackProcessing); |
| 48 } | 48 } |
| 49 | 49 |
| 50 virtual void TearDownOnMainThread() OVERRIDE { | 50 virtual void TearDownOnMainThread() OVERRIDE { |
| 51 #if defined(OS_ANDROID) | 51 #if defined(OS_ANDROID) |
| 52 // TODO(phoglund): this is a ugly workaround to let the IO thread | 52 // TODO(phoglund): this is a ugly workaround to let the IO thread |
| 53 // finish its work. The reason we need this on Android is that | 53 // finish its work. The reason we need this on Android is that |
| 54 // content_browsertests tearDown logic is broken with respect | 54 // content_browsertests tearDown logic is broken with respect |
| 55 // to threading, which causes the IO thread to compete with the | 55 // to threading, which causes the IO thread to compete with the |
| 56 // teardown. See http://crbug.com/362852. I also tried with 2 | 56 // teardown. See http://crbug.com/362852. I also tried with 2 |
| 57 // seconds, but that isn't enough. | 57 // seconds, but that isn't enough. |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 | 462 |
| 463 EXPECT_TRUE(base::PathExists(dump_file)); | 463 EXPECT_TRUE(base::PathExists(dump_file)); |
| 464 int64 file_size = 0; | 464 int64 file_size = 0; |
| 465 EXPECT_TRUE(base::GetFileSize(dump_file, &file_size)); | 465 EXPECT_TRUE(base::GetFileSize(dump_file, &file_size)); |
| 466 EXPECT_EQ(0, file_size); | 466 EXPECT_EQ(0, file_size); |
| 467 | 467 |
| 468 base::DeleteFile(dump_file, false); | 468 base::DeleteFile(dump_file, false); |
| 469 } | 469 } |
| 470 | 470 |
| 471 } // namespace content | 471 } // namespace content |
| OLD | NEW |