| Index: tests/nameservice/srpc_nameservice_test.html
|
| ===================================================================
|
| --- tests/nameservice/srpc_nameservice_test.html (revision 0)
|
| +++ tests/nameservice/srpc_nameservice_test.html (revision 0)
|
| @@ -0,0 +1,54 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| + <head>
|
| + <title>SRPC Name Service</title>
|
| + <META HTTP-EQUIV="Pragma" CONTENT="no-cache" />
|
| + <META HTTP-EQUIV="Expires" CONTENT="-1" />
|
| + <script type="text/javascript" src="nacltest.js"></script>
|
| + <script type="application/x-javascript">
|
| + //<![CDATA[
|
| +
|
| +function testMethods(tester, server) {
|
| + tester.addTest('namedump', function() {
|
| + assertEqual('nbytes = 28\nmanifest_proxy\nSecureRandom\n',
|
| + server.namedump());
|
| + })
|
| + // RNG output -- no fixed seed testing, so cannot compare output;
|
| + // we aren't about to run chi-squared testing in javascript...
|
| + // tester.addTest('rngdump', function() {
|
| + // alert(server.rngdump());
|
| + // })
|
| + tester.addTest('manifest_test', function() {
|
| + assertEqual('ManifestList: This is a reply from the manifest reverse service in the plugin.\n',
|
| + server.manifest_test());
|
| + })
|
| +}
|
| +
|
| + //]]>
|
| + </script>
|
| + </head>
|
| + <body>
|
| + <h1>Native Client Name Service</h1>
|
| + NOTE: Set NACL_ENABLE_EXPERIMENTAL_JAVASCRIPT_APIS=1 to run this test.
|
| +
|
| + <p>
|
| + This test uses internal interfaces that should not be used by
|
| + untrusted code. Only the IRT code should use them, since these
|
| + are not part of the stable ABI. (The IRT implements the stable
|
| + NaCl/Pepper interfaces.)
|
| + </p>
|
| +
|
| + <embed type="application/x-nacl" id="nacl_server"
|
| + name="nacl_module" width="0" height="0" src="srpc_nameservice.nmf" />
|
| +
|
| + <script type="text/javascript">
|
| + //<![CDATA[
|
| + var tester = new Tester();
|
| + var server = $("nacl_server");
|
| + testMethods(tester, server);
|
| + tester.waitFor(server);
|
| + tester.run();
|
| + //]]>
|
| + </script>
|
| + </body>
|
| +</html>
|
|
|