dom/worklet/tests/file_import_with_cache.html
author Michael Layzell <michael@thelayzells.com>
Tue, 13 Dec 2016 16:32:54 +0800
changeset 325804 44a95445e11d8eff6ca5c10f1b2b913a9f44eeb0
parent 321314 1946c5517376329c66b51e7ec943e841f7a5e348
child 325820 ed5c93dfd7dd4e1a751a5b99db7ca8fd9c6280ce
permissions -rw-r--r--
Bug 1318767 - Part 3: Use SessionStore to recover from missing GroupedSHistory segments, r=ehsan, r=mconley MozReview-Commit-ID: FDmQIjiHox7

<!DOCTYPE HTML>
<html>
<head>
  <title>Test for Worklet</title>
  <script type="application/javascript" src="common.js"></script>
</head>
<body>

<script type="application/javascript">

setupTest();

var worklet = window.createWorklet();
ok(!!worklet, "We have a Worklet");

function loading() {
  worklet.import("server_import_with_cache.sjs")
  .then(() => {
    ok(true, "Import should load a resource.");
  }, () => {
    ok(false, "Import should load a resource.");
  })
  .then(() => {
    done();
  });
}

var count = 0;
const MAX = 10;

function done() {
  if (++count == MAX) {
    SimpleTest.finish();
  }
}

for (var i = 0; i < MAX; ++i) {
  loading();
}

</script>
</body>
</html>