/hg/icedtea-web: Internal implementation of ExecuteAppletAction ...

jvanek at icedtea.classpath.org jvanek at icedtea.classpath.org
Fri May 9 12:59:04 UTC 2014


changeset a1a59525e85e in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=a1a59525e85e
author: Jiri Vanek <jvanek at redhat.com>
date: Fri May 09 14:58:37 2014 +0200

	Internal implementation of ExecuteAppletAction now support multiple items


diffstat:

 ChangeLog                                                                                                          |   24 +
 netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java                                         |    5 +-
 netx/net/sourceforge/jnlp/resources/Messages.properties                                                            |    1 +
 netx/net/sourceforge/jnlp/security/appletextendedsecurity/AppletSecurityActions.java                               |  116 +++++++
 netx/net/sourceforge/jnlp/security/appletextendedsecurity/ExecuteAppletAction.java                                 |   40 +-
 netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletActionEntry.java                           |   19 +-
 netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletTrustConfirmation.java                     |    2 +-
 tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/AppletSecurityActionsTest.java                |  147 +++++++++
 tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletTrustConfirmationTest.java      |   37 ++
 tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageImplTest.java |  151 +++++++--
 10 files changed, 490 insertions(+), 52 deletions(-)

diffs (truncated from 754 to 500 lines):

diff -r de898c0d6d5f -r a1a59525e85e ChangeLog
--- a/ChangeLog	Mon May 05 17:11:45 2014 +0200
+++ b/ChangeLog	Fri May 09 14:58:37 2014 +0200
@@ -1,3 +1,27 @@
+2014-05-09  Jiri Vanek  <jvanek at redhat.com>
+
+	Internal implementation of ExecuteAppletAction now support multiple items
+	* netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java: 
+	Returning AppletSecurityActions instead of ExecuteAppletAction class
+	* netx/net/sourceforge/jnlp/resources/Messages.properties: added
+	APPEXTSECunsetAppletAction key.
+	* netx/net/sourceforge/jnlp/security/appletextendedsecurity/AppletSecurityActions.java: 
+	New file, to handle multiple actions hidden in one record.
+	* netx/net/sourceforge/jnlp/security/appletextendedsecurity/ExecuteAppletAction.java: Added
+	UNSET option, handled in (fromString) and (fromChar) and (toChar) and (toExpalnation)
+	* netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletActionEntry.java: 
+	instead of ExecuteAppletAction type in fromString and constructor, using
+	AppletSecurityActions
+	* netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletTrustConfirmation.java: 
+	behaviour wrapped by  AppletSecurityActions.fromAction(behaviour)
+	* tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/AppletSecurityActionsTest.java: 
+	New test for new file
+	* tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletTrustConfirmationTest.java: 
+	added license header
+	* tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageImplTest.java: 
+	Test adapted to new features, and to preserving old behavior.
+
+
 2014-05-05  Jiri Vanek  <jvanek at redhat.com>
 
 	Links in AppTrustWarningPanel are now clickable.
diff -r de898c0d6d5f -r a1a59525e85e netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java
--- a/netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java	Mon May 05 17:11:45 2014 +0200
+++ b/netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java	Fri May 09 14:58:37 2014 +0200
@@ -39,6 +39,7 @@
 import javax.swing.event.TableModelEvent;
 import javax.swing.table.AbstractTableModel;
 import net.sourceforge.jnlp.runtime.Translator;
+import net.sourceforge.jnlp.security.appletextendedsecurity.AppletSecurityActions;
 import net.sourceforge.jnlp.security.appletextendedsecurity.ExecuteAppletAction;
 import net.sourceforge.jnlp.security.appletextendedsecurity.UnsignedAppletActionEntry;
 import net.sourceforge.jnlp.security.appletextendedsecurity.UrlRegEx;
@@ -75,7 +76,7 @@
     @Override
     public Class<?> getColumnClass(int columnIndex) {
         if (columnIndex == 0) {
-            return ExecuteAppletAction.class;
+            return AppletSecurityActions.class;
         }
         if (columnIndex == 1) {
             return Date.class;
@@ -145,7 +146,7 @@
         int i = getRowCount()-1;
         String s = "\\Qhttp://localhost:80/\\E.*";
         back.add(new UnsignedAppletActionEntry(
-                ExecuteAppletAction.NEVER,
+                AppletSecurityActions.fromAction(ExecuteAppletAction.NEVER),
                 new Date(),
                 new UrlRegEx(s),
                 new UrlRegEx(s),
diff -r de898c0d6d5f -r a1a59525e85e netx/net/sourceforge/jnlp/resources/Messages.properties
--- a/netx/net/sourceforge/jnlp/resources/Messages.properties	Mon May 05 17:11:45 2014 +0200
+++ b/netx/net/sourceforge/jnlp/resources/Messages.properties	Fri May 09 14:58:37 2014 +0200
@@ -818,6 +818,7 @@
 APPEXTSECunsignedAppletActionYes=This applet was visited and allowed
 APPEXTSecunsignedAppletActionSandbox=This applet was visited and allowed to run with restricted privileges
 APPEXTSECunsignedAppletActionNo=This applet was visited and denied
+APPEXTSECunsetAppletAction=This applet has not yet asked for this action
 APPEXTSECControlPanelExtendedAppletSecurityTitle=Extended applet security
 APPEXTSECguiTableModelTableColumnAction=Action
 APPEXTSECguiTableModelTableColumnDateOfAction=Date of action
diff -r de898c0d6d5f -r a1a59525e85e netx/net/sourceforge/jnlp/security/appletextendedsecurity/AppletSecurityActions.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/security/appletextendedsecurity/AppletSecurityActions.java	Fri May 09 14:58:37 2014 +0200
@@ -0,0 +1,116 @@
+/*   Copyright (C) 2014 Red Hat, Inc.
+
+ This file is part of IcedTea.
+
+ IcedTea is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, version 2.
+
+ IcedTea is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with IcedTea; see the file COPYING.  If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
+
+ Linking this library statically or dynamically with other modules is
+ making a combined work based on this library.  Thus, the terms and
+ conditions of the GNU General Public License cover the whole
+ combination.
+
+ As a special exception, the copyright holders of this library give you
+ permission to link this library with independent modules to produce an
+ executable, regardless of the license terms of these independent
+ modules, and to copy and distribute the resulting executable under
+ terms of your choice, provided that you also meet, for each linked
+ independent module, the terms and conditions of the license of that
+ module.  An independent module is a module which is not derived from
+ or based on this library.  If you modify this library, you may extend
+ this exception to your version of the library, but you are not
+ obligated to do so.  If you do not wish to do so, delete this
+ exception statement from your version.
+ */
+package net.sourceforge.jnlp.security.appletextendedsecurity;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class AppletSecurityActions {
+    private final List<ExecuteAppletAction> actions = new ArrayList<>();
+
+    
+    /*
+     * backward compatibility method for base, UnsignedAppletTrustConfirmation usage
+     * FIXME - remove
+     */
+    public static AppletSecurityActions fromAction(ExecuteAppletAction s) {
+        if (s == null){
+            s = ExecuteAppletAction.UNSET;
+        }
+        return fromString(s.toChar());
+    }
+    
+    static AppletSecurityActions fromString(String s) {
+        if (s == null) {
+            s = "";
+        }
+        s = s.trim(); //to not return on leading space, may be dangerous, 
+        //but the s shouldbe already trimmed before bubbling here.
+        //does " A"  means UNSET(1)+ALWAYS(2)  or ALWAYS(1)+UNSET(2)
+        //or UNSET(1)+UNSET(2)?
+        AppletSecurityActions asas = new AppletSecurityActions();
+        for (char x : s.toCharArray()){
+            if (Character.isWhitespace(x)){
+                break;
+            }
+            asas.actions.add(ExecuteAppletAction.fromChar(x));
+        }
+        return asas;
+    }
+
+    public ExecuteAppletAction getAction(int i) {
+        if (i>= actions.size()){
+            return ExecuteAppletAction.UNSET;
+        }
+        return actions.get(i);
+    }
+    
+    void setAction(int i, ExecuteAppletAction a) {
+        while (actions.size() <= i){
+            actions.add(ExecuteAppletAction.UNSET);
+        }
+        actions.set(i,a);
+    }
+    
+    
+    public ExecuteAppletAction getUnsignedAppletAction() {
+        return getAction(0);
+    }
+    
+    public void setUnsignedAppletAction(ExecuteAppletAction a) {
+        actions.set(0,a);
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        for (ExecuteAppletAction executeAppletAction : actions) {
+            sb.append(executeAppletAction.toChar());
+        }
+        return sb.toString();
+    }
+
+    
+    /**
+     * stub for testing 
+     * @return 
+     */
+    List<ExecuteAppletAction> getActions() {
+        return actions;
+    }
+    
+    
+}
\ No newline at end of file
diff -r de898c0d6d5f -r a1a59525e85e netx/net/sourceforge/jnlp/security/appletextendedsecurity/ExecuteAppletAction.java
--- a/netx/net/sourceforge/jnlp/security/appletextendedsecurity/ExecuteAppletAction.java	Mon May 05 17:11:45 2014 +0200
+++ b/netx/net/sourceforge/jnlp/security/appletextendedsecurity/ExecuteAppletAction.java	Fri May 09 14:58:37 2014 +0200
@@ -39,7 +39,7 @@
 
 public enum ExecuteAppletAction {
 
-    ALWAYS, NEVER, YES, SANDBOX, NO;
+    ALWAYS, NEVER, YES, SANDBOX, NO, UNSET;
 
     public String toChar() {
         switch (this) {
@@ -53,6 +53,8 @@
                 return "s";
             case NO:
                 return "n";
+            case UNSET:
+                return "X";
         }
         throw new RuntimeException("Unknown ExecuteUnsignedApplet");
     }
@@ -69,24 +71,36 @@
                 return Translator.R("APPEXTSECunsignedAppletActionSandbox");
             case NO:
                 return Translator.R("APPEXTSECunsignedAppletActionNo");
+            case UNSET:
+                return Translator.R("APPEXTSECunsetAppletAction");
         }
         throw new RuntimeException("Unknown UnsignedAppletAction");
     }
 
     public static ExecuteAppletAction fromString(String s) {
-        if (s.startsWith("A")) {
-            return ExecuteAppletAction.ALWAYS;
-        } else if (s.startsWith("N")) {
-            return ExecuteAppletAction.NEVER;
-        } else if (s.startsWith("y")) {
-            return ExecuteAppletAction.YES;
-        } else if (s.startsWith("s")) {
-            return ExecuteAppletAction.SANDBOX;
-        } else if (s.startsWith("n")) {
-            return ExecuteAppletAction.NO;
-        } else {
-            throw new RuntimeException("Unknown ExecuteUnsignedApplet for " + s);
+        if (s.length() == 0){
+            throw new RuntimeException("Undefined zero-length ExecuteAppletAction String representatio");    
         }
+        return fromChar(s.charAt(0));
+        
+    }
+    
+    public static ExecuteAppletAction fromChar(char s) {
+        switch (s) {
+            case 'A':
+                return ExecuteAppletAction.ALWAYS;
+            case 'N':
+                return ExecuteAppletAction.NEVER;
+            case 'y':
+                return ExecuteAppletAction.YES;
+            case 's':
+                return ExecuteAppletAction.SANDBOX;
+            case 'n':
+                return ExecuteAppletAction.NO;
+            case 'X':
+                return ExecuteAppletAction.UNSET;
+        }
+        throw new RuntimeException("Unknown ExecuteUnsignedApplet for " + s);
     }
 
     @Override
diff -r de898c0d6d5f -r a1a59525e85e netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletActionEntry.java
--- a/netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletActionEntry.java	Mon May 05 17:11:45 2014 +0200
+++ b/netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletActionEntry.java	Fri May 09 14:58:37 2014 +0200
@@ -43,7 +43,7 @@
 
 public class UnsignedAppletActionEntry {
 
-    private ExecuteAppletAction unsignedAppletAction;
+    private final AppletSecurityActions unsignedAppletAction;
     private Date timeStamp;
     private UrlRegEx documentBase;
     private UrlRegEx codeBase;
@@ -52,7 +52,7 @@
     public static UnsignedAppletActionEntry createFromString(String s) {
         String[] split = s.split("\\s+");
         UnsignedAppletActionEntry nw = new UnsignedAppletActionEntry(
-                ExecuteAppletAction.fromString(split[0]),
+                AppletSecurityActions.fromString(split[0]),
                 new Date(new Long(split[1])),
                 new UrlRegEx(split[2]),
                 null,
@@ -66,7 +66,7 @@
         return nw;
     }
 
-    public UnsignedAppletActionEntry(ExecuteAppletAction unsignedAppletAction, Date timeStamp, UrlRegEx documentBase, UrlRegEx codeBase, List<String> archives) {
+    public UnsignedAppletActionEntry(AppletSecurityActions unsignedAppletAction, Date timeStamp, UrlRegEx documentBase, UrlRegEx codeBase, List<String> archives) {
         this.unsignedAppletAction = unsignedAppletAction;
         this.timeStamp = timeStamp;
         this.documentBase = documentBase;
@@ -86,7 +86,7 @@
     }
 
     private String serializeToReadableAndParseableString() {
-        return unsignedAppletAction.toChar()
+        return unsignedAppletAction.toString()
                 + " " + ((timeStamp == null) ? "1" : timeStamp.getTime())
                 + " " + ((documentBase == null) ? "" : documentBase.getRegEx())
                 + " " + ((codeBase == null) ? "" : codeBase.getRegEx())
@@ -110,11 +110,20 @@
     }
 
     public ExecuteAppletAction getUnsignedAppletAction() {
+        return unsignedAppletAction.getUnsignedAppletAction();
+    }
+    
+    /**
+     * should be testing only
+     * 
+     * @return 
+     */
+    public AppletSecurityActions getAppletSecurityActions() {
         return unsignedAppletAction;
     }
 
     public void setUnsignedAppletAction(ExecuteAppletAction unsignedAppletAction) {
-        this.unsignedAppletAction = unsignedAppletAction;
+        this.unsignedAppletAction.setUnsignedAppletAction(unsignedAppletAction);
     }
 
     public UrlRegEx getCodeBase() {
diff -r de898c0d6d5f -r a1a59525e85e netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletTrustConfirmation.java
--- a/netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletTrustConfirmation.java	Mon May 05 17:11:45 2014 +0200
+++ b/netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletTrustConfirmation.java	Fri May 09 14:58:37 2014 +0200
@@ -148,7 +148,7 @@
             }
 
             UnsignedAppletActionEntry entry = new UnsignedAppletActionEntry(
-                    behaviour, 
+                    AppletSecurityActions.fromAction(behaviour), 
                     new Date(),
                     documentbaseRegex, 
                     codebaseRegex,
diff -r de898c0d6d5f -r a1a59525e85e tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/AppletSecurityActionsTest.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/AppletSecurityActionsTest.java	Fri May 09 14:58:37 2014 +0200
@@ -0,0 +1,147 @@
+/*   Copyright (C) 2014 Red Hat, Inc.
+
+ This file is part of IcedTea.
+
+ IcedTea is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, version 2.
+
+ IcedTea is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with IcedTea; see the file COPYING.  If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
+
+ Linking this library statically or dynamically with other modules is
+ making a combined work based on this library.  Thus, the terms and
+ conditions of the GNU General Public License cover the whole
+ combination.
+
+ As a special exception, the copyright holders of this library give you
+ permission to link this library with independent modules to produce an
+ executable, regardless of the license terms of these independent
+ modules, and to copy and distribute the resulting executable under
+ terms of your choice, provided that you also meet, for each linked
+ independent module, the terms and conditions of the license of that
+ module.  An independent module is a module which is not derived from
+ or based on this library.  If you modify this library, you may extend
+ this exception to your version of the library, but you are not
+ obligated to do so.  If you do not wish to do so, delete this
+ exception statement from your version.
+ */
+package net.sourceforge.jnlp.security.appletextendedsecurity;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class AppletSecurityActionsTest {
+
+    @Test
+    public void parseMultipleItemsCorrect() throws Exception {
+        AppletSecurityActions a1 = AppletSecurityActions.fromString("ANynsXsnyNA");
+        assertEquals(ExecuteAppletAction.ALWAYS, a1.getAction(0));
+        assertEquals(ExecuteAppletAction.NEVER, a1.getAction(1));
+        assertEquals(ExecuteAppletAction.YES, a1.getAction(2));
+        assertEquals(ExecuteAppletAction.NO, a1.getAction(3));
+        assertEquals(ExecuteAppletAction.SANDBOX, a1.getAction(4));
+        assertEquals(ExecuteAppletAction.UNSET, a1.getAction(5));
+        assertEquals(ExecuteAppletAction.SANDBOX, a1.getAction(6));
+        assertEquals(ExecuteAppletAction.NO, a1.getAction(7));
+        assertEquals(ExecuteAppletAction.YES, a1.getAction(8));
+        assertEquals(ExecuteAppletAction.NEVER, a1.getAction(9));
+        assertEquals(ExecuteAppletAction.ALWAYS, a1.getAction(10));
+        assertEquals(11, a1.getActions().size());
+    }
+
+    @Test
+    public void parseEmpty() throws Exception {
+        AppletSecurityActions a1 = AppletSecurityActions.fromString("");
+        assertEquals(ExecuteAppletAction.UNSET, a1.getAction(0));
+        assertEquals(ExecuteAppletAction.UNSET, a1.getAction(10));
+        assertEquals(0, a1.getActions().size());
+    }
+
+    @Test
+    public void parseOkSetAndGetZero() throws Exception {
+        AppletSecurityActions a1 = AppletSecurityActions.fromString("");
+        assertEquals(ExecuteAppletAction.UNSET, a1.getAction(0));
+        assertEquals(0, a1.getActions().size());
+        a1.setAction(0, ExecuteAppletAction.YES);
+        assertEquals(ExecuteAppletAction.YES, a1.getAction(0));
+        assertEquals(1, a1.getActions().size());
+    }
+
+    @Test
+    public void parseOkSetAndGet() throws Exception {
+        AppletSecurityActions a1 = AppletSecurityActions.fromString("s");
+        assertEquals(ExecuteAppletAction.SANDBOX, a1.getAction(0));
+        assertEquals(1, a1.getActions().size());
+        a1.setAction(0, ExecuteAppletAction.NO);
+        assertEquals(ExecuteAppletAction.NO, a1.getAction(0));
+        assertEquals(1, a1.getActions().size());
+        a1.setAction(1, ExecuteAppletAction.YES);
+        assertEquals(ExecuteAppletAction.NO, a1.getAction(0));
+        assertEquals(ExecuteAppletAction.YES, a1.getAction(1));
+        assertEquals(2, a1.getActions().size());
+        a1.setAction(0, ExecuteAppletAction.NO);
+        assertEquals(ExecuteAppletAction.NO, a1.getAction(0));
+        assertEquals(2, a1.getActions().size());
+        a1.setAction(4, ExecuteAppletAction.NEVER);
+        assertEquals(ExecuteAppletAction.NO, a1.getAction(0));
+        assertEquals(ExecuteAppletAction.YES, a1.getAction(1));
+        assertEquals(ExecuteAppletAction.UNSET, a1.getAction(2));
+        assertEquals(ExecuteAppletAction.UNSET, a1.getAction(3));
+        assertEquals(ExecuteAppletAction.UNSET, a1.getAction(3));
+        assertEquals(ExecuteAppletAction.NEVER, a1.getAction(4));
+        assertEquals(ExecuteAppletAction.UNSET, a1.getAction(5));//default again
+        assertEquals(5, a1.getActions().size());
+
+    }
+
+    @Test(expected = IndexOutOfBoundsException.class)
+    public void parseNotOkGet() throws Exception {
+        AppletSecurityActions a1 = AppletSecurityActions.fromString("ANynsXsnyNA");
+        a1.getAction(-1);
+    }
+
+    @Test(expected = IndexOutOfBoundsException.class)
+    public void parseNotOkSet() throws Exception {
+        AppletSecurityActions a1 = AppletSecurityActions.fromString("ANynsXsnyNA");
+        a1.setAction(-1, ExecuteAppletAction.NO);
+    }
+
+    @Test(expected = RuntimeException.class)
+    public void parseMultipleItemsToSomeWrong() throws Exception {
+        AppletSecurityActions a1 = AppletSecurityActions.fromString("AQA");
+    }
+
+    @Test
+    public void parseMultipleItemsFillMissing() throws Exception {
+        AppletSecurityActions a1 = AppletSecurityActions.fromString("AN");
+        assertEquals(ExecuteAppletAction.ALWAYS, a1.getAction(0));
+        assertEquals(ExecuteAppletAction.NEVER, a1.getAction(1));
+        assertEquals(ExecuteAppletAction.UNSET, a1.getAction(2));
+        assertEquals(ExecuteAppletAction.UNSET, a1.getAction(3));
+        //note, getters do not increase length
+        assertEquals(2, a1.getActions().size());
+    }
+
+    @Test
+    public void parseMultipleItemsSpaceEnd() throws Exception {
+        AppletSecurityActions a1 = AppletSecurityActions.fromString("ANXs AAA");
+        assertEquals(ExecuteAppletAction.ALWAYS, a1.getAction(0));
+        assertEquals(ExecuteAppletAction.NEVER, a1.getAction(1));
+        assertEquals(ExecuteAppletAction.UNSET, a1.getAction(2));
+        assertEquals(ExecuteAppletAction.SANDBOX, a1.getAction(3));
+        assertEquals(ExecuteAppletAction.UNSET, a1.getAction(4));
+        assertEquals(ExecuteAppletAction.UNSET, a1.getAction(5));
+        assertEquals(ExecuteAppletAction.UNSET, a1.getAction(10));
+        assertEquals(4, a1.getActions().size());
+    }
+
+}
diff -r de898c0d6d5f -r a1a59525e85e tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletTrustConfirmationTest.java
--- a/tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletTrustConfirmationTest.java	Mon May 05 17:11:45 2014 +0200
+++ b/tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletTrustConfirmationTest.java	Fri May 09 14:58:37 2014 +0200
@@ -1,3 +1,40 @@
+/*   Copyright (C) 2014 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation, version 2.
+
+IcedTea is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of


More information about the distro-pkg-dev mailing list