imcplugin demo: Extend to support stat() call
[nativeclient.git] / tests / contest_issues / issue63.html
blob22091e3d62547021860ee822021ef845c0ba035f
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html>
4 <!-- Copyright 2008 Google Inc. All rights reserved. -->
5 <head>
6 <title>SRPC Simple Plug-in</title>
7 <script type="text/javascript">
8 // fortytwo is invoked when its button is pressed.
10 function testobj()
12 this.x = 1;
13 this.desc = "hi";
16 function fortytwo() {
17 var myobj = new testobj();
19 try {
20 alert(document.getElementById('pluginobj').fortytwo(myobj));
21 } catch(e) {
22 alert(e);
25 // helloworld is invoked when its button is pressed
27 function helloworld() {
28 var myobj = "hi there";
30 myobj.utf8length = 0xFFFFFFFF;
31 myobj.length = 0xFFFFFFFF;
33 try {
34 alert(document.getElementById('pluginobj').helloworld(myobj));
35 } catch(e) {
36 alert(e);
39 </script>
40 </head>
41 <body>
42 <h1>Native Client SRPC Simple Plug-in</h1>
43 <p>
44 <button type="button" onclick="fortytwo()" id="ftbuttonobj">
45 Call fortytwo()
46 </button>
47 <button type="button" onclick="helloworld()" id="hwbuttonobj">
48 Call helloworld()
49 </button>
50 <embed id="pluginobj" type="application/x-nacl-srpc"
51 width="0" height="0" src="issue63.nexe" />
52 </p>
53 <p>
54 If the plug-in is working correctly, a click on the "Call fortytwo()"
55 button should open a popup dialog containing <b>42</b> and a click
56 on the "Call helloworld()" button should open a popup dialog containing
57 <b>hello, world.</b>.
58 </p>
59 <p>
60 <b>Note:</b> For the purposes of contest issue #63, the actual expected
61 result will be a "Method invocation failed" dialog when either the
62 "Call fortytwo()" button or the "Call helloworld()" button is clicked.
63 The browser should continue to work properly after the dialog is closed.
64 </p>
65 </body>
66 </html>