Add FakeWhisperAPI for serverless development

When included after api.js, fake_api.js inits a FakeWhisperAPI.

FakeWhisperAPI inherits the methods of API, overrides a few, and
then usurps its place as the one true API.

Single device mode successfully "registers" against FakeAPI. Sadly,
multidevice mode has a recursive loop somewhere that makes the callstack
asplode.
This commit is contained in:
lilia
2014-03-14 00:47:13 -07:00
parent 6934ba0b92
commit fe1b5435aa
4 changed files with 30 additions and 0 deletions

View File

@@ -17,6 +17,7 @@
<script type="text/javascript" src="js-deps/ProtoBuf.min.js"></script>
<script type="text/javascript" src="js/helpers.js"></script>
<script type="text/javascript" src="js/api.js"></script>
<script type="text/javascript" src="js/fake_api.js"></script>
<script type="text/javascript" src="js/background.js"></script>
</head>
<body data-name="curve25519" data-tools="pnacl" data-configs="Debug Release" data-path="pnacl/{config}">