tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / java / argument-to-object-type.html
1 <html>
2 <head>
3 <meta charset="utf-8">
4 <script src="../fast/js/resources/js-test-pre.js"></script>
5 <script>
6 if (window.layoutTestController)
7     layoutTestController.overridePreference("WebKitJavaEnabled", "1");
8 </script>
9 </head>
10 <body>
11
12 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=35202">bug 35202</a>:
13 Calling Java method which accepts Object always passes a null argument.</p>
14
15 <div id="console"></div>
16 <APPLET CODE="SharedApplet.class" NAME="javaTest" WIDTH=150 HEIGHT=25 MAYSCRIPT></APPLET>
17 <script>
18
19 // The returned result should be a primitive, but WebKit makes a string object out of it.
20 // Until this is fixed, checking the result with == instead of relying on shouldBe.
21 shouldBe('document.javaTest.objectToString("PАSS") == "PАSS"', 'true');
22 shouldBe('document.javaTest.objectToString(undefined) == "undefined"', 'true');
23 shouldBe('document.javaTest.objectToString(5) == "5.0"', 'true');
24
25 </script>
26 <script src="../fast/js/resources/js-test-post.js"></script>
27 </body>
28 </html>