toolkit/components/osfile/tests/mochi/test_osfile_back.xul

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/components/osfile/tests/mochi/test_osfile_back.xul	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,46 @@
     1.4 +<?xml version="1.0"?>
     1.5 +<!--
     1.6 +  Any copyright is dedicated to the Public Domain.
     1.7 +  http://creativecommons.org/publicdomain/zero/1.0/
     1.8 +-->
     1.9 +<window title="Testing OS.File on a chrome worker thread"
    1.10 +        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    1.11 +        onload="test();">
    1.12 +
    1.13 +  <script type="application/javascript"
    1.14 +          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
    1.15 +  <script type="application/javascript"
    1.16 +          src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
    1.17 +  <script type="application/javascript"
    1.18 +          src="worker_handler.js"/>
    1.19 +  <script type="application/javascript">
    1.20 +  <![CDATA[
    1.21 +
    1.22 +let worker;
    1.23 +
    1.24 +function test() {
    1.25 +  ok(true, "test_osfile.xul: Starting test");
    1.26 +  if (navigator.platform.indexOf("Win") != -1) {
    1.27 +    ok(true, "test_osfile.xul: Using Windows test suite");
    1.28 +    worker = new ChromeWorker("worker_test_osfile_win.js");
    1.29 +  } else {
    1.30 +    ok(true, "test_osfile.xul: Using Unix test suite");
    1.31 +    worker = new ChromeWorker("worker_test_osfile_unix.js");
    1.32 +  }
    1.33 +  SimpleTest.waitForExplicitFinish();
    1.34 +  ok(true, "test_osfile.xul: Chrome worker created");
    1.35 +  dump("MAIN: go\n");
    1.36 +  worker_handler(worker);
    1.37 +  worker.postMessage(0);
    1.38 +  ok(true, "test_osfile.xul: Test in progress");
    1.39 +};
    1.40 +]]>
    1.41 +  </script>
    1.42 +
    1.43 +  <body xmlns="http://www.w3.org/1999/xhtml">
    1.44 +    <p id="display"></p>
    1.45 +    <div id="content" style="display:none;"></div>
    1.46 +    <pre id="test"></pre>
    1.47 +  </body>
    1.48 +  <label id="test-result"/>
    1.49 +</window>

mercurial