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

Side by Side Diff: remoting/host/linux/audio_pipe_reader_unittest.cc

Issue 2317123003: misc files R-U: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Just rebased Created 4 years, 2 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 unified diff | Download patch
OLDNEW
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/stat.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 #include <unistd.h> 9 #include <unistd.h>
10 10
(...skipping 12 matching lines...) Expand all
23 23
24 class AudioPipeReaderTest : public testing::Test, 24 class AudioPipeReaderTest : public testing::Test,
25 public AudioPipeReader::StreamObserver { 25 public AudioPipeReader::StreamObserver {
26 public: 26 public:
27 AudioPipeReaderTest() 27 AudioPipeReaderTest()
28 : stop_at_position_(-1) { 28 : stop_at_position_(-1) {
29 } 29 }
30 30
31 void SetUp() override { 31 void SetUp() override {
32 ASSERT_TRUE(test_dir_.CreateUniqueTempDir()); 32 ASSERT_TRUE(test_dir_.CreateUniqueTempDir());
33 pipe_path_ = test_dir_.path().AppendASCII("test_pipe"); 33 pipe_path_ = test_dir_.GetPath().AppendASCII("test_pipe");
34 audio_thread_.reset(new base::Thread("TestAudioThread")); 34 audio_thread_.reset(new base::Thread("TestAudioThread"));
35 audio_thread_->StartWithOptions( 35 audio_thread_->StartWithOptions(
36 base::Thread::Options(base::MessageLoop::TYPE_IO, 0)); 36 base::Thread::Options(base::MessageLoop::TYPE_IO, 0));
37 reader_ = AudioPipeReader::Create(audio_thread_->task_runner(), 37 reader_ = AudioPipeReader::Create(audio_thread_->task_runner(),
38 pipe_path_); 38 pipe_path_);
39 reader_->AddObserver(this); 39 reader_->AddObserver(this);
40 } 40 }
41 41
42 // AudioPipeReader::StreamObserver interface. 42 // AudioPipeReader::StreamObserver interface.
43 void OnDataRead(scoped_refptr<base::RefCountedString> data) override { 43 void OnDataRead(scoped_refptr<base::RefCountedString> data) override {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 base::TimeTicks start_time = base::TimeTicks::Now(); 114 base::TimeTicks start_time = base::TimeTicks::Now();
115 ASSERT_NO_FATAL_FAILURE(WriteAndWait(test_data)); 115 ASSERT_NO_FATAL_FAILURE(WriteAndWait(test_data));
116 base::TimeDelta time_passed = base::TimeTicks::Now() - start_time; 116 base::TimeDelta time_passed = base::TimeTicks::Now() - start_time;
117 117
118 EXPECT_EQ(test_data, read_data_); 118 EXPECT_EQ(test_data, read_data_);
119 EXPECT_GE(time_passed, base::TimeDelta::FromMilliseconds(500)); 119 EXPECT_GE(time_passed, base::TimeDelta::FromMilliseconds(500));
120 } 120 }
121 121
122 } // namespace remoting 122 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/host_config_unittest.cc ('k') | remoting/host/linux/certificate_watcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698