| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include "base/process/process_handle.h" | 7 #include "base/process/process_handle.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 file_size = 0; | 163 file_size = 0; |
| 164 EXPECT_TRUE(base::GetFileSize(file_path, &file_size)); | 164 EXPECT_TRUE(base::GetFileSize(file_path, &file_size)); |
| 165 EXPECT_GT(file_size, kWaveHeaderSizeBytes); | 165 EXPECT_GT(file_size, kWaveHeaderSizeBytes); |
| 166 base::DeleteFile(file_path, false); | 166 base::DeleteFile(file_path, false); |
| 167 | 167 |
| 168 // Verify that the expected output audio files exists and contains some data. | 168 // Verify that the expected output audio files exists and contains some data. |
| 169 // Two files are expected, one for each peer in the call. | 169 // Two files are expected, one for each peer in the call. |
| 170 for (int i = 0; i < 2; ++i) { | 170 for (int i = 0; i < 2; ++i) { |
| 171 file_path = GetExpectedOutputAudioFileName( | 171 file_path = GetExpectedOutputAudioFileName( |
| 172 base_file_path, kExpectedFirstOutputStreamId + i); | 172 base_file_path, kExpectedFirstOutputStreamId + i); |
| 173 // Flaky on Mac. http://crbug.com/700859. |
| 174 #if !defined(OS_MACOSX) |
| 173 EXPECT_TRUE(base::PathExists(file_path)); | 175 EXPECT_TRUE(base::PathExists(file_path)); |
| 174 file_size = 0; | 176 file_size = 0; |
| 175 EXPECT_TRUE(base::GetFileSize(file_path, &file_size)); | 177 EXPECT_TRUE(base::GetFileSize(file_path, &file_size)); |
| 176 EXPECT_GT(file_size, kWaveHeaderSizeBytes); | 178 EXPECT_GT(file_size, kWaveHeaderSizeBytes); |
| 179 #endif |
| 177 base::DeleteFile(file_path, false); | 180 base::DeleteFile(file_path, false); |
| 178 } | 181 } |
| 179 | 182 |
| 180 // Remove temp dir. | 183 // Remove temp dir. |
| 181 // TODO(grunell): Re-enable or remove the following line as part of | 184 // TODO(grunell): Re-enable or remove the following line as part of |
| 182 // http://crbug.com/697845. If re-enabled, also add expectations on | 185 // http://crbug.com/697845. If re-enabled, also add expectations on |
| 183 // base::DeleteFile() success. | 186 // base::DeleteFile() success. |
| 184 // EXPECT_TRUE(base::IsDirectoryEmpty(temp_dir_path)); | 187 // EXPECT_TRUE(base::IsDirectoryEmpty(temp_dir_path)); |
| 185 base::DeleteFile(temp_dir_path, false); | 188 base::DeleteFile(temp_dir_path, false); |
| 186 | 189 |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 } | 329 } |
| 327 | 330 |
| 328 // Verify that no other files exist and remove temp dir. | 331 // Verify that no other files exist and remove temp dir. |
| 329 EXPECT_TRUE(base::IsDirectoryEmpty(temp_dir_path)); | 332 EXPECT_TRUE(base::IsDirectoryEmpty(temp_dir_path)); |
| 330 EXPECT_TRUE(base::DeleteFile(temp_dir_path, false)); | 333 EXPECT_TRUE(base::DeleteFile(temp_dir_path, false)); |
| 331 | 334 |
| 332 base::ThreadRestrictions::SetIOAllowed(prev_io_allowed); | 335 base::ThreadRestrictions::SetIOAllowed(prev_io_allowed); |
| 333 } | 336 } |
| 334 | 337 |
| 335 } // namespace content | 338 } // namespace content |
| OLD | NEW |