1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/components/osfile/tests/mochi/test_osfile_front.xul Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,44 @@ 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 +let main = this; 1.24 + 1.25 +function test() { 1.26 + info("test_osfile_front.xul: Starting test"); 1.27 + 1.28 + // Test the OS.File worker 1.29 + 1.30 + worker = new ChromeWorker("worker_test_osfile_front.js"); 1.31 + SimpleTest.waitForExplicitFinish(); 1.32 + info("test_osfile_front.xul: Chrome worker created"); 1.33 + dump("MAIN: go\n"); 1.34 + worker_handler(worker); 1.35 + worker.postMessage(0); 1.36 + ok(true, "test_osfile_front.xul: Test in progress"); 1.37 +}; 1.38 +]]> 1.39 + </script> 1.40 + 1.41 + <body xmlns="http://www.w3.org/1999/xhtml"> 1.42 + <p id="display"></p> 1.43 + <div id="content" style="display:none;"></div> 1.44 + <pre id="test"></pre> 1.45 + </body> 1.46 + <label id="test-result"/> 1.47 +</window>