From a5d0e139cbd332419d2e82f45e8656462e39d029 Mon Sep 17 00:00:00 2001 From: charles kerr Date: Sat, 19 Dec 2015 23:09:49 -0600 Subject: remove 'high_volume' property from volume-control --- tests/notifications-test.cc | 6 +++--- tests/volume-control-mock.vala | 4 ---- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/notifications-test.cc b/tests/notifications-test.cc index ec9d915..19aeac1 100644 --- a/tests/notifications-test.cc +++ b/tests/notifications-test.cc @@ -385,7 +385,7 @@ TEST_F(NotificationsTest, HighVolume) { /* Set high volume with volume change */ notifications->clearNotifications(); - volume_control_mock_set_high_volume(VOLUME_CONTROL_MOCK(volumeControl.get()), true); + volume_warning_mock_set_high_volume(VOLUME_WARNING_MOCK(volumeWarning.get()), true); setMockVolume(volumeControl, 0.90); loop(50); notev = notifications->getNotifications(); @@ -395,14 +395,14 @@ TEST_F(NotificationsTest, HighVolume) { EXPECT_GVARIANT_EQ("@s 'true'", notev[0].hints["x-canonical-value-bar-tint"]); /* Move it back */ - volume_control_mock_set_high_volume(VOLUME_CONTROL_MOCK(volumeControl.get()), false); + volume_warning_mock_set_high_volume(VOLUME_WARNING_MOCK(volumeWarning.get()), false); setMockVolume(volumeControl, 0.50); loop(50); /* Set high volume without level change */ /* NOTE: This can happen if headphones are plugged in */ notifications->clearNotifications(); - volume_control_mock_set_high_volume(VOLUME_CONTROL_MOCK(volumeControl.get()), TRUE); + volume_warning_mock_set_high_volume(VOLUME_WARNING_MOCK(volumeWarning.get()), true); loop(50); notev = notifications->getNotifications(); ASSERT_EQ(1, notev.size()); diff --git a/tests/volume-control-mock.vala b/tests/volume-control-mock.vala index f21f5c0..95d6a6a 100644 --- a/tests/volume-control-mock.vala +++ b/tests/volume-control-mock.vala @@ -20,10 +20,6 @@ public class VolumeControlMock : VolumeControl { - private bool _high_volume = false; - public override bool high_volume { get { return _high_volume; } protected set { _high_volume = value; } } - public void set_high_volume(bool b) { high_volume = b; } - public string mock_stream { get; set; default = "multimedia"; } public override string stream { get { return mock_stream; } } public void mock_set_is_ready(bool b) { ready = b; } -- cgit v1.2.3