Bug 775588 - Test that temporary directory, profile directory are present. r=yoric

--HG--
extra : rebase_source : ec3ac0e47c1b86241cee965c3bad14bc5ca28116
This commit is contained in:
David Rajchenbach-Teller 2012-08-22 16:58:09 -04:00
parent 33d303a69a
commit e34177f37f

View File

@ -15,9 +15,23 @@
<![CDATA[
let worker;
let main = this;
function test() {
ok(true, "test_osfile_front.xul: Starting test");
// Test OS.Constants.Path
Components.classes["@mozilla.org/net/osfileconstantsservice;1"].
getService(Components.interfaces.nsIOSFileConstantsService).
init();
Components.utils.import("resource://gre/modules/Services.jsm");
is(OS.Constants.Path.tmpDir, Services.dirsvc.get("TmpD", Components.interfaces.nsIFile).path, "OS.Constants.Path.tmpDir is correct");
is(OS.Constants.Path.profileDir, Services.dirsvc.get("ProfD", Components.interfaces.nsIFile).path, "OS.Constants.Path.profileDir is correct");
// Test the OS.File worker
worker = new ChromeWorker("worker_test_osfile_front.js");
SimpleTest.waitForExplicitFinish();
ok(true, "test_osfile_front.xul: Chrome worker created");