| OLD | NEW |
| 1 <script> | 1 <!-- |
| 2 // OnNaClLoad should be called and invoking a method | 2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. Use of this |
| 3 // in a NaCl module should return a correct value. | 3 * source code is governed by a BSD-style license that can be found in the |
| 4 | 4 * LICENSE file. |
| 5 var pass = chrome.test.callbackPass; | 5 --> |
| 6 | 6 <script src="background.js"></script> |
| 7 chrome.test.runTests([ | |
| 8 function nacl() { | |
| 9 // Nothing to do here, | |
| 10 // we call the callback when we get the notification from NaCl | |
| 11 } | |
| 12 ]); | |
| 13 | |
| 14 function OnNaClLoad() { | |
| 15 try { | |
| 16 plugin = document.getElementById('pluginobj'); | |
| 17 result = plugin.helloworld(); | |
| 18 if ('hello, world.' != result) { | |
| 19 chrome.test.fail(); | |
| 20 } | |
| 21 } catch(e) { | |
| 22 chrome.test.fail(); | |
| 23 } | |
| 24 chrome.test.succeed(); | |
| 25 } | |
| 26 | |
| 27 function OnNaClFail() { | |
| 28 chrome.test.fail(); | |
| 29 } | |
| 30 </script> | |
| 31 | 7 |
| 32 <h1>Native Client SRPC Simple Plug-in</h1> | 8 <h1>Native Client SRPC Simple Plug-in</h1> |
| 33 <p> | 9 <p> |
| 34 <embed name="nacl_module" | 10 <embed name="nacl_module" |
| 35 id="pluginobj" | 11 id="pluginobj" |
| 36 width=0 height=0 | 12 width=0 height=0 |
| 37 src="bin/x86/srpc_hw.nexe" | 13 src="bin/x86/srpc_hw.nexe" |
| 38 type="application/x-nacl-srpc" | 14 type="application/x-nacl-srpc" |
| 39 onload="OnNaClLoad()" | 15 onload="OnNaClLoad()" |
| 40 onfail="OnNaClFail()" | 16 onfail="OnNaClFail()" |
| 41 /> | 17 /> |
| 42 </p> | 18 </p> |
| OLD | NEW |