394
394
.string_attribute("x-canonical-type", "com.canonical.unity.media-player")
396
396
.item(mh::MenuItemMatcher()
397
.string_attribute("x-canonical-previous-action","indicator.previous.testplayer1.desktop")
398
397
.string_attribute("x-canonical-play-action","indicator.play.testplayer1.desktop")
399
.string_attribute("x-canonical-next-action","indicator.next.testplayer1.desktop")
400
398
.string_attribute("x-canonical-type","com.canonical.unity.playback-item")
925
923
.string_attribute("x-canonical-type", "com.canonical.unity.media-player")
927
925
.item(mh::MenuItemMatcher()
928
.string_attribute("x-canonical-previous-action","indicator.previous.testplayer3.desktop")
929
.string_attribute("x-canonical-play-action","indicator.play.testplayer3.desktop")
930
.string_attribute("x-canonical-next-action","indicator.next.testplayer3.desktop")
931
.string_attribute("x-canonical-type","com.canonical.unity.playback-item")
934
.item(mh::MenuItemMatcher()
935
.label("Sound Settings…")
926
.string_attribute("x-canonical-play-action","indicator.play.testplayer3.desktop")
927
.string_attribute("x-canonical-type","com.canonical.unity.playback-item")
930
.item(mh::MenuItemMatcher()
931
.label("Sound Settings…")
935
// check that the last running player is the one we expect
936
QVariant lastPlayerRunning = waitLastRunningPlayerChanged();
937
EXPECT_TRUE(lastPlayerRunning.type() == QVariant::String);
938
EXPECT_EQ(lastPlayerRunning.toString(), "testplayer3.desktop");
940
// restart the indicator to simulate a new user session
941
ASSERT_NO_THROW(startIndicator());
943
// check that player 3 is the only one with playback controls
944
// as it was the last one being stopped
945
EXPECT_MATCHRESULT(mh::MenuMatcher(desktopParameters())
946
.item(mh::MenuItemMatcher()
947
.action("indicator.root")
948
.string_attribute("x-canonical-type", "com.canonical.indicator.root")
949
.string_attribute("x-canonical-secondary-action", "indicator.mute")
950
.mode(mh::MenuItemMatcher::Mode::all)
952
.item(mh::MenuItemMatcher()
954
.item(mh::MenuItemMatcher().checkbox()
957
.item(volumeSlider(INITIAL_VOLUME, "Volume"))
959
.item(mh::MenuItemMatcher()
961
.item(mh::MenuItemMatcher()
962
.action("indicator.testplayer3.desktop")
963
.label("TestPlayer3")
964
.themed_icon("icon", {"testplayer"})
965
.string_attribute("x-canonical-type", "com.canonical.unity.media-player")
967
.item(mh::MenuItemMatcher()
968
.string_attribute("x-canonical-play-action","indicator.play.testplayer3.desktop")
969
.string_attribute("x-canonical-type","com.canonical.unity.playback-item")
972
.item(mh::MenuItemMatcher()
974
.item(mh::MenuItemMatcher()
975
.action("indicator.testplayer1.desktop")
976
.label("TestPlayer1")
977
.themed_icon("icon", {"testplayer"})
978
.string_attribute("x-canonical-type", "com.canonical.unity.media-player")
981
.item(mh::MenuItemMatcher()
983
.item(mh::MenuItemMatcher()
984
.action("indicator.testplayer2.desktop")
985
.label("TestPlayer2")
986
.themed_icon("icon", {"testplayer"})
987
.string_attribute("x-canonical-type", "com.canonical.unity.media-player")
990
.item(mh::MenuItemMatcher()
991
.label("Sound Settings…")
940
997
TEST_F(TestIndicator, DesktopMprisPlayerButtonsState)