harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulex Yang (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-2469) [classlib][awt]Windows is not focused when WindowsAdapter.windowOpened(WindowEvent e) is occurred
Date Tue, 05 Dec 2006 17:10:22 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-2469?page=all ]

Paulex Yang updated HARMONY-2469:
---------------------------------

    Summary: [classlib][awt]Windows is not focused when WindowsAdapter.windowOpened(WindowEvent
e) is occurred  (was: [awt]Windows is not focused when WindowsAdapter.windowOpened(WindowEvent
e) is occurred)

> [classlib][awt]Windows is not focused when WindowsAdapter.windowOpened(WindowEvent e)
is occurred
> -------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2469
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2469
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Artem Aliev
>            Priority: Minor
>
> There is no mention in java spec about 
> that if window has been opened with WindowsAdapter.windowOpened(WindowEvent e) 
> and became the focused.
> On RI a windows became  the focused but on Harmony does not.
> Test for bug reproducing:
> import java.awt.*;
> import java.awt.event.*;
> public class Test {
>         public static void main(String argv[]) throws Exception {
>         Frame frame = new Frame();
>         frame.addWindowListener(new WindowAdapter() {
>             public void windowOpened(WindowEvent e) {
> //                        public void windowActivated(WindowEvent e) {
>                     System.out.println(e.paramString());
>                                 if (!e.getWindow().isActive() &&
> !e.getWindow().isFocused()) {
>                     System.out.println("FAILED\n" + e.getWindow().isActive()
> +"\n"+ e.getWindow().isFocused());
>                                 } else {
>                                         System.out.println("PASSED");
>                                 }
>             }
>         });
>         frame.pack();
>         frame.setVisible(true);
>         try {
>             Thread.sleep(1000);
>         } catch (InterruptedException e1) {            
>             e1.printStackTrace();
>         }
>         frame.dispose();
>         }
> }       
> Output on RI:
> $ jj Test
> WINDOW_OPENED,opposite=null,oldState=0,newState=0
> PASSED
> Output on Harmony:
> $
> /cygdrive/z/binaries/builds/combined/20060914/drl_20060914_win_ia32_0002_icl_r_complete_DEV/bin/java
> Test
> WINDOW_OPENED,opposite=null,oldState=0,newState=0
> FAILED
> false
> false
> Failing tests:
> unitHarmony_java_awt_WinWindowRTest
> Test output:
> Time: 3.717
> There was 1 failure:
> 1) testSetVisible(java.awt.WinWindowRTest)junit.framework.AssertionFailedError:
> window is focused before opened
>         at java.awt.WinWindowRTest$1.windowOpened(WinWindowRTest.java:45)
>         at java.awt.Window.processWindowEvent(Window.java:1072)
>         at java.awt.Window.processEvent(Window.java:1038)
>         at java.awt.Component.dispatchEvent(Component.java:3582)
>         at java.awt.EventQueueCore.dispatchEventImpl(EventQueueCore.java:141)
>         at java.awt.EventQueue.dispatchEvent(EventQueue.java:143)
>         at
> java.awt.EventDispatchThread.runModalLoop(EventDispatchThread.java:67)
>         at java.awt.EventDispatchThread.run(EventDispatchThread.java:46)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message