@@ -25,6 +25,7 @@ import Ubuntu.Components 1.1
2525import Ubuntu.Telephony 0.1 as Telephony
2626import Unity.Application 0.1
2727import Unity.Connectivity 0.1
28+import Unity.Indicators 0.1
2829import Unity.Notifications 1.0
2930import Unity.Test 0.1 as UT
3031import Powerd 0.1
@@ -169,6 +170,7 @@ Item {
169170
170171 function init() {
171172 tryCompare(shell, "enabled", true); // enabled by greeter when ready
173+ shell.indicatorProfile = "phone";
172174
173175 swipeAwayGreeter();
174176
@@ -547,15 +549,30 @@ Item {
547549 }
548550
549551 function test_greeterDoesNotChangeIndicatorProfile() {
550− var visibleIndicators = findChild(shell, "visibleIndicators");
551− tryCompare(visibleIndicators, "profile", shell.indicatorProfile);
552+ var panel = findChild(shell, "panel");
553+ tryCompare(panel.indicators.indicatorsModel, "profile", shell.indicatorProfile);
552554
553− var greeter = findChild(shell, "greeter");
554− greeter.show();
555− tryCompare(visibleIndicators, "profile", shell.indicatorProfile);
555+ LightDM.Greeter.showGreeter();
556+ tryCompare(panel.indicators.indicatorsModel, "profile", shell.indicatorProfile);
557+
558+ LightDM.Greeter.hideGreeter();
559+ tryCompare(panel.indicators.indicatorsModel, "profile", shell.indicatorProfile);
560+ }
556561
557− greeter.hide();
558− tryCompare(visibleIndicators, "profile", shell.indicatorProfile);
562+ function test_shellProfileChangesReachIndicators() {
563+ var panel = findChild(shell, "panel");
564+
565+ shell.indicatorProfile = "test1";
566+ for (var i = 0; i < panel.indicators.indicatorsModel.count; ++i) {
567+ var properties = panel.indicators.indicatorsModel.data(i, IndicatorsModelRole.IndicatorProperties);
568+ verify(properties["menuObjectPath"].substr(-5), "test1");
569+ }
570+
571+ shell.indicatorProfile = "test2";
572+ for (var i = 0; i < panel.indicators.indicatorsModel.count; ++i) {
573+ var properties = panel.indicators.indicatorsModel.data(i, IndicatorsModelRole.IndicatorProperties);
574+ verify(properties["menuObjectPath"].substr(-5), "test2");
575+ }
559576 }
560577
561578 function test_focusRequestedHidesGreeter() {