~mterry/indicator-sound/snap-root

« back to all changes in this revision

Viewing changes to tests/notifications-test.cc

  • Committer: CI Train Bot
  • Author(s): Xavi Garcia Mena
  • Date: 2016-01-05 15:08:02 UTC
  • mfrom: (513.1.2 restore-osd-notifications)
  • Revision ID: ci-train-bot@canonical.com-20160105150802-9n0tg5ipbbq2qbab
This branch just readds the OSD notifications code, that was reverted in trunk as the corresponding silo was also rolled back after landing.
Approved by: PS Jenkins bot, Xavi Garcia

Show diffs side-by-side

added added

removed removed

Lines of Context:
345
345
        auto notev = notifications->getNotifications();
346
346
        ASSERT_EQ(1, notev.size());
347
347
        EXPECT_EQ("Volume", notev[0].summary);
348
 
        EXPECT_EQ("", notev[0].body);
 
348
        EXPECT_EQ("Speakers", notev[0].body);
349
349
        EXPECT_GVARIANT_EQ("@s 'false'", notev[0].hints["x-canonical-value-bar-tint"]);
350
350
 
351
351
        /* Set high volume with volume change */
356
356
        notev = notifications->getNotifications();
357
357
        ASSERT_LT(0, notev.size()); /* This passes with one or two since it would just be an update to the first if a second was sent */
358
358
        EXPECT_EQ("Volume", notev[0].summary);
359
 
        EXPECT_EQ("High volume can damage your hearing.", notev[0].body);
 
359
        EXPECT_EQ("Speakers", notev[0].body);
360
360
        EXPECT_GVARIANT_EQ("@s 'true'", notev[0].hints["x-canonical-value-bar-tint"]);
361
361
 
362
362
        /* Move it back */
372
372
        notev = notifications->getNotifications();
373
373
        ASSERT_EQ(1, notev.size());
374
374
        EXPECT_EQ("Volume", notev[0].summary);
375
 
        EXPECT_EQ("High volume can damage your hearing.", notev[0].body);
 
375
        EXPECT_EQ("Speakers", notev[0].body);
376
376
        EXPECT_GVARIANT_EQ("@s 'true'", notev[0].hints["x-canonical-value-bar-tint"]);
377
377
}
378
378