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

Side by Side Diff: chromecast/media/audio/cast_audio_output_stream_unittest.cc

Issue 1351493003: [Chromecast] Add a return value after NOTREACHED in tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 5 years, 3 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
« chromecast/media/BUILD.gn ('K') | « chromecast/media/audio/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chromecast/base/task_runner_impl.h" 5 #include "chromecast/base/task_runner_impl.h"
6 #include "chromecast/media/audio/cast_audio_manager.h" 6 #include "chromecast/media/audio/cast_audio_manager.h"
7 #include "chromecast/media/audio/cast_audio_output_stream.h" 7 #include "chromecast/media/audio/cast_audio_output_stream.h"
8 #include "chromecast/public/media/audio_pipeline_device.h" 8 #include "chromecast/public/media/audio_pipeline_device.h"
9 #include "chromecast/public/media/cast_decoder_buffer.h" 9 #include "chromecast/public/media/cast_decoder_buffer.h"
10 #include "chromecast/public/media/decoder_config.h" 10 #include "chromecast/public/media/decoder_config.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 last_frame_completion_cb_.reset(completion_cb); 73 last_frame_completion_cb_.reset(completion_cb);
74 ++pushed_frame_count_; 74 ++pushed_frame_count_;
75 75
76 switch (pipeline_status_) { 76 switch (pipeline_status_) {
77 case PIPELINE_STATUS_OK: 77 case PIPELINE_STATUS_OK:
78 return kFrameSuccess; 78 return kFrameSuccess;
79 case PIPELINE_STATUS_BUSY: 79 case PIPELINE_STATUS_BUSY:
80 return kFramePending; 80 return kFramePending;
81 case PIPELINE_STATUS_ERROR: 81 case PIPELINE_STATUS_ERROR:
82 return kFrameFailed; 82 return kFrameFailed;
83 default:
84 NOTREACHED();
83 } 85 }
84 NOTREACHED(); 86
87 // This will never be reached but is necessary for compiler warnings.
88 return kFrameFailed;
85 } 89 }
86 RenderingDelay GetRenderingDelay() const override { return RenderingDelay(); } 90 RenderingDelay GetRenderingDelay() const override { return RenderingDelay(); }
87 bool GetStatistics(Statistics* stats) const override { return false; } 91 bool GetStatistics(Statistics* stats) const override { return false; }
88 bool SetConfig(const AudioConfig& config) override { 92 bool SetConfig(const AudioConfig& config) override {
89 config_ = config; 93 config_ = config;
90 return true; 94 return true;
91 } 95 }
92 void SetStreamVolumeMultiplier(float multiplier) override { 96 void SetStreamVolumeMultiplier(float multiplier) override {
93 volume_multiplier_ = multiplier; 97 volume_multiplier_ = multiplier;
94 } 98 }
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 stream->GetVolume(&volume); 490 stream->GetVolume(&volume);
487 EXPECT_EQ(0.5, volume); 491 EXPECT_EQ(0.5, volume);
488 EXPECT_EQ(0.5f, audio_device->volume_multiplier()); 492 EXPECT_EQ(0.5f, audio_device->volume_multiplier());
489 493
490 stream->Close(); 494 stream->Close();
491 } 495 }
492 496
493 } // namespace 497 } // namespace
494 } // namespace media 498 } // namespace media
495 } // namespace chromecast 499 } // namespace chromecast
OLDNEW
« chromecast/media/BUILD.gn ('K') | « chromecast/media/audio/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698