@@ -336,7 +336,7 @@ StyledItem {
336336 respondedSpy.clear();
337337 teaseSpy.clear();
338338 emergencySpy.clear();
339− LightDMController.sessionMode = "full";
339+ LightDMController.reset();
340340 LightDM.Sessions.iconSearchDirectories = [testIconDirectory];
341341 }
342342
@@ -394,34 +394,16 @@ StyledItem {
394394 }
395395
396396 function test_changingSessionSticksToUser() {
397− LightDMController.sessionMode = "full";
398−
399397 var loginList = findChild(view, "loginList");
400− var fakeSession1 = "ASessionWillNeverBeCalledThis";
401− var fakeSession2 = "ASessionWillAlsoNeverBeCalledThis";
402−
403− // For this test to work, a user has to be selected and the
404− // mock must be made aware of that user
405− selectUser("has-password")
406− LightDMController.currentUsername = "has-password"
407− compare(LightDM.Sessions.count > 1, true);
408− compare(loginList.currentSession != fakeSession1, true);
409− LightDMController.sessionName = fakeSession1;
410−
411− selectUser("has-pin")
412− LightDMController.currentUsername = "has-pin"
413− compare(loginList.currentSession != fakeSession2, true);
414− LightDMController.sessionName = fakeSession2;
415398
416− selectUser("has-password")
417− tryCompare(loginList, "currentSession", fakeSession1);
399+ selectUser("invalid-session");
400+ tryCompare(loginList, "currentSession", "invalid");
418401
419− selectUser("has-pin")
420− tryCompare(loginList, "currentSession", fakeSession2);
402+ selectUser("has-password");
403+ tryCompare(loginList, "currentSession", "ubuntu");
421404
422− // Force a model reset
423− LightDMController.userMode = "single";
424− LightDMController.userMode = "full";
405+ selectUser("invalid-session")
406+ tryCompare(loginList, "currentSession", "invalid");
425407 }
426408
427409 function test_tease_data() {
@@ -494,9 +476,6 @@ StyledItem {
494476 }
495477
496478 function test_sessionIconNotShownWithActiveUser() {
497− LightDMController.sessionMode = "full";
498− compare(LightDM.Sessions.count > 1, true);
499−
500479 selectUser("active");
501480
502481 var sessionChooserButton = findChild(view, "sessionChooserButton");
@@ -504,9 +483,6 @@ StyledItem {
504483 }
505484
506485 function test_sessionIconShownWithMultipleSessions() {
507− LightDMController.sessionMode = "full";
508− compare(LightDM.Sessions.count > 1, true);
509−
510486 selectUser("has-password");
511487
512488 var sessionChooserButton = findChild(view, "sessionChooserButton");