emscripten Humble Cloud interface
Edward Rudd
2014-09-15 ebbe7d4d87d56060e3f8b3ac1dda3e43f4ff8711
client/test/shell.html
@@ -1213,6 +1213,7 @@
         <span><input type="button" value="Fetch from Cloud" onclick="fetch_from_cloud()"></span>
         <span><input type="button" value="Push to Cloud" onclick="push_to_cloud()"></span>
         <span><input type="button" value="Populate local data" onclick="populate_user_data()"></span>
         <span><input type="button" value="Async Fetch" onclick="call_test_function('test_async_fetch', 'test_file.txt')"></span>
      </span>
      <canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
    </div>
@@ -1334,14 +1335,18 @@
          });
      });
      var test_functions = {};
      var test_function_args = {
          'test_async_fetch': ['string']
      };
      function call_test_function(func)
      {
          if (!(func in test_functions))
          {
              var f = Module.cwrap(func,'void', []);
              var f = Module.cwrap(func, 'void', test_function_args[func] || []);
              test_functions[func] = f;
          }
          test_functions[func]();
          var args = Array.prototype.slice.call(arguments, 1)
          test_functions[func].apply(test_functions, args);
      }
      function fetch_from_cloud()
      {