OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include <utility> | 11 #include <utility> |
12 | 12 |
13 #include "webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h" | 13 #include "webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h" |
14 | 14 |
15 #include "webrtc/base/task_queue.h" | |
16 #include "webrtc/modules/include/module_common_types.h" | 15 #include "webrtc/modules/include/module_common_types.h" |
| 16 #include "webrtc/rtc_base/task_queue.h" |
17 #include "webrtc/test/gtest.h" | 17 #include "webrtc/test/gtest.h" |
18 #include "webrtc/test/testsupport/fileutils.h" | 18 #include "webrtc/test/testsupport/fileutils.h" |
19 | 19 |
20 TEST(AecDumper, APICallsDoNotCrash) { | 20 TEST(AecDumper, APICallsDoNotCrash) { |
21 // Note order of initialization: Task queue has to be initialized | 21 // Note order of initialization: Task queue has to be initialized |
22 // before AecDump. | 22 // before AecDump. |
23 rtc::TaskQueue file_writer_queue("file_writer_queue"); | 23 rtc::TaskQueue file_writer_queue("file_writer_queue"); |
24 | 24 |
25 const std::string filename = | 25 const std::string filename = |
26 webrtc::test::TempFilename(webrtc::test::OutputPath(), "aec_dump"); | 26 webrtc::test::TempFilename(webrtc::test::OutputPath(), "aec_dump"); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 // Verify the file has been written after the AecDump d-tor has | 63 // Verify the file has been written after the AecDump d-tor has |
64 // finished. | 64 // finished. |
65 FILE* fid = fopen(filename.c_str(), "r"); | 65 FILE* fid = fopen(filename.c_str(), "r"); |
66 ASSERT_TRUE(fid != NULL); | 66 ASSERT_TRUE(fid != NULL); |
67 | 67 |
68 // Clean it up. | 68 // Clean it up. |
69 ASSERT_EQ(0, fclose(fid)); | 69 ASSERT_EQ(0, fclose(fid)); |
70 ASSERT_EQ(0, remove(filename.c_str())); | 70 ASSERT_EQ(0, remove(filename.c_str())); |
71 } | 71 } |
OLD | NEW |