- Timestamp:
- Sep 24, 2014, 9:34:21 PM (11 years ago)
- Location:
- trunk/icedtea-web/tests/reproducers/signed/AppletTestSigned
- Files:
-
- 3 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/icedtea-web/tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned.html
r418 r429 38 38 <html><head></head><body bgcolor="red"> 39 39 <p> 40 <applet code="AppletTestSigned.class" archive=" XslowXAppletTestSigned.jar" codebase="." width="100" height="100">40 <applet code="AppletTestSigned.class" archive="AppletTestSigned.jar" codebase="." width="100" height="100"> 41 41 <param name="key1" value="value1"> 42 42 <param name="key2" value="#value2"> -
trunk/icedtea-web/tests/reproducers/signed/AppletTestSigned/srcs/AppletTestSigned.java
r418 r429 49 49 Thread.sleep(n); 50 50 System.out.println("AppletTestSigned killing himself after " + n + " ms of life"); 51 System.out.println("*** APPLET FINISHED ***"); 51 52 System.exit(0); 52 53 } catch (Exception ex) { -
trunk/icedtea-web/tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java
r418 r429 44 44 import net.sourceforge.jnlp.browsertesting.Browsers; 45 45 import net.sourceforge.jnlp.annotations.TestInBrowsers; 46 import net.sourceforge.jnlp.closinglisteners.Rule; 47 import net.sourceforge.jnlp.closinglisteners.RulesFolowingClosingListener; 48 import static net.sourceforge.jnlp.closinglisteners.RulesFolowingClosingListener.*; 46 49 import org.junit.Assert; 47 50 … … 51 54 52 55 private final List<String> l = Collections.unmodifiableList(Arrays.asList(new String[]{"-Xtrustall"})); 56 private static final String s0 = "AppletTestSigned was started"; 57 private static final String s1 = "value1"; 58 private static final String s2 = "value2"; 59 private static final String s3 = "AppletTestSigned was initialised"; 60 private static final String s7 = "AppletTestSigned killing himself after 2000 ms of life"; 61 private static final ContainsRule startedRule = new ContainsRule(s0); 62 private static final ContainsRule variable1Rule = new ContainsRule(s1); 63 private static final ContainsRule variable2Rule = new ContainsRule(s2); 64 private static final ContainsRule initialisedRule = new ContainsRule(s3); 65 private static final ContainsRule killedRule = new ContainsRule(s7); 66 private static final RulesFolowingClosingListener okListener=new RulesFolowingClosingListener(startedRule, variable1Rule, variable2Rule, initialisedRule, killedRule); 53 67 54 @Test68 // @Test 55 69 public void AppletTestSignedTest() throws Exception { 56 70 ProcessResult pr = server.executeJavawsHeadless(l, "/AppletTestSigned.jnlp"); … … 61 75 62 76 private void evaluateSignedApplet(ProcessResult pr, boolean javawsApplet) { 63 String s3 = "AppletTestSigned was initialised"; 64 Assert.assertTrue("AppletTestSigned stdout should contain " + s3 + " but didn't", pr.stdout.contains(s3)); 65 String s0 = "AppletTestSigned was started"; 66 Assert.assertTrue("AppletTestSigned stdout should contain " + s0 + " but didn't", pr.stdout.contains(s0)); 67 String s1 = "value1"; 68 Assert.assertTrue("AppletTestSigned stdout should contain " + s1 + " but didn't", pr.stdout.contains(s1)); 69 String s2 = "value2"; 70 Assert.assertTrue("AppletTestSigned stdout should contain " + s2 + " but didn't", pr.stdout.contains(s2)); 71 String ss = "xception"; 72 Assert.assertFalse("AppletTestSigned stderr should not contain " + ss + " but did", pr.stderr.contains(ss)); 73 String s7 = "AppletTestSigned killing himself after 2000 ms of life"; 74 Assert.assertTrue("AppletTestSigned stdout should contain " + s7 + " but didn't", pr.stdout.contains(s7)); 77 Assert.assertTrue("AppletTestSigned stdout " + initialisedRule.toPassingString() + " but didn't", initialisedRule.evaluate(pr.stdout)); 78 Assert.assertTrue("AppletTestSigned stdout " + startedRule.toPassingString() + " but didn't", startedRule.evaluate(pr.stdout)); 79 Assert.assertTrue("AppletTestSigned stdout " + variable1Rule.toPassingString() + " but didn't", variable1Rule.evaluate(pr.stdout)); 80 Assert.assertTrue("AppletTestSigned stdout " + variable2Rule.toPassingString() + " but didn't", variable2Rule.evaluate(pr.stdout)); 81 Assert.assertTrue("AppletTestSigned stdout " + killedRule.toPassingString() + " but didn't", killedRule.evaluate(pr.stdout)); 75 82 if (!javawsApplet) { 76 83 /*this is working correctly in most browser, but not in all. temporarily disabling … … 85 92 @Test 86 93 @TestInBrowsers(testIn = {Browsers.all}) 87 public void AppletTestSignedFirefoxTest () throws Exception {94 public void AppletTestSignedFirefoxTestXslowX() throws Exception { 88 95 ServerAccess.PROCESS_TIMEOUT = 30 * 1000; 89 96 try { 90 ProcessResult pr = server.executeBrowser("/AppletTestSigned .html");97 ProcessResult pr = server.executeBrowser("/AppletTestSigned2.html", okListener, null); 91 98 evaluateSignedApplet(pr, false); 92 Assert.assertTrue(pr.wasTerminated);99 //Assert.assertTrue(pr.wasTerminated); 93 100 //Assert.assertEquals((Integer) 0, pr.returnValue); due to destroy is null 94 101 } finally { … … 96 103 } 97 104 } 105 106 @Test 107 @TestInBrowsers(testIn = {Browsers.all}) 108 public void AppletTestSignedFirefoxTest() throws Exception { 109 ProcessResult pr = server.executeBrowser("/AppletTestSigned.html", ServerAccess.AutoClose.CLOSE_ON_CORRECT_END); 110 evaluateSignedApplet(pr, false); 111 //Assert.assertTrue(pr.wasTerminated); 112 //Assert.assertEquals((Integer) 0, pr.returnValue); due to destroy is null 113 } 98 114 }
Note:
See TracChangeset
for help on using the changeset viewer.