Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 278195 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/swt/widgets/Shell_Test.java (+29 lines)
Lines 316-321 Link Here
316
    assertEquals( shell.getBounds(), display.getBounds() );
316
    assertEquals( shell.getBounds(), display.getBounds() );
317
  }
317
  }
318
  
318
  
319
  public void testSetBoundsResetMaximized() {
320
    Display display = new Display();
321
    Shell shell = new Shell( display );
322
    shell.setBounds( 1, 2, 3, 4 );
323
    shell.setMaximized( true );
324
    Rectangle bounds = new Rectangle( 10, 10, 10, 10 );
325
    shell.setBounds( bounds );
326
    assertFalse( shell.getMaximized() );
327
    assertEquals( bounds, shell.getBounds() );
328
  }
329
  
330
  public void testSetLocationResetMaximized() {
331
    Display display = new Display();
332
    Shell shell = new Shell( display );
333
    shell.setBounds( 1, 2, 3, 4 );
334
    shell.setMaximized( true );
335
    shell.setLocation( 10, 10 );
336
    assertFalse( shell.getMaximized() );
337
  }
338
  
339
  public void testSetSizeResetMaximized() {
340
    Display display = new Display();
341
    Shell shell = new Shell( display );
342
    shell.setBounds( 1, 2, 3, 4 );
343
    shell.setMaximized( true );
344
    shell.setSize( 6, 6 );
345
    assertFalse( shell.getMaximized() );
346
  }
347
  
319
  protected void setUp() throws Exception {
348
  protected void setUp() throws Exception {
320
    RWTFixture.setUp();
349
    RWTFixture.setUp();
321
    RWTFixture.fakePhase( PhaseId.PROCESS_ACTION );
350
    RWTFixture.fakePhase( PhaseId.PROCESS_ACTION );

Return to bug 278195