|
Lines 1381-1386
Link Here
|
| 1381 |
assertFalse( executed.get() ); |
1381 |
assertFalse( executed.get() ); |
| 1382 |
} |
1382 |
} |
| 1383 |
|
1383 |
|
|
|
1384 |
public void testRemoveShell_VisibleActiveShell() { |
| 1385 |
Fixture.fakePhase( PhaseId.PROCESS_ACTION ); |
| 1386 |
Display display = new Display(); |
| 1387 |
Shell visibleShell = new Shell( display ); |
| 1388 |
visibleShell.open(); |
| 1389 |
Shell invisibleShell = new Shell( display ); |
| 1390 |
Shell shell = new Shell( display ); |
| 1391 |
shell.open(); |
| 1392 |
|
| 1393 |
shell.close(); |
| 1394 |
|
| 1395 |
assertFalse( invisibleShell.isVisible() ); |
| 1396 |
assertSame( visibleShell, display.getActiveShell() ); |
| 1397 |
} |
| 1398 |
|
| 1399 |
public void testRemoveShell_NoActiveShell() { |
| 1400 |
Fixture.fakePhase( PhaseId.PROCESS_ACTION ); |
| 1401 |
Display display = new Display(); |
| 1402 |
Shell invisibleShell = new Shell( display ); |
| 1403 |
Shell shell = new Shell( display ); |
| 1404 |
shell.open(); |
| 1405 |
|
| 1406 |
shell.close(); |
| 1407 |
|
| 1408 |
assertFalse( invisibleShell.isVisible() ); |
| 1409 |
assertNull( display.getActiveShell() ); |
| 1410 |
} |
| 1411 |
|
| 1384 |
private static void setCursorLocation( Display display, int x, int y ) { |
1412 |
private static void setCursorLocation( Display display, int x, int y ) { |
| 1385 |
IDisplayAdapter adapter = display.getAdapter( IDisplayAdapter.class ); |
1413 |
IDisplayAdapter adapter = display.getAdapter( IDisplayAdapter.class ); |
| 1386 |
adapter.setCursorLocation( x, y ); |
1414 |
adapter.setCursorLocation( x, y ); |