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 "remoting/host/linux/audio_pipe_reader.h" | 5 #include "remoting/host/linux/audio_pipe_reader.h" |
6 | 6 |
| 7 #include <sys/stat.h> |
7 #include <sys/types.h> | 8 #include <sys/types.h> |
8 #include <sys/stat.h> | |
9 #include <unistd.h> | 9 #include <unistd.h> |
10 | 10 |
11 #include "base/files/file.h" | 11 #include "base/files/file.h" |
12 #include "base/files/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
| 13 #include "base/macros.h" |
13 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
14 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
15 #include "base/threading/thread.h" | 16 #include "base/threading/thread.h" |
16 #include "base/time/time.h" | 17 #include "base/time/time.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
18 | 19 |
19 namespace remoting { | 20 namespace remoting { |
20 | 21 |
21 class AudioPipeReaderTest : public testing::Test, | 22 class AudioPipeReaderTest : public testing::Test, |
22 public AudioPipeReader::StreamObserver { | 23 public AudioPipeReader::StreamObserver { |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 111 |
111 base::TimeTicks start_time = base::TimeTicks::Now(); | 112 base::TimeTicks start_time = base::TimeTicks::Now(); |
112 ASSERT_NO_FATAL_FAILURE(WriteAndWait(test_data)); | 113 ASSERT_NO_FATAL_FAILURE(WriteAndWait(test_data)); |
113 base::TimeDelta time_passed = base::TimeTicks::Now() - start_time; | 114 base::TimeDelta time_passed = base::TimeTicks::Now() - start_time; |
114 | 115 |
115 EXPECT_EQ(test_data, read_data_); | 116 EXPECT_EQ(test_data, read_data_); |
116 EXPECT_GE(time_passed, base::TimeDelta::FromMilliseconds(500)); | 117 EXPECT_GE(time_passed, base::TimeDelta::FromMilliseconds(500)); |
117 } | 118 } |
118 | 119 |
119 } // namespace remoting | 120 } // namespace remoting |
OLD | NEW |