Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: tests/prebuilt/srpc_hw.html

Issue 3145013: Fix multi-arch support for Chrome: start downloading the nexe when SetWindow ... (Closed) Base URL: http://nativeclient.googlecode.com/svn/trunk/src/native_client/
Patch Set: '' Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« src/trusted/plugin/plugin.cc ('K') | « tests/prebuilt/nacl_js_lib.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>SRPC Simple Plug-in</title>
5 <META HTTP-EQUIV="Pragma" CONTENT="no-cache" />
6 <META HTTP-EQUIV="Expires" CONTENT="-1" />
7 </head>
8 <body onload="nacllib.waitForModulesAndRunTests();"
9 onunload="nacllib.cleanUp();" >
10 <script type="text/javascript">
11 //<![CDATA[
12 function fortytwo() {
13 var result = "";
14 try {
15 result = document.getElementById('pluginobj').fortytwo();
16 } catch(e) {
17 result = "ERROR: " + e;
18 }
19 alert("" + result);
20 }
21
22 function helloworld() {
23 var result = "";
24 try {
25 result = document.getElementById('pluginobj').helloworld();
26 } catch(e) {
27 result = "ERROR: " + e;
28 }
29 alert("" + result);
30 }
31 //]]>
32 </script>
33
34 <h1>Native Client SRPC Simple Plug-in</h1>
35 <p>
36 <button onclick='fortytwo()'>Call fortytwo()</button>
37 <button onclick='helloworld()'>Call helloworld()</button>
38
39 <embed name="nacl_module"
40 id="pluginobj"
41 width=0 height=0
42 nexes="
43 x86-32: /tests/prebuilt/x86/srpc_hw.nexe
44 x86-64: /tests/prebuilt/x64/srpc_hw.nexe
45 ARM: /tests/prebuilt/arm/srpc_hw.nexe"
46 type="application/x-nacl-srpc" />
47 </p>
48
49 <p>If the plug-in is working correctly, a click on the "Call fortytwo" button
50 should open a popup dialog containing <b>42</b> as value.</p>
51
52 <p> Clicking on the "Call helloworld" button
53 should open a popup dialog containing <b>hello, world</b> as value.</p>
54
55 <h2>Status</h2>
56 <div id=status>NO-STATUS</div>
57
58 <script type="text/javascript" src="nacl_js_lib.js"></script>
59 <script type="text/javascript">
60 //<![CDATA[
61 var nacllib = new NaclLib("nacl_module", "status", 500);
62
63 nacllib.test = function() {
64 var plugin = document.getElementById("pluginobj");
65 if ('42' != plugin.fortytwo()) {
66 return "expected 42";
67 }
68
69 if ('hello, world.' != plugin.helloworld()) {
70 return "expected 'hello, world.'";
71 }
72
73 document.cookie = 'status=OK';
74
75 return "";
76 };
77 //]]>
78 </script>
79
80 </body>
81 </html>
OLDNEW
« src/trusted/plugin/plugin.cc ('K') | « tests/prebuilt/nacl_js_lib.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698