| 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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 | 337 |
| 338 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch( | 338 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch( |
| 339 switches::kUseFakeDeviceForMediaStream)) | 339 switches::kUseFakeDeviceForMediaStream)) |
| 340 << "Must run with fake devices since the test will explicitly look " | 340 << "Must run with fake devices since the test will explicitly look " |
| 341 << "for the fake device signal."; | 341 << "for the fake device signal."; |
| 342 | 342 |
| 343 MakeTypicalPeerConnectionCall(base::StringPrintf( | 343 MakeTypicalPeerConnectionCall(base::StringPrintf( |
| 344 "callAndEnsureAudioTrackMutingWorks(%s);", kUseLenientAudioChecking)); | 344 "callAndEnsureAudioTrackMutingWorks(%s);", kUseLenientAudioChecking)); |
| 345 } | 345 } |
| 346 | 346 |
| 347 // Flaky on TSAN v2: http://crbug.com/373637 |
| 348 #if defined(THREAD_SANITIZER) |
| 349 #define MAYBE_EstablishAudioVideoCallAndVerifyUnmutingWorks\ |
| 350 DISABLED_EstablishAudioVideoCallAndVerifyUnmutingWorks |
| 351 #else |
| 352 #define MAYBE_EstablishAudioVideoCallAndVerifyUnmutingWorks\ |
| 353 EstablishAudioVideoCallAndVerifyUnmutingWorks |
| 354 #endif |
| 347 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, | 355 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, |
| 348 EstablishAudioVideoCallAndVerifyUnmutingWorks) { | 356 MAYBE_EstablishAudioVideoCallAndVerifyUnmutingWorks) { |
| 349 if (!media::AudioManager::Get()->HasAudioOutputDevices()) { | 357 if (!media::AudioManager::Get()->HasAudioOutputDevices()) { |
| 350 // See comment on EstablishAudioVideoCallAndMeasureOutputLevel. | 358 // See comment on EstablishAudioVideoCallAndMeasureOutputLevel. |
| 351 LOG(INFO) << "Missing output devices: skipping test..."; | 359 LOG(INFO) << "Missing output devices: skipping test..."; |
| 352 return; | 360 return; |
| 353 } | 361 } |
| 354 | 362 |
| 355 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch( | 363 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch( |
| 356 switches::kUseFakeDeviceForMediaStream)) | 364 switches::kUseFakeDeviceForMediaStream)) |
| 357 << "Must run with fake devices since the test will explicitly look " | 365 << "Must run with fake devices since the test will explicitly look " |
| 358 << "for the fake device signal."; | 366 << "for the fake device signal."; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 | 443 |
| 436 EXPECT_TRUE(base::PathExists(dump_file)); | 444 EXPECT_TRUE(base::PathExists(dump_file)); |
| 437 int64 file_size = 0; | 445 int64 file_size = 0; |
| 438 EXPECT_TRUE(base::GetFileSize(dump_file, &file_size)); | 446 EXPECT_TRUE(base::GetFileSize(dump_file, &file_size)); |
| 439 EXPECT_EQ(0, file_size); | 447 EXPECT_EQ(0, file_size); |
| 440 | 448 |
| 441 base::DeleteFile(dump_file, false); | 449 base::DeleteFile(dump_file, false); |
| 442 } | 450 } |
| 443 | 451 |
| 444 } // namespace content | 452 } // namespace content |
| OLD | NEW |