-
Bug
-
Resolution: Cannot Reproduce
-
P2
-
None
-
1.4.0
-
x86
-
linux
Name: iaR10016 Date: 08/08/2001
JDK : JDK1.4.0-beta-b74
JCK : JCK1.4-b06
Platform[s] : RedHat Linux 7.1 with KDE2 graphics environment
(The test passes under RedHat Linux 6.2 with Gnome and KDE, RedHat Linux 7.1 with Gnome)
switch/Mode : -client -Xmixed
JCK test owner : http://javaweb.eng/jck/usr/owners.jto
Failing Test : api/java_awt/interactive/event/EventTests.html#EventTest0005
Frame location is changed unexpetedly if "Hide TextArea"/"Show Textarea" button is pressed.
Due to this reason ComponentShown event is not delivered if the test is executed in
automated mode (platforms.robotAvailable is true) under RedHat Linux 7.1/KDE2.
The following sample source code demonstrates incorrect behavior.
Compile and execute it, then press "Hide/Show" button several times.
--------- test.java ---------
import java.awt.*;
import java.awt.event.*;
public class test extends Frame implements ActionListener {
TextArea area;
public test() {
super();
add(area = new TextArea());
Button aButton = new Button("Hide/Show");
aButton.addActionListener(this);
add(aButton);
}
public static void main( String[] argv ) {
test t = new test();
t.setSize(640, 480);
t.setLayout(new FlowLayout());
t.setLocation(100,100);
System.out.println("Frame location is: " + t.getLocation());
t.setVisible(true);
}
public void actionPerformed(ActionEvent e) {
area.setVisible(!area.isVisible());
System.out.println("Frame location is: " + getLocation());
}
}
-----------------------------
Sample output is:
...
$ /net/linux-15/export/home/java/jdk1.4.0/linux/bin/java test
Frame location is: java.awt.Point[x=100,y=100]
Frame location is: java.awt.Point[x=-188,y=-140]
Frame location is: java.awt.Point[x=-284,y=-220]
...
Test source location:
=====================
/net/jdk/export/disk8/local.java/jck1.4/JCK-runtime-14/tests/api/java_awt/interactive/event/*.java
jtr file location:
==================
/net/jtgb4u4c.eng/export/sail16/results/merlin/b74/jck14/linux/redhat7.1_smp_gnome_server_linux-5/workDir/api/java_awt/interactive/event/EventTests_EventTest0005.jtr
How to reproduce:
====================
Run the following script under RedHat Linux 7.1 with KDE2
(probably, you need to change JCK and JAVA_HOME paths):
--------Script START---------------------
#!/bin/sh
JAVA_HOME=/net/jdk/export/disk8/local.java/jdk1.4/linux-i386
JCK=/net/jdk/export/disk8/local.java/jck1.4/JCK-runtime-14
export CLASSPATH="$JCK/classes:$JCK/javatest.jar"
executeClass="javasoft.sqe.tests.api.java.awt.interactive.event.EventTests -platform.robotAvailable true -TestCaseID EventTest0005"
$JAVA_HOME/bin/java -Xfuture ${executeClass}
---------Script END----------------------
Test output:
=============
EventTest0005: Failed. All event checkboxes NOT checked via generation of textarea events.
STATUS:Failed.tests: 1; failed: 1; first test case failure: EventTest0005
Specific Machine Info:
=====================
Hostname: linux-14
OS: RedHat Linux 7.1 with KDE2
Hostname: linux-5
OS: RedHat Linux 7.1 with KDE2
======================================================================