You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by ay...@apache.org on 2007/05/22 14:28:39 UTC

svn commit: r540558 - in /harmony/enhanced/classlib/trunk/modules/awt/src/test/api: java/common/org/apache/harmony/awt/tests/gl/ java/common/org/apache/harmony/awt/tests/gl/image/ resources/images/

Author: ayza
Date: Tue May 22 05:28:38 2007
New Revision: 540558

URL: http://svn.apache.org/viewvc?view=rev&rev=540558
Log:
Adding regression test for HARMONY-3602 ([classlib][awt][drlvm][netbeans] ImageDecoder.terminate() interrupts current thread)

Added:
    harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/gl/
    harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/gl/image/
    harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/gl/image/ImageDecoderTest.java   (with props)
    harmony/enhanced/classlib/trunk/modules/awt/src/test/api/resources/images/
    harmony/enhanced/classlib/trunk/modules/awt/src/test/api/resources/images/test.gif   (with props)

Added: harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/gl/image/ImageDecoderTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/gl/image/ImageDecoderTest.java?view=auto&rev=540558
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/gl/image/ImageDecoderTest.java (added)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/gl/image/ImageDecoderTest.java Tue May 22 05:28:38 2007
@@ -0,0 +1,40 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.harmony.awt.tests.gl.image;
+
+import java.awt.Image;
+import javax.swing.ImageIcon;
+import java.awt.Toolkit;
+
+import junit.framework.TestCase;
+
+public class ImageDecoderTest extends TestCase {
+
+    /**
+     * Regression test for HARMONY-3602
+     */
+    public void testTerminate() {
+        Image img = Toolkit.getDefaultToolkit().createImage(
+                Thread.currentThread().getContextClassLoader()
+                        .getResource("images/test.gif"));
+
+        System.out.println(new ImageIcon(img)); // Loads the image.
+        img.flush(); // ERROR: Calls Thread.currentThread().interrupt().
+        assertFalse("Current thread is interrupted",
+                Thread.currentThread().isInterrupted());
+    }
+}

Propchange: harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/gl/image/ImageDecoderTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/awt/src/test/api/resources/images/test.gif
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/resources/images/test.gif?view=auto&rev=540558
==============================================================================
Binary file - no diff available.

Propchange: harmony/enhanced/classlib/trunk/modules/awt/src/test/api/resources/images/test.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream