Bug 23273 - Wrong implementation of WindowDriver.close()
Wrong implementation of WindowDriver.close()
Status: CLOSED FIXED
Product: qa
Classification: Unclassified
Component: Code
3.x
Sun All
: P1 (vote)
: TBD
Assigned To: issues@qa
issues@qa
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2002-05-09 10:15 UTC by Jiri Skrivanek
Modified: 2011-02-17 09:32 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2002-05-09 10:15:15 UTC
In class DefaultWindowDriver there is following
implementation of the close method:

eDriver.dispatchEvent(oper.getSource(), 
      new WindowEvent((Window)oper.getSource(),
		      WindowEvent.WINDOW_CLOSED));
	((WindowOperator)oper).setVisible(false);

There should be WindowEvent.WINDOW_CLOSING instead
as was in WindowOperator before.

Test case to reproduce (run in IDE):

        JFrameOperator frame = new
JFrameOperator("Explorer [");
        JTreeOperator tree = new
JTreeOperator(frame);
        String sampledir =
System.getProperty("netbeans.user")+File.separator+"sampledir";
        TreePath path =
tree.findPath(sampledir+"|examples|advanced|README",
"|");
        tree.clickOnPath(path, 2);
        JFrameOperator editor = new
JFrameOperator("Source Editor [");
        editor.close();
        tree.clickOnPath(path, 2);

Source editor is made unvisible but not actually
closed. That is why IDE doesn't open source editor
again.
Comment 1 Alexandre Iline 2002-05-11 03:42:45 UTC
53c53
< 					      
WindowEvent.WINDOW_CLOSED));
---
> 					      
WindowEvent.WINDOW_CLOSING));

Comment 2 Jiri Skrivanek 2002-05-13 08:01:33 UTC
Verified.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo