JDK-6298711 : test/java/awt/dnd/ImageTransferTest failed
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2005-07-19
  • Updated: 2006-04-07
  • Resolved: 2005-08-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b47Fixed
Related Reports
Relates :  
Relates :  
Description
#Test Results (version 2)
#Tue Jul 19 18:10:48 MSD 2005
#checksum:3ed5e0f9a80c0f24
#-----testdescription-----
$file=/export/ST/master/Mustang.AWT-master/test/java/awt/dnd/ImageTransferTest/ImageTransferTest.html
$root=/export/ST/master/Mustang.AWT-master/test/java/awt
author=###@###.### area=Clipboard
keywords=bug4397404 othervm
run=USER_SPECIFIED applet/othervm ImageTransferTest.html\n
source=ImageTransferTest.html
title=tests that images of all supported native image formats            are transfered properly

#-----environment-----

#-----testresult-----
description=file:///export/ST/master/Mustang.AWT-master/test/java/awt/dnd/ImageTransferTest/ImageTransferTest.html
end=Tue Jul 19 18:10:48 MSD 2005
environment=regtest
execStatus=Failed. Execution failed: Applet thread threw exception: java.lang.RuntimeException: test failed: images in following native formats are not transferred properly: image/gif
javatestOS=SunOS 5.8 (sparc)
javatestVersion=2.1.6
script=com.sun.javatest.regtest.RegressionScript
sections=script_messages build compile applet
start=Tue Jul 19 18:09:41 MSD 2005
status=Failed. Execution failed: Applet thread threw exception: java.lang.RuntimeException: test failed: images in following native formats are not transferred properly: image/gif
test=dnd/ImageTransferTest/ImageTransferTest.html
work=/home/gas/bugs/test/ss/JTwork/dnd/ImageTransferTest

#section:script_messages
----------messages:(4/228)----------
JDK under test: (/net/piglet/export2/jdk-builds/JDK6.0/b42/solaris-sparc)
java version "1.6.0-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b42)
Java HotSpot(TM) Server VM (build 1.6.0-ea-b42, mixed mode)

#section:build
----------messages:(3/104)----------
command: build ImageTransferTest
reason: Named class compiled on demand
elapsed time (seconds): 10.798
result: Passed. Compilation successful

#section:compile
----------messages:(3/195)----------
command: compile /export/ST/master/Mustang.AWT-master/test/java/awt/dnd/ImageTransferTest/ImageTransferTest.java
reason: .class file out of date or does not exist
elapsed time (seconds): 10.795
----------System.out:(0/0)----------
----------System.err:(4/381)----------
Note: /export/ST/master/Mustang.AWT-master/test/java/awt/dnd/ImageTransferTest/ImageTransferTest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /export/ST/master/Mustang.AWT-master/test/java/awt/dnd/ImageTransferTest/ImageTransferTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
result: Passed. Compilation successful

#section:applet
----------messages:(3/144)----------
command: applet ImageTransferTest.html
reason: User specified action: run applet/othervm ImageTransferTest.html
elapsed time (seconds): 55.221
----------System.out:(0/0)----------
----------System.err:(29/1145)----------
Applet lost clipboard ownership
Starting drag...
Drop was successful=true
Drop was successful=true
Drop was successful=true
Drop was successful=false
Drop was successful=true
Drop was successful=true
========= Child VM System.err ========
getTransferData was successful
format passed: image/png
getTransferData was successful
format passed: image/jpeg
getTransferData was successful
format passed: image/x-png
getTransferData was successful
different pixels: 0 ff7f7f00
transferred image is different from initial image
format failed: image/gif
getTransferData was successful
format passed: PNG
getTransferData was successful
format passed: JFIF
======================================
java.lang.RuntimeException: test failed: images in following native formats are not transferred properly: image/gif
        at ImageTransferTest.start(ImageTransferTest.java:152)
        at com.sun.javatest.regtest.AppletWrapper$AppletThread.run(AppletWrapper.java:145)
        at java.lang.Thread.run(Thread.java:603)
STATUS:Failed.Applet thread threw exception: java.lang.RuntimeException: test failed: images in following native formats are not transferred properly: image/gif
result: Failed. Execution failed: Applet thread threw exception: java.lang.RuntimeException: test failed: images in following native formats are not transferred properly: image/gif


test result: Failed. Execution failed: Applet thread threw exception: java.lang.RuntimeException: test failed: images in following native formats are not transferred properly: image/gif

###@###.### 2005-07-19 14:40:23 GMT

Comments
SUGGESTED FIX For GIF images skip the verification that the initial image and the transferred image are identical. *** /tmp/geta21062 Tue Jul 19 18:39:36 2005 --- ImageTransferTest.java Tue Jul 19 14:02:45 2005 *************** *** 360,367 **** boolean areImagesIdentical(Image im1, Image im2) { ! if (formats[fi].equals("JFIF") || formats[fi].equals("image/jpeg")) { ! // JFIF is lossy format return true; } int[] ib1 = getImageData(im1); --- 360,368 ---- boolean areImagesIdentical(Image im1, Image im2) { ! if (formats[fi].equals("JFIF") || formats[fi].equals("image/jpeg") || ! formats[fi].equals("GIF") || formats[fi].equals("image/gif")) { ! // JFIF and GIF are lossy formats return true; } int[] ib1 = getImageData(im1); ###@###.### 2005-07-19 14:40:24 GMT
19-07-2005

EVALUATION GIF writer (4339415) was implemented, so the format 'image/gif' became available in datatransfer operations. The test verifies that the initial image and the transferred image are identical, but this isn't true since the implementation of GIF writer is lossy. ###@###.### 2005-07-19 14:40:24 GMT
19-07-2005