1 /* CodebasesAttsNoDialogsTest1.java 2 Copyright (C) 2013 Red Hat, Inc. 3 4 This file is part of IcedTea. 5 6 IcedTea is free software; you can redistribute it and/or 7 modify it under the terms of the GNU General Public License as published by 8 the Free Software Foundation, version 2. 9 10 IcedTea is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with IcedTea; see the file COPYING. If not, write to 17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 18 02110-1301 USA. 19 20 Linking this library statically or dynamically with other modules is 21 making a combined work based on this library. Thus, the terms and 22 conditions of the GNU General Public License cover the whole 23 combination. 24 25 As a special exception, the copyright holders of this library give you 26 permission to link this library with independent modules to produce an 27 executable, regardless of the license terms of these independent 28 modules, and to copy and distribute the resulting executable under 29 terms of your choice, provided that you also meet, for each linked 30 independent module, the terms and conditions of the license of that 31 module. An independent module is a module which is not derived from 32 or based on this library. If you modify this library, you may extend 33 this exception to your version of the library, but you are not 34 obligated to do so. If you do not wish to do so, delete this 35 exception statement from your version. 36 */ 37 38 import java.io.IOException; 39 import java.net.URL; 40 import java.util.AbstractMap; 41 import java.util.Arrays; 42 import java.util.List; 43 import net.sourceforge.jnlp.OptionsDefinitions; 44 import net.sourceforge.jnlp.ProcessResult; 45 import net.sourceforge.jnlp.ServerAccess; 46 import net.sourceforge.jnlp.ServerLauncher; 47 import net.sourceforge.jnlp.annotations.Bug; 48 import net.sourceforge.jnlp.annotations.NeedsDisplay; 49 import net.sourceforge.jnlp.annotations.TestInBrowsers; 50 import net.sourceforge.jnlp.browsertesting.BrowserTest; 51 import net.sourceforge.jnlp.browsertesting.Browsers; 52 import net.sourceforge.jnlp.closinglisteners.AutoErrorClosingListener; 53 import net.sourceforge.jnlp.closinglisteners.AutoOkClosingListener; 54 import net.sourceforge.jnlp.config.DeploymentConfiguration; 55 import net.sourceforge.jnlp.runtime.ManifestAttributesChecker; 56 import net.sourceforge.jnlp.security.appletextendedsecurity.AppletSecurityLevel; 57 import net.sourceforge.jnlp.tools.DeploymentPropertiesModifier; 58 import org.junit.AfterClass; 59 60 import org.junit.Assert; 61 import org.junit.BeforeClass; 62 import org.junit.Test; 63 64 /** 65 * 66 * null, empty, none, wrong, correct jnlp x html different codebases. 67 * 68 * no dialogs should be appeared. Second testsuite with ALL dialogs (head only) 69 * 70 * 71 */ 72 public class CodebasesAttsNoDialogsTest2 extends BrowserTest { 73 74 private static final String appletCloseString = CodebasesAttsNoDialogsTest1.appletCloseString; 75 private static final String[] HTMLA = CodebasesAttsNoDialogsTest1.JAVAWS_HTML_ARRAY; 76 private static final List<String> HTMLL = CodebasesAttsNoDialogsTest1.JAVAWS_HTML_LIST; 77 78 private static final String JNLPAPP = CodebasesAttsNoDialogsTest1.JNLPAPP; 79 private static final String JNLPAPPLET = CodebasesAttsNoDialogsTest1.JNLPAPPLET; 80 private static final String HTML = CodebasesAttsNoDialogsTest1.HTML; 81 private static final String HTMLHREF = CodebasesAttsNoDialogsTest1.HTMLHREF; 82 private static final String CodebasesAtts = CodebasesAttsNoDialogsTest1.CodebasesAtts; 83 84 private static ServerLauncher secondValidServer; 85 private static DeploymentPropertiesModifier.MultipleDeploymentPropertiesModifier ensuredDP; 86 87 @BeforeClass initSecondaryServers()88 public static void initSecondaryServers() throws IOException { 89 secondValidServer = ServerAccess.getIndependentInstanceOnTmpDir(); 90 } 91 92 @AfterClass stopSecondaryServers()93 public static void stopSecondaryServers() throws IOException { 94 secondValidServer.stop(); 95 } 96 97 @BeforeClass setProperties()98 public static void setProperties() throws IOException { 99 ensuredDP = new DeploymentPropertiesModifier.MultipleDeploymentPropertiesModifier( 100 new AbstractMap.SimpleEntry(DeploymentConfiguration.KEY_ENABLE_MANIFEST_ATTRIBUTES_CHECK, ManifestAttributesChecker.MANIFEST_ATTRIBUTES_CHECK.NONE.name()), 101 new AbstractMap.SimpleEntry(DeploymentConfiguration.KEY_SECURITY_LEVEL, AppletSecurityLevel.ALLOW_UNSIGNED.name()) 102 ); 103 ensuredDP.setProperties(); 104 } 105 106 @AfterClass resetProperties()107 public static void resetProperties() throws IOException { 108 ensuredDP.restoreProperties(); 109 } 110 111 //jnlp app 112 @NeedsDisplay 113 @Test codebasesAttsTestWorksJnlp1_NormalValid_normal()114 public void codebasesAttsTestWorksJnlp1_NormalValid_normal() throws Exception { 115 prepare(server.getUrl(), secondValidServer.getUrl()); 116 ProcessResult pr = server.executeJavawsUponUrl(null, server.getUrl(JNLPAPP), new AutoOkClosingListener(), new AutoErrorClosingListener()); 117 Assert.assertTrue(pr.stdout.contains(appletCloseString)); 118 Assert.assertTrue(pr.stdout.contains(CodebasesAtts)); 119 Assert.assertTrue(pr.stdout.contains("id: 1")); 120 Assert.assertTrue(pr.stdout.contains("BID0")); 121 } 122 123 @NeedsDisplay 124 @Test codebasesAttsTestWorksJnlp1_NormalValid_second()125 public void codebasesAttsTestWorksJnlp1_NormalValid_second() throws Exception { 126 prepare(server.getUrl(), secondValidServer.getUrl()); 127 ProcessResult pr = server.executeJavawsUponUrl(null, secondValidServer.getUrl(JNLPAPP), new AutoOkClosingListener(), new AutoErrorClosingListener()); 128 Assert.assertTrue(pr.stdout.contains(appletCloseString)); 129 Assert.assertTrue(pr.stdout.contains(CodebasesAtts)); 130 Assert.assertTrue(pr.stdout.contains("id: 2")); 131 Assert.assertTrue(pr.stdout.contains("BID2")); 132 } 133 134 @NeedsDisplay 135 @Test codebasesAttsTestWorksJnlp1_ValidNormal_normal()136 public void codebasesAttsTestWorksJnlp1_ValidNormal_normal() throws Exception { 137 prepare(secondValidServer.getUrl(), server.getUrl()); 138 ProcessResult pr = server.executeJavawsUponUrl(null, server.getUrl(JNLPAPP), new AutoOkClosingListener(), new AutoErrorClosingListener()); 139 Assert.assertTrue(pr.stdout.contains(appletCloseString)); 140 Assert.assertTrue(pr.stdout.contains(CodebasesAtts)); 141 Assert.assertTrue(pr.stdout.contains("id: 1")); 142 Assert.assertTrue(pr.stdout.contains("BID2")); 143 } 144 145 @NeedsDisplay 146 @Test codebasesAttsTestWorksJnlp1_ValidNormal_second()147 public void codebasesAttsTestWorksJnlp1_ValidNormal_second() throws Exception { 148 prepare(secondValidServer.getUrl(), server.getUrl()); 149 ProcessResult pr = server.executeJavawsUponUrl(null, secondValidServer.getUrl(JNLPAPP), new AutoOkClosingListener(), new AutoErrorClosingListener()); 150 Assert.assertTrue(pr.stdout.contains(appletCloseString)); 151 Assert.assertTrue(pr.stdout.contains(CodebasesAtts)); 152 Assert.assertTrue(pr.stdout.contains("id: 2")); 153 Assert.assertTrue(pr.stdout.contains("BID0")); 154 } 155 156 //jnlp app let 157 @NeedsDisplay 158 @Test codebasesAttsTestWorksJnlp2_NormalValid_normal()159 public void codebasesAttsTestWorksJnlp2_NormalValid_normal() throws Exception { 160 prepare(server.getUrl(), secondValidServer.getUrl()); 161 ProcessResult pr = server.executeJavawsUponUrl(null, server.getUrl(JNLPAPPLET), new AutoOkClosingListener(), new AutoErrorClosingListener()); 162 Assert.assertTrue(pr.stdout.contains(appletCloseString)); 163 Assert.assertTrue(pr.stdout.contains(CodebasesAtts)); 164 Assert.assertTrue(pr.stdout.contains("id: 1")); 165 Assert.assertTrue(pr.stdout.contains("BID0")); 166 } 167 168 @NeedsDisplay 169 @Test codebasesAttsTestWorksJnlp2_NormalValid_second()170 public void codebasesAttsTestWorksJnlp2_NormalValid_second() throws Exception { 171 prepare(server.getUrl(), secondValidServer.getUrl()); 172 ProcessResult pr = server.executeJavawsUponUrl(null, secondValidServer.getUrl(JNLPAPPLET), new AutoOkClosingListener(), new AutoErrorClosingListener()); 173 Assert.assertTrue(pr.stdout.contains(appletCloseString)); 174 Assert.assertTrue(pr.stdout.contains(CodebasesAtts)); 175 Assert.assertTrue(pr.stdout.contains("id: 2")); 176 Assert.assertTrue(pr.stdout.contains("BID2")); 177 } 178 179 @NeedsDisplay 180 @Test codebasesAttsTestWorksJnlp2_ValidNormal_normal()181 public void codebasesAttsTestWorksJnlp2_ValidNormal_normal() throws Exception { 182 prepare(secondValidServer.getUrl(), server.getUrl()); 183 ProcessResult pr = server.executeJavawsUponUrl(null, server.getUrl(JNLPAPPLET), new AutoOkClosingListener(), new AutoErrorClosingListener()); 184 Assert.assertTrue(pr.stdout.contains(appletCloseString)); 185 Assert.assertTrue(pr.stdout.contains(CodebasesAtts)); 186 Assert.assertTrue(pr.stdout.contains("id: 1")); 187 Assert.assertTrue(pr.stdout.contains("BID2")); 188 } 189 190 @NeedsDisplay 191 @Test codebasesAttsTestWorksJnlp2_ValidNormal_second()192 public void codebasesAttsTestWorksJnlp2_ValidNormal_second() throws Exception { 193 prepare(secondValidServer.getUrl(), server.getUrl()); 194 ProcessResult pr = server.executeJavawsUponUrl(null, secondValidServer.getUrl(JNLPAPPLET), new AutoOkClosingListener(), new AutoErrorClosingListener()); 195 Assert.assertTrue(pr.stdout.contains(appletCloseString)); 196 Assert.assertTrue(pr.stdout.contains(CodebasesAtts)); 197 Assert.assertTrue(pr.stdout.contains("id: 2")); 198 Assert.assertTrue(pr.stdout.contains("BID0")); 199 } 200 201 //html 202 @NeedsDisplay 203 @Test 204 @TestInBrowsers(testIn = Browsers.one) codebasesAttsTestWorksHtml1_NormalValid_normal()205 public void codebasesAttsTestWorksHtml1_NormalValid_normal() throws Exception { 206 prepare(server.getUrl(), secondValidServer.getUrl()); 207 ProcessResult pr = server.executeBrowser(null, server.getUrl(HTML), new AutoOkClosingListener(), new AutoErrorClosingListener()); 208 Assert.assertTrue(pr.stdout.contains(appletCloseString)); 209 Assert.assertTrue(pr.stdout.contains(CodebasesAtts)); 210 Assert.assertTrue(pr.stdout.contains("id: 1")); 211 Assert.assertTrue(pr.stdout.contains("BID0")); 212 } 213 214 @NeedsDisplay 215 @Test 216 @TestInBrowsers(testIn = Browsers.one) codebasesAttsTestWorksHtml1_NormalValid_second()217 public void codebasesAttsTestWorksHtml1_NormalValid_second() throws Exception { 218 prepare(server.getUrl(), secondValidServer.getUrl()); 219 ProcessResult pr = server.executeBrowser(null, secondValidServer.getUrl(HTML), new AutoOkClosingListener(), new AutoErrorClosingListener()); 220 Assert.assertTrue(pr.stdout.contains(appletCloseString)); 221 Assert.assertTrue(pr.stdout.contains(CodebasesAtts)); 222 Assert.assertTrue(pr.stdout.contains("id: 2")); 223 Assert.assertTrue(pr.stdout.contains("BID2")); 224 } 225 226 @NeedsDisplay 227 @Test 228 @TestInBrowsers(testIn = Browsers.one) codebasesAttsTestWorksHtml1_ValidNormal_normal()229 public void codebasesAttsTestWorksHtml1_ValidNormal_normal() throws Exception { 230 prepare(secondValidServer.getUrl(), server.getUrl()); 231 ProcessResult pr = server.executeBrowser(null, server.getUrl(HTML), new AutoOkClosingListener(), new AutoErrorClosingListener()); 232 Assert.assertTrue(pr.stdout.contains(appletCloseString)); 233 Assert.assertTrue(pr.stdout.contains(CodebasesAtts)); 234 Assert.assertTrue(pr.stdout.contains("id: 1")); 235 Assert.assertTrue(pr.stdout.contains("BID2")); 236 } 237 238 @NeedsDisplay 239 @Test 240 @TestInBrowsers(testIn = Browsers.one) codebasesAttsTestWorksHtml1_ValidNormal_second()241 public void codebasesAttsTestWorksHtml1_ValidNormal_second() throws Exception { 242 prepare(secondValidServer.getUrl(), server.getUrl()); 243 ProcessResult pr = server.executeBrowser(null, secondValidServer.getUrl(HTML), new AutoOkClosingListener(), new AutoErrorClosingListener()); 244 Assert.assertTrue(pr.stdout.contains(appletCloseString)); 245 Assert.assertTrue(pr.stdout.contains(CodebasesAtts)); 246 Assert.assertTrue(pr.stdout.contains("id: 2")); 247 Assert.assertTrue(pr.stdout.contains("BID0")); 248 } 249 250 //htmlhref relative hrefs 251 @NeedsDisplay 252 @Test 253 @TestInBrowsers(testIn = Browsers.one) codebasesAttsTestWorksHtml2_NormalValid_normal()254 public void codebasesAttsTestWorksHtml2_NormalValid_normal() throws Exception { 255 prepare(server.getUrl(), secondValidServer.getUrl()); 256 ProcessResult pr = server.executeBrowser(null, server.getUrl(HTMLHREF), new AutoOkClosingListener(), new AutoErrorClosingListener()); 257 Assert.assertTrue(pr.stdout.contains(appletCloseString)); 258 Assert.assertTrue(pr.stdout.contains(CodebasesAtts)); 259 Assert.assertTrue(pr.stdout.contains("id: 1")); 260 Assert.assertTrue(pr.stdout.contains("BID0")); 261 } 262 263 @NeedsDisplay 264 @Test 265 @TestInBrowsers(testIn = Browsers.one) codebasesAttsTestWorksHtml2_NormalValid_second()266 public void codebasesAttsTestWorksHtml2_NormalValid_second() throws Exception { 267 prepare(server.getUrl(), secondValidServer.getUrl()); 268 ProcessResult pr = server.executeBrowser(null, secondValidServer.getUrl(HTMLHREF), new AutoOkClosingListener(), new AutoErrorClosingListener()); 269 Assert.assertTrue(pr.stdout.contains(appletCloseString)); 270 Assert.assertTrue(pr.stdout.contains(CodebasesAtts)); 271 Assert.assertTrue(pr.stdout.contains("id: 2")); 272 Assert.assertTrue(pr.stdout.contains("BID2")); 273 } 274 275 @NeedsDisplay 276 @Test 277 @TestInBrowsers(testIn = Browsers.one) codebasesAttsTestWorksHtml2_ValidNormal_normal()278 public void codebasesAttsTestWorksHtml2_ValidNormal_normal() throws Exception { 279 prepare(secondValidServer.getUrl(), server.getUrl()); 280 ProcessResult pr = server.executeBrowser(null, server.getUrl(HTMLHREF), new AutoOkClosingListener(), new AutoErrorClosingListener()); 281 Assert.assertTrue(pr.stdout.contains(appletCloseString)); 282 Assert.assertTrue(pr.stdout.contains(CodebasesAtts)); 283 Assert.assertTrue(pr.stdout.contains("id: 1")); 284 Assert.assertTrue(pr.stdout.contains("BID0")); //codebase is relative, so launchiong server is used to locate jnlp 285 } 286 287 @NeedsDisplay 288 @Test 289 @TestInBrowsers(testIn = Browsers.one) codebasesAttsTestWorksHtml2_ValidNormal_second()290 public void codebasesAttsTestWorksHtml2_ValidNormal_second() throws Exception { 291 prepare(secondValidServer.getUrl(), server.getUrl()); 292 ProcessResult pr = server.executeBrowser(null, secondValidServer.getUrl(HTMLHREF), new AutoOkClosingListener(), new AutoErrorClosingListener()); 293 Assert.assertTrue(pr.stdout.contains(appletCloseString)); 294 Assert.assertTrue(pr.stdout.contains(CodebasesAtts)); 295 Assert.assertTrue(pr.stdout.contains("id: 2")); 296 Assert.assertTrue(pr.stdout.contains("BID2"));//jnlphref is relative, so launchiong server is used to locate jnlp 297 } 298 prepare(URL c1, URL c2)299 public void prepare(URL c1, URL c2) throws IOException { 300 prepare(c1.toExternalForm(), c2.toExternalForm()); 301 } 302 prepare(String codebase1, String codebase2)303 public static void prepare(String codebase1, String codebase2) throws IOException { 304 CodebasesAttsNoDialogsTest1.prepareSingle(codebase1, null, null, '1', ServerAccess.getInstance().getDir(), CodebasesAttsNoDialogsTest1.files); 305 CodebasesAttsNoDialogsTest1.prepareSingle(codebase2, null, null, '2', secondValidServer.getDir(), CodebasesAttsNoDialogsTest1.files); 306 } 307 308 //htmlhref absolute hrefs 309 @NeedsDisplay 310 @Test 311 @TestInBrowsers(testIn = Browsers.one) codebasesAttsTestWorksHtml2_NormalValid_normal_absoluteJnlpHrefNormal()312 public void codebasesAttsTestWorksHtml2_NormalValid_normal_absoluteJnlpHrefNormal() throws Exception { 313 CodebasesAttsNoDialogsTest1.prepareSingle(server.getUrl(), server.getUrl().toExternalForm(), null, '1', ServerAccess.getInstance().getDir(), CodebasesAttsNoDialogsTest1.files); 314 CodebasesAttsNoDialogsTest1.prepareSingle(secondValidServer.getUrl(), server.getUrl().toExternalForm(), null, '2', secondValidServer.getDir(), CodebasesAttsNoDialogsTest1.files); 315 316 ProcessResult pr = server.executeBrowser(null, server.getUrl(HTMLHREF), new AutoOkClosingListener(), new AutoErrorClosingListener()); 317 Assert.assertTrue(pr.stdout.contains(appletCloseString)); 318 Assert.assertTrue(pr.stdout.contains(CodebasesAtts)); 319 Assert.assertTrue(pr.stdout.contains("id: 1")); 320 Assert.assertTrue(pr.stdout.contains("BID0")); 321 } 322 323 @Test 324 @TestInBrowsers(testIn = Browsers.one) 325 //all three are valid, but on l one bug is supported now 326 @Bug(id = "http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2016-January/034446.html") 327 //@Bug(id = "http://icedtea.classpath.org/hg/release/icedtea-web-1.6/rev/0d9faf51357d") 328 //@Bug(id = "http://icedtea.classpath.org/hg/icedtea-web/rev/22b7becd48a7") codebasesAttsTestWorksHtml2_NormalValid_normal_absoluteJnlpHrefSecond()329 public void codebasesAttsTestWorksHtml2_NormalValid_normal_absoluteJnlpHrefSecond() throws Exception { 330 CodebasesAttsNoDialogsTest1.prepareSingle(server.getUrl(), secondValidServer.getUrl().toExternalForm(), null, '1', ServerAccess.getInstance().getDir(), CodebasesAttsNoDialogsTest1.files); 331 CodebasesAttsNoDialogsTest1.prepareSingle(secondValidServer.getUrl(), secondValidServer.getUrl().toExternalForm(), null, '2', secondValidServer.getDir(), CodebasesAttsNoDialogsTest1.files); 332 333 ProcessResult pr = server.executeBrowser(null, server.getUrl(HTMLHREF), new AutoOkClosingListener(), new AutoErrorClosingListener()); 334 Assert.assertTrue(pr.stdout.contains(appletCloseString)); 335 Assert.assertTrue(pr.stdout.contains(CodebasesAtts)); 336 Assert.assertTrue(pr.stdout.contains("id: 1")); 337 Assert.assertTrue(pr.stdout.contains("BID2")); 338 } 339 340 @NeedsDisplay 341 @Test 342 @TestInBrowsers(testIn = Browsers.one) 343 //all three are valid, but on l one bug is supported now 344 //@Bug(id = "http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2016-January/034446.html") 345 @Bug(id = "http://icedtea.classpath.org/hg/release/icedtea-web-1.6/rev/0d9faf51357d") 346 //@Bug(id = "http://icedtea.classpath.org/hg/icedtea-web/rev/22b7becd48a7") codebasesAttsTestWorksHtml2_NormalValid_second_absoluteJnlpHrefNormal()347 public void codebasesAttsTestWorksHtml2_NormalValid_second_absoluteJnlpHrefNormal() throws Exception { 348 CodebasesAttsNoDialogsTest1.prepareSingle(server.getUrl(), server.getUrl().toExternalForm(), null, '1', ServerAccess.getInstance().getDir(), CodebasesAttsNoDialogsTest1.files); 349 CodebasesAttsNoDialogsTest1.prepareSingle(secondValidServer.getUrl(), server.getUrl().toExternalForm(), null, '2', secondValidServer.getDir(), CodebasesAttsNoDialogsTest1.files); 350 351 ProcessResult pr = server.executeBrowser(null, secondValidServer.getUrl(HTMLHREF), new AutoOkClosingListener(), new AutoErrorClosingListener()); 352 Assert.assertTrue(pr.stdout.contains(appletCloseString)); 353 Assert.assertTrue(pr.stdout.contains(CodebasesAtts)); 354 Assert.assertTrue(pr.stdout.contains("id: 2")); 355 Assert.assertTrue(pr.stdout.contains("BID0")); 356 } 357 358 @NeedsDisplay 359 @Test 360 @TestInBrowsers(testIn = Browsers.one) codebasesAttsTestWorksHtml2_NormalValid_second_absoluteJnlpHrefSecond()361 public void codebasesAttsTestWorksHtml2_NormalValid_second_absoluteJnlpHrefSecond() throws Exception { 362 CodebasesAttsNoDialogsTest1.prepareSingle(server.getUrl(), secondValidServer.getUrl().toExternalForm(), null, '1', ServerAccess.getInstance().getDir(), CodebasesAttsNoDialogsTest1.files); 363 CodebasesAttsNoDialogsTest1.prepareSingle(secondValidServer.getUrl(), secondValidServer.getUrl().toExternalForm(), null, '2', secondValidServer.getDir(), CodebasesAttsNoDialogsTest1.files); 364 365 ProcessResult pr = server.executeBrowser(null, secondValidServer.getUrl(HTMLHREF), new AutoOkClosingListener(), new AutoErrorClosingListener()); 366 Assert.assertTrue(pr.stdout.contains(appletCloseString)); 367 Assert.assertTrue(pr.stdout.contains(CodebasesAtts)); 368 Assert.assertTrue(pr.stdout.contains("id: 2")); 369 Assert.assertTrue(pr.stdout.contains("BID2")); 370 } 371 372 @NeedsDisplay 373 @Test 374 @TestInBrowsers(testIn = Browsers.one) 375 //all three are valid, but on l one bug is supported now 376 //@Bug(id = "http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2016-January/034446.html") 377 //@Bug(id = "http://icedtea.classpath.org/hg/release/icedtea-web-1.6/rev/0d9faf51357d") 378 @Bug(id = "http://icedtea.classpath.org/hg/icedtea-web/rev/22b7becd48a7") codebasesAttsTestWorksHtml2_ValidNormal_normal_absoluteJnlpHrefNormal()379 public void codebasesAttsTestWorksHtml2_ValidNormal_normal_absoluteJnlpHrefNormal() throws Exception { 380 CodebasesAttsNoDialogsTest1.prepareSingle(secondValidServer.getUrl(), server.getUrl().toExternalForm(), null, '1', ServerAccess.getInstance().getDir(), CodebasesAttsNoDialogsTest1.files); 381 CodebasesAttsNoDialogsTest1.prepareSingle(server.getUrl(), server.getUrl().toExternalForm(), null, '2', secondValidServer.getDir(), CodebasesAttsNoDialogsTest1.files); 382 ProcessResult pr = server.executeBrowser(null, server.getUrl(HTMLHREF), new AutoOkClosingListener(), new AutoErrorClosingListener()); 383 Assert.assertTrue(pr.stdout.contains(appletCloseString)); 384 Assert.assertTrue(pr.stdout.contains(CodebasesAtts)); 385 Assert.assertTrue(pr.stdout.contains("id: 1")); 386 Assert.assertTrue(pr.stdout.contains("BID2")); 387 } 388 389 @NeedsDisplay 390 @Test 391 @TestInBrowsers(testIn = Browsers.one) codebasesAttsTestWorksHtml2_ValidNormal_normal_absoluteJnlpHrefSecond()392 public void codebasesAttsTestWorksHtml2_ValidNormal_normal_absoluteJnlpHrefSecond() throws Exception { 393 CodebasesAttsNoDialogsTest1.prepareSingle(secondValidServer.getUrl(), secondValidServer.getUrl().toExternalForm(), null, '1', ServerAccess.getInstance().getDir(), CodebasesAttsNoDialogsTest1.files); 394 CodebasesAttsNoDialogsTest1.prepareSingle(server.getUrl(), secondValidServer.getUrl().toExternalForm(), null, '2', secondValidServer.getDir(), CodebasesAttsNoDialogsTest1.files); 395 ProcessResult pr = server.executeBrowser(null, server.getUrl(HTMLHREF), new AutoOkClosingListener(), new AutoErrorClosingListener()); 396 Assert.assertTrue(pr.stdout.contains(appletCloseString)); 397 Assert.assertTrue(pr.stdout.contains(CodebasesAtts)); 398 Assert.assertTrue(pr.stdout.contains("id: 1")); 399 Assert.assertTrue(pr.stdout.contains("BID0")); 400 } 401 402 @NeedsDisplay 403 @Test 404 @TestInBrowsers(testIn = Browsers.one) codebasesAttsTestWorksHtml2_ValidNormal_second_bsoluteJnlpHrefNormal()405 public void codebasesAttsTestWorksHtml2_ValidNormal_second_bsoluteJnlpHrefNormal() throws Exception { 406 CodebasesAttsNoDialogsTest1.prepareSingle(secondValidServer.getUrl(), server.getUrl().toExternalForm(), null, '1', ServerAccess.getInstance().getDir(), CodebasesAttsNoDialogsTest1.files); 407 CodebasesAttsNoDialogsTest1.prepareSingle(server.getUrl(), server.getUrl().toExternalForm(), null, '2', secondValidServer.getDir(), CodebasesAttsNoDialogsTest1.files); 408 ProcessResult pr = server.executeBrowser(null, secondValidServer.getUrl(HTMLHREF), new AutoOkClosingListener(), new AutoErrorClosingListener()); 409 Assert.assertTrue(pr.stdout.contains(appletCloseString)); 410 Assert.assertTrue(pr.stdout.contains(CodebasesAtts)); 411 Assert.assertTrue(pr.stdout.contains("id: 2")); 412 Assert.assertTrue(pr.stdout.contains("BID2")); 413 } 414 415 @NeedsDisplay 416 @Test 417 @TestInBrowsers(testIn = Browsers.one) 418 //all three are valid, but on l one bug is supported now 419 @Bug(id = "http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2016-January/034446.html") 420 //@Bug(id = "http://icedtea.classpath.org/hg/release/icedtea-web-1.6/rev/0d9faf51357d") 421 //@Bug(id = "http://icedtea.classpath.org/hg/icedtea-web/rev/22b7becd48a codebasesAttsTestWorksHtml2_ValidNormal_second_bsoluteJnlpHrefSecond()422 public void codebasesAttsTestWorksHtml2_ValidNormal_second_bsoluteJnlpHrefSecond() throws Exception { 423 CodebasesAttsNoDialogsTest1.prepareSingle(secondValidServer.getUrl(), secondValidServer.getUrl().toExternalForm(), null, '1', ServerAccess.getInstance().getDir(), CodebasesAttsNoDialogsTest1.files); 424 CodebasesAttsNoDialogsTest1.prepareSingle(server.getUrl(), secondValidServer.getUrl().toExternalForm(), null, '2', secondValidServer.getDir(), CodebasesAttsNoDialogsTest1.files); 425 ProcessResult pr = server.executeBrowser(null, secondValidServer.getUrl(HTMLHREF), new AutoOkClosingListener(), new AutoErrorClosingListener()); 426 Assert.assertTrue(pr.stdout.contains(appletCloseString)); 427 Assert.assertTrue(pr.stdout.contains(CodebasesAtts)); 428 Assert.assertTrue(pr.stdout.contains("id: 2")); 429 Assert.assertTrue(pr.stdout.contains("BID0")); 430 } 431 432 } 433