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

Unified Diff: remoting/protocol/connection_unittest.cc

Issue 2711053005: Deflake ConnectionTest.Audio test (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/protocol/webrtc_transport.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/connection_unittest.cc
diff --git a/remoting/protocol/connection_unittest.cc b/remoting/protocol/connection_unittest.cc
index 9aecebd242db2b1aaf080ab6c806efca83c91782..1794f2fdc448ebf863344324c2a3349a0d7f886c 100644
--- a/remoting/protocol/connection_unittest.cc
+++ b/remoting/protocol/connection_unittest.cc
@@ -234,12 +234,14 @@ class FakeAudioPlayer : public AudioStub {
++right;
}
}
+
+ const int kMaxErrorHz = 50;
int left_hz = (left * kAudioSampleRate / (num_samples - skipped_samples));
- EXPECT_LE(kTestAudioSignalFrequencyLeftHz - 50, left_hz);
- EXPECT_GE(kTestAudioSignalFrequencyLeftHz + 50, left_hz);
+ EXPECT_LE(kTestAudioSignalFrequencyLeftHz - kMaxErrorHz, left_hz);
+ EXPECT_GE(kTestAudioSignalFrequencyLeftHz + kMaxErrorHz, left_hz);
int right_hz = (right * kAudioSampleRate / (num_samples - skipped_samples));
- EXPECT_LE(kTestAudioSignalFrequencyRightHz - 50, right_hz);
- EXPECT_GE(kTestAudioSignalFrequencyRightHz + 50, right_hz);
+ EXPECT_LE(kTestAudioSignalFrequencyRightHz - kMaxErrorHz, right_hz);
+ EXPECT_GE(kTestAudioSignalFrequencyRightHz + kMaxErrorHz, right_hz);
}
base::WeakPtr<AudioStub> GetWeakPtr() { return weak_factory_.GetWeakPtr(); }
@@ -622,10 +624,6 @@ TEST_P(ConnectionTest, VideoStats) {
EXPECT_LE(stats.client_stats.time_rendered, finish_time);
}
-// Flaky on Linux/ChromeOS, crbug.com/685910.
-// Note: Apparently it's not possible to use the common MAYBE_ prefix with
-// TEST_P, so ifdef it out completely.
-#if !defined(OS_LINUX) && !defined(OS_CHROMEOS)
TEST_P(ConnectionTest, Audio) {
Connect();
@@ -636,7 +634,6 @@ TEST_P(ConnectionTest, Audio) {
client_audio_player_.WaitForSamples(kAudioSampleRate * 2);
client_audio_player_.Verify();
}
-#endif
TEST_P(ConnectionTest, FirstCaptureFailed) {
Connect();
« no previous file with comments | « no previous file | remoting/protocol/webrtc_transport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698