aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test-extensions/net/sourceforge/jnlp/awt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-extensions/net/sourceforge/jnlp/awt')
-rw-r--r--tests/test-extensions/net/sourceforge/jnlp/awt/AWTHelper.java10
-rw-r--r--tests/test-extensions/net/sourceforge/jnlp/awt/imagesearch/ComponentFinder.java11
-rw-r--r--tests/test-extensions/net/sourceforge/jnlp/awt/imagesearch/marker.pngbin0 -> 180 bytes
3 files changed, 14 insertions, 7 deletions
diff --git a/tests/test-extensions/net/sourceforge/jnlp/awt/AWTHelper.java b/tests/test-extensions/net/sourceforge/jnlp/awt/AWTHelper.java
index faced3a..e33d35c 100644
--- a/tests/test-extensions/net/sourceforge/jnlp/awt/AWTHelper.java
+++ b/tests/test-extensions/net/sourceforge/jnlp/awt/AWTHelper.java
@@ -164,13 +164,9 @@ public abstract class AWTHelper extends RulesFolowingClosingListener implements
String test_server_dir_path = System.getProperty("test.server.dir");
- try {
- this.marker = ImageIO.read(new File(test_server_dir_path + "/marker.png"));
- this.markerPosition = new Point(0,0);
- this.markerGiven = true;
- } catch (IOException e) {
- throw new RuntimeException("AWTHelper could not read marker.png.",e);
- }
+ this.marker = ComponentFinder.defaultIcon;
+ this.markerPosition = new Point(0,0);
+ this.markerGiven = true;
this.appletWidth = appletWidth;
this.appletHeight = appletHeight;
diff --git a/tests/test-extensions/net/sourceforge/jnlp/awt/imagesearch/ComponentFinder.java b/tests/test-extensions/net/sourceforge/jnlp/awt/imagesearch/ComponentFinder.java
index 5d3a25e..95e0e37 100644
--- a/tests/test-extensions/net/sourceforge/jnlp/awt/imagesearch/ComponentFinder.java
+++ b/tests/test-extensions/net/sourceforge/jnlp/awt/imagesearch/ComponentFinder.java
@@ -42,8 +42,19 @@ import java.awt.Color;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;
+import java.io.IOException;
+import javax.imageio.ImageIO;
public class ComponentFinder {
+ public static final BufferedImage defaultIcon;
+
+ static{
+ try {
+ defaultIcon = ImageIO.read(ComponentFinder.class.getClassLoader().getResource("net/sourceforge/jnlp/awt/imagesearch/marker.png"));
+ } catch (IOException e) {
+ throw new RuntimeException("ComponentFinder - problem initializing defaultIcon",e);
+ }
+ }
/**
* method findColoredRectangle determines coordinates of a rectangle colored
diff --git a/tests/test-extensions/net/sourceforge/jnlp/awt/imagesearch/marker.png b/tests/test-extensions/net/sourceforge/jnlp/awt/imagesearch/marker.png
new file mode 100644
index 0000000..4392bea
--- /dev/null
+++ b/tests/test-extensions/net/sourceforge/jnlp/awt/imagesearch/marker.png
Binary files differ