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

Unified Diff: chrome/renderer/audio_message_filter_unittest.cc

Issue 357004: SetVolume and GetVolume take one volume instead of separate left and right vo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/audio_message_filter.cc ('k') | chrome/renderer/media/audio_renderer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/audio_message_filter_unittest.cc
===================================================================
--- chrome/renderer/audio_message_filter_unittest.cc (revision 30948)
+++ chrome/renderer/audio_message_filter_unittest.cc (working copy)
@@ -34,10 +34,9 @@
length_ = length;
}
- virtual void OnVolume(double left, double right) {
+ virtual void OnVolume(double volume) {
volume_received_ = true;
- left_ = left;
- right_ = right;
+ volume_ = volume;
}
void Reset() {
@@ -53,8 +52,7 @@
length_ = 0;
volume_received_ = false;
- left_ = 0;
- right_ = 0;
+ volume_ = 0;
}
bool request_packet_received() { return request_packet_received_; }
@@ -69,8 +67,7 @@
size_t length() { return length_; }
bool volume_received() { return volume_received_; }
- double left() { return left_; }
- double right() { return right_; }
+ double volume() { return volume_; }
private:
bool request_packet_received_;
@@ -85,8 +82,7 @@
size_t length_;
bool volume_received_;
- double left_;
- double right_;
+ double volume_;
DISALLOW_COPY_AND_ASSIGN(MockAudioDelegate);
};
@@ -139,15 +135,12 @@
delegate.Reset();
// ViewMsg_NotifyAudioStreamVolume
- const double kLeftVolume = 1.0;
- const double kRightVolume = 2.0;
+ const double kVolume = 1.0;
EXPECT_FALSE(delegate.volume_received());
filter->OnMessageReceived(
- ViewMsg_NotifyAudioStreamVolume(kRouteId, stream_id,
- kLeftVolume, kRightVolume));
+ ViewMsg_NotifyAudioStreamVolume(kRouteId, stream_id, kVolume));
EXPECT_TRUE(delegate.volume_received());
- EXPECT_EQ(kLeftVolume, delegate.left());
- EXPECT_EQ(kRightVolume, delegate.right());
+ EXPECT_EQ(kVolume, delegate.volume());
delegate.Reset();
message_loop.RunAllPending();
« no previous file with comments | « chrome/renderer/audio_message_filter.cc ('k') | chrome/renderer/media/audio_renderer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698