# HG changeset patch # User Jiri Vanek # Date 1370530787 -7200 # Node ID 49e141f43b541a3957e37f96155798a4d4653857 # Parent 6990997b492cc9e139f782e79369fe138a0dfb5a Silenced deployment.properties and zero size applet exceptions with tests diff -r 6990997b492c -r 49e141f43b54 ChangeLog --- a/ChangeLog Tue Jun 04 17:36:17 2013 +0200 +++ b/ChangeLog Thu Jun 06 16:59:47 2013 +0200 @@ -1,3 +1,19 @@ +2013-06-06 Jiri Vanek + + Silenced deployment.properties and zero size applet exceptions with tests + * netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java: + (findSystemConfigFile) and (loadProperties) now prints already cough exception + only in debug mode + * plugin/icedteanp/java/sun/applet/PluginAppletViewer.java: (paint) + now paints into 1 x 1 applet instead of 0 x 0 in case of 0 x 0 applet + * tests/reproducers/simple/AppletTest/resources/appletZeroH.html: new file + * tests/reproducers/simple/AppletTest/resources/appletZeroW.html: new file + * tests/reproducers/simple/AppletTest/resources/appletZeroWH.html: new file + - testing launchers with zero as width, height or both + * tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java: + added launchers and evaluations for three new htmls - (appletZeroWH) + (appletZeroW) (appletZeroH) + 2013-06-04 Jiri Vanek * netx/net/sourceforge/jnlp/resources/Messages.properties: diff -r 6990997b492c -r 49e141f43b54 netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java --- a/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java Tue Jun 04 17:36:17 2013 +0200 +++ b/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java Thu Jun 06 16:59:47 2013 +0200 @@ -427,7 +427,9 @@ jrePath = jreSetting.getValue(); } } catch (Exception ex) { - ex.printStackTrace(); + if (JNLPRuntime.isDebug()){ + ex.printStackTrace(); + } } File jreFile; @@ -530,6 +532,9 @@ try { return parsePropertiesFile(file); } catch (IOException e) { + if (JNLPRuntime.isDebug()){ + e.printStackTrace(); + } return null; } } diff -r 6990997b492c -r 49e141f43b54 plugin/icedteanp/java/sun/applet/PluginAppletViewer.java --- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java Tue Jun 04 17:36:17 2013 +0200 +++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java Thu Jun 06 16:59:47 2013 +0200 @@ -1538,7 +1538,9 @@ // If the image or the graphics don't exist, create new ones if (bufFrameImg == null || bufFrameImgGraphics == null) { - bufFrameImg = createImage(getWidth(), getHeight()); + // although invisible applets do not have right to paint + // we rather paint to 1x1 to be sure all callbacks will be completed + bufFrameImg = createImage(Math.max(1, getWidth()), Math.max(1, getHeight())); bufFrameImgGraphics = bufFrameImg.getGraphics(); } diff -r 6990997b492c -r 49e141f43b54 tests/reproducers/simple/AppletTest/resources/appletZeroH.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/AppletTest/resources/appletZeroH.html Thu Jun 06 16:59:47 2013 +0200 @@ -0,0 +1,44 @@ + + +

+ + +

+ + diff -r 6990997b492c -r 49e141f43b54 tests/reproducers/simple/AppletTest/resources/appletZeroW.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/AppletTest/resources/appletZeroW.html Thu Jun 06 16:59:47 2013 +0200 @@ -0,0 +1,44 @@ + + +

+ + +

+ + diff -r 6990997b492c -r 49e141f43b54 tests/reproducers/simple/AppletTest/resources/appletZeroWH.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/AppletTest/resources/appletZeroWH.html Thu Jun 06 16:59:47 2013 +0200 @@ -0,0 +1,44 @@ + + +

+ + +

+ + diff -r 6990997b492c -r 49e141f43b54 tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java --- a/tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java Tue Jun 04 17:36:17 2013 +0200 +++ b/tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java Thu Jun 06 16:59:47 2013 +0200 @@ -1,4 +1,4 @@ -/* AppletTestTests.java +/* Copyright (C) 2011 Red Hat, Inc. This file is part of IcedTea. @@ -154,4 +154,29 @@ ServerAccess.PROCESS_TIMEOUT = 20 * 1000; //back to normal } } + + + @Test + @TestInBrowsers(testIn = {Browsers.one}) + @NeedsDisplay + public void appletZeroWH() throws Exception { + ProcessResult pr = server.executeBrowser("/appletZeroWH.html", new CountingClosingListenerImpl(), new CountingClosingListenerImpl()); + evaluateApplet(pr, false); + } + + @Test + @TestInBrowsers(testIn = {Browsers.one}) + @NeedsDisplay + public void appletZeroW() throws Exception { + ProcessResult pr = server.executeBrowser("/appletZeroW.html", new CountingClosingListenerImpl(), new CountingClosingListenerImpl()); + evaluateApplet(pr, false); + } + + @Test + @TestInBrowsers(testIn = {Browsers.one}) + @NeedsDisplay + public void appletZeroH() throws Exception { + ProcessResult pr = server.executeBrowser("/appletZeroH.html", new CountingClosingListenerImpl(), new CountingClosingListenerImpl()); + evaluateApplet(pr, false); + } }