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

Side by Side Diff: trunk/src/content/renderer/media/media_stream_audio_processor_unittest.cc

Issue 105823009: Revert 239280 "Move more file_util functions to base namespace." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 28 matching lines...) Expand all
39 void ReadDataFromSpeechFile(char* data, int length) { 39 void ReadDataFromSpeechFile(char* data, int length) {
40 base::FilePath file; 40 base::FilePath file;
41 CHECK(PathService::Get(base::DIR_SOURCE_ROOT, &file)); 41 CHECK(PathService::Get(base::DIR_SOURCE_ROOT, &file));
42 file = file.Append(FILE_PATH_LITERAL("media")) 42 file = file.Append(FILE_PATH_LITERAL("media"))
43 .Append(FILE_PATH_LITERAL("test")) 43 .Append(FILE_PATH_LITERAL("test"))
44 .Append(FILE_PATH_LITERAL("data")) 44 .Append(FILE_PATH_LITERAL("data"))
45 .Append(FILE_PATH_LITERAL("speech_16b_stereo_48kHz.raw")); 45 .Append(FILE_PATH_LITERAL("speech_16b_stereo_48kHz.raw"));
46 DCHECK(base::PathExists(file)); 46 DCHECK(base::PathExists(file));
47 int64 data_file_size64 = 0; 47 int64 data_file_size64 = 0;
48 DCHECK(base::GetFileSize(file, &data_file_size64)); 48 DCHECK(base::GetFileSize(file, &data_file_size64));
49 EXPECT_EQ(length, base::ReadFile(file, data, length)); 49 EXPECT_EQ(length, file_util::ReadFile(file, data, length));
50 DCHECK(data_file_size64 > length); 50 DCHECK(data_file_size64 > length);
51 } 51 }
52 52
53 void ApplyFixedAudioConstraints(RTCMediaConstraints* constraints) { 53 void ApplyFixedAudioConstraints(RTCMediaConstraints* constraints) {
54 // Constant constraint keys which enables default audio constraints on 54 // Constant constraint keys which enables default audio constraints on
55 // mediastreams with audio. 55 // mediastreams with audio.
56 struct { 56 struct {
57 const char* key; 57 const char* key;
58 const char* value; 58 const char* value;
59 } static const kDefaultAudioConstraints[] = { 59 } static const kDefaultAudioConstraints[] = {
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 audio_processor.SetCaptureFormat(params_); 157 audio_processor.SetCaptureFormat(params_);
158 EXPECT_TRUE(audio_processor.has_audio_processing()); 158 EXPECT_TRUE(audio_processor.has_audio_processing());
159 159
160 ProcessDataAndVerifyFormat(&audio_processor, 160 ProcessDataAndVerifyFormat(&audio_processor,
161 kAudioProcessingSampleRate, 161 kAudioProcessingSampleRate,
162 kAudioProcessingNumberOfChannel, 162 kAudioProcessingNumberOfChannel,
163 kAudioProcessingSampleRate / 100); 163 kAudioProcessingSampleRate / 100);
164 } 164 }
165 165
166 } // namespace content 166 } // namespace content
OLDNEW
« no previous file with comments | « trunk/src/content/gpu/gpu_watchdog_thread.cc ('k') | trunk/src/content/renderer/media/webrtc_audio_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698