@@ -18,6 +18,7 @@ import QtQuick 2.4
18import QtTest 1.0
18import QtTest 1.0
19import ".."
19import ".."
20import "../../../qml/Greeter"
20import "../../../qml/Greeter"
21+import LightDMController 0.1
21import LightDM.FullLightDM 0.1 as LightDM
22import LightDM.FullLightDM 0.1 as LightDM
22import Ubuntu.Components 1.3
23import Ubuntu.Components 1.3
23import Unity.Test 0.1 as UT
24import Unity.Test 0.1 as UT
@@ -265,15 +266,15 @@ StyledItem {
265 id: multipleSessionsCheckbox
266 id: multipleSessionsCheckbox
266 onClicked: {
267 onClicked: {
267 if (checked) {
268 if (checked) {
268− LightDM.Sessions.mock.sessionMode = "full";
269+ LightDMController.sessionMode = "full";
270− LightDM.Sessions.mock.sessionMode = "single";
271+ LightDMController.sessionMode = "single";
273 Connections {
274 Connections {
274 target: LightDM.Sessions.mock
275 target: LightDM.Sessions.mock
275 onSessionModeChanged: {
276 onSessionModeChanged: {
276− if (LightDM.Sessions.mock.sessionMode === "full") {
277+ if (LightDMController.sessionMode === "full") {
277 multipleSessionsCheckbox.checked = true;
278 multipleSessionsCheckbox.checked = true;
279 multipleSessionsCheckbox.checked = false;
280 multipleSessionsCheckbox.checked = false;
@@ -291,9 +292,9 @@ StyledItem {
292 width: units.gu(10)
293 width: units.gu(10)
293 minimumValue: 0
294 minimumValue: 0
294− maximumValue: LightDM.Sessions.mock.numAvailableSessions
295+ maximumValue: LightDMController.numAvailableSessions
295− value: LightDM.Sessions.mock.numSessions
296+ value: LightDMController.numSessions
296− visible: LightDM.Sessions.mock.sessionMode === "full"
297+ visible: LightDMController.sessionMode === "full"
297 Binding {
298 Binding {
298 target: LightDM.Sessions.mock
299 target: LightDM.Sessions.mock
299 property: "numSessions"
300 property: "numSessions"
@@ -362,7 +363,7 @@ StyledItem {
362 respondedSpy.clear();
363 respondedSpy.clear();
363 teaseSpy.clear();
364 teaseSpy.clear();
364 emergencySpy.clear();
365 emergencySpy.clear();
365− LightDM.Sessions.mock.sessionMode = "full";
366+ LightDMController.sessionMode = "full";
366 LightDM.Sessions.iconSearchDirectories = [testIconDirectory];
367 LightDM.Sessions.iconSearchDirectories = [testIconDirectory];
@@ -467,12 +468,12 @@ StyledItem {
469 function test_noSessionsDoesntBreakView() {
470 function test_noSessionsDoesntBreakView() {
470− LightDM.Sessions.mock.sessionMode = "none";
471+ LightDMController.sessionMode = "none";
471 compare(LightDM.Sessions.count, 0)
472 compare(LightDM.Sessions.count, 0)
474 function test_sessionIconNotShownWithOneSession() {
475 function test_sessionIconNotShownWithOneSession() {
475− LightDM.Sessions.mock.sessionMode = "single";
476+ LightDMController.sessionMode = "single";
476 compare(LightDM.Sessions.count, 1);
477 compare(LightDM.Sessions.count, 1);
478 var sessionChooserButton = findChild(view, "sessionChooserButton");
479 var sessionChooserButton = findChild(view, "sessionChooserButton");
@@ -480,7 +481,7 @@ StyledItem {
482 function test_sessionIconNotShownWithActiveUser() {
483 function test_sessionIconNotShownWithActiveUser() {
483− LightDM.Sessions.mock.sessionMode = "full";
484+ LightDMController.sessionMode = "full";
484 compare(LightDM.Sessions.count > 1, true);
485 compare(LightDM.Sessions.count > 1, true);
486 selectUser("active");
487 selectUser("active");
@@ -490,7 +491,7 @@ StyledItem {
492 function test_sessionIconShownWithMultipleSessions() {
493 function test_sessionIconShownWithMultipleSessions() {
493− LightDM.Sessions.mock.sessionMode = "full";
494+ LightDMController.sessionMode = "full";
494 compare(LightDM.Sessions.count > 1, true);
495 compare(LightDM.Sessions.count > 1, true);
496 selectUser("has-password");
497 selectUser("has-password");