@@ -18,6 +18,7 @@ import QtQuick 2.4
1818import QtTest 1.0
1919import ".."
2020import "../../../qml/Greeter"
21+import LightDMController 0.1
2122import LightDM.FullLightDM 0.1 as LightDM
2223import Ubuntu.Components 1.3
2324import Unity.Test 0.1 as UT
@@ -265,15 +266,15 @@ StyledItem {
265266 id: multipleSessionsCheckbox
266267 onClicked: {
267268 if (checked) {
268− LightDM.Sessions.mock.sessionMode = "full";
269+ LightDMController.sessionMode = "full";
269270 } else {
270− LightDM.Sessions.mock.sessionMode = "single";
271+ LightDMController.sessionMode = "single";
271272 }
272273 }
273274 Connections {
274275 target: LightDM.Sessions.mock
275276 onSessionModeChanged: {
276− if (LightDM.Sessions.mock.sessionMode === "full") {
277+ if (LightDMController.sessionMode === "full") {
277278 multipleSessionsCheckbox.checked = true;
278279 } else {
279280 multipleSessionsCheckbox.checked = false;
@@ -291,9 +292,9 @@ StyledItem {
291292
292293 width: units.gu(10)
293294 minimumValue: 0
294− maximumValue: LightDM.Sessions.mock.numAvailableSessions
295− value: LightDM.Sessions.mock.numSessions
296− visible: LightDM.Sessions.mock.sessionMode === "full"
295+ maximumValue: LightDMController.numAvailableSessions
296+ value: LightDMController.numSessions
297+ visible: LightDMController.sessionMode === "full"
297298 Binding {
298299 target: LightDM.Sessions.mock
299300 property: "numSessions"
@@ -362,7 +363,7 @@ StyledItem {
362363 respondedSpy.clear();
363364 teaseSpy.clear();
364365 emergencySpy.clear();
365− LightDM.Sessions.mock.sessionMode = "full";
366+ LightDMController.sessionMode = "full";
366367 LightDM.Sessions.iconSearchDirectories = [testIconDirectory];
367368 }
368369
@@ -467,12 +468,12 @@ StyledItem {
467468 }
468469
469470 function test_noSessionsDoesntBreakView() {
470− LightDM.Sessions.mock.sessionMode = "none";
471+ LightDMController.sessionMode = "none";
471472 compare(LightDM.Sessions.count, 0)
472473 }
473474
474475 function test_sessionIconNotShownWithOneSession() {
475− LightDM.Sessions.mock.sessionMode = "single";
476+ LightDMController.sessionMode = "single";
476477 compare(LightDM.Sessions.count, 1);
477478
478479 var sessionChooserButton = findChild(view, "sessionChooserButton");
@@ -480,7 +481,7 @@ StyledItem {
480481 }
481482
482483 function test_sessionIconNotShownWithActiveUser() {
483− LightDM.Sessions.mock.sessionMode = "full";
484+ LightDMController.sessionMode = "full";
484485 compare(LightDM.Sessions.count > 1, true);
485486
486487 selectUser("active");
@@ -490,7 +491,7 @@ StyledItem {
490491 }
491492
492493 function test_sessionIconShownWithMultipleSessions() {
493− LightDM.Sessions.mock.sessionMode = "full";
494+ LightDMController.sessionMode = "full";
494495 compare(LightDM.Sessions.count > 1, true);
495496
496497 selectUser("has-password");