blob: c7988aa41a6f78fe0c563783a8874759ca6376ec [file] [log] [blame]
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../fast/js/resources/js-test-style.css">
<script src="../fast/js/resources/js-test-pre.js"></script>
<script>
if (window.layoutTestController)
layoutTestController.overridePreference("WebKitJavaEnabled", "1");
</script>
</head>
<body>
<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=23742">bug 23742</a>:
Applet methods can not return arrays to JS.</p>
<div id="console"></div>
<APPLET CODE="SharedApplet.class" NAME="javaTest" WIDTH=150 HEIGHT=25 MAYSCRIPT></APPLET>
<script>
var stringArray = document.javaTest.stringArray();
var stringList = document.javaTest.stringList();
shouldBe('stringArray.length', '3');
shouldBe('stringArray[0] == "One"', 'true');
shouldBe('stringList.getClass().getSimpleName() == "ArrayList"', 'true');
shouldBe('stringList.get(0) == "One"', 'true');
successfullyParsed = true;
</script>
<script src="../fast/js/resources/js-test-post.js"></script>
</body>
</html>