aboutsummaryrefslogtreecommitdiff
path: root/tests/integration/test-indicator.cpp
diff options
context:
space:
mode:
authorcharles kerr <charlesk@canonical.com>2016-01-13 20:37:55 +0000
committerCI Train Bot <ci-train-bot@canonical.com>2016-01-13 20:37:55 +0000
commite43001712810b56a1579545ecafd9f9826e7a438 (patch)
tree068221198bc1ca78180ac7106d2303cbc4e3079e /tests/integration/test-indicator.cpp
parent9a861c0911ce8345f48909993249c8a74d8bfb2c (diff)
parent9b72c7f662440844bf59521e124f59bcbddec4a5 (diff)
downloadayatana-indicator-sound-e43001712810b56a1579545ecafd9f9826e7a438.tar.gz
ayatana-indicator-sound-e43001712810b56a1579545ecafd9f9826e7a438.tar.bz2
ayatana-indicator-sound-e43001712810b56a1579545ecafd9f9826e7a438.zip
Be more selective about when to show and dismiss the High Volume Warning Dialog. Fixes: #1504065
Approved by: PS Jenkins bot, Xavi Garcia
Diffstat (limited to 'tests/integration/test-indicator.cpp')
-rw-r--r--tests/integration/test-indicator.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/integration/test-indicator.cpp b/tests/integration/test-indicator.cpp
index 1f357d7..9224b73 100644
--- a/tests/integration/test-indicator.cpp
+++ b/tests/integration/test-indicator.cpp
@@ -32,7 +32,7 @@ class TestIndicator: public IndicatorSoundTestBase
{
};
-TEST_F(TestIndicator, PhoneChangeRoleVolume)
+TEST_F(TestIndicator, DISABLED_PhoneChangeRoleVolume)
{
double INITIAL_VOLUME = 0.0;
@@ -46,11 +46,11 @@ TEST_F(TestIndicator, PhoneChangeRoleVolume)
// start now the indicator, so it picks the new volumes
ASSERT_NO_THROW(startIndicator());
- // Generate a random volume
+ // Generate a random volume in the range [0...0.33]
QTime now = QTime::currentTime();
qsrand(now.msec());
- int randInt = qrand() % 100;
- double randomVolume = randInt / 100.0;
+ int randInt = qrand() % 33;
+ const double randomVolume = randInt / 100.0;
QSignalSpy &userAccountsSpy = *signal_spy_volume_changed_;
// set an initial volume to the alert role
@@ -542,6 +542,7 @@ TEST_F(TestIndicator, DesktopChangeRoleVolume)
{
double INITIAL_VOLUME = 0.0;
+ EXPECT_TRUE(resetAllowAmplifiedVolume());
ASSERT_NO_THROW(startAccountsService());
ASSERT_NO_THROW(startPulseDesktop());
@@ -556,11 +557,11 @@ TEST_F(TestIndicator, DesktopChangeRoleVolume)
// start now the indicator, so it picks the new volumes
ASSERT_NO_THROW(startIndicator());
- // Generate a random volume
+ // Generate a random volume in the range [0...0.33]
QTime now = QTime::currentTime();
qsrand(now.msec());
- int randInt = qrand() % 100;
- double randomVolume = randInt / 100.0;
+ int randInt = qrand() % 33;
+ const double randomVolume = randInt / 100.0;
// play a test sound, it should NOT change the role in the indicator
EXPECT_TRUE(startTestSound("multimedia"));