blob: 42a4a71fee41fc2bb1b2027fa84549d0f8697c53 [file] [log] [blame]
<html>
<head>
<meta charset="utf-8">
<script src="../resources/js-test-pre.js"></script>
<script>
if (window.testRunner)
testRunner.overridePreference("WebKitJavaEnabled", "1");
</script>
</head>
<body>
<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=35202">bug 35202</a>:
Calling Java method which accepts Object always passes a null argument.</p>
<div id="console"></div>
<APPLET CODE="SharedApplet.class" NAME="javaTest" WIDTH=150 HEIGHT=25 MAYSCRIPT></APPLET>
<script>
// The returned result should be a primitive, but WebKit makes a string object out of it.
// Until this is fixed, checking the result with == instead of relying on shouldBe.
shouldBe('document.javaTest.objectToString("PАSS") == "PАSS"', 'true');
shouldBe('document.javaTest.objectToString(undefined) == "undefined"', 'true');
shouldBe('document.javaTest.objectToString(5) == "5.0"', 'true');
</script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>