Bug 898819 - test_punycodeURIs.js should not use a shared dir for output. r=mbanner
authorMihnea Dobrescu-Balaur <mihneadb@gmail.com>
Sun, 28 Jul 2013 01:42:20 -0700
changeset 153219 dc057c38b2b52d8617eba8721ebd570cac083a85
parent 153218 c1b7e3837fade2586f9206647344048ad7042bb6
child 153220 80b6d90df8311f54af3c8497de57366985236f63
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmbanner
bugs898819
milestone25.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 898819 - test_punycodeURIs.js should not use a shared dir for output. r=mbanner
uriloader/exthandler/tests/unit/test_punycodeURIs.js
--- a/uriloader/exthandler/tests/unit/test_punycodeURIs.js
+++ b/uriloader/exthandler/tests/unit/test_punycodeURIs.js
@@ -6,19 +6,21 @@
 const kTestURI = "http://\u65e5\u672c\u8a93.jp/";
 const kExpectedURI = "http://xn--wgv71a309e.jp/";
 const kOutputFile = "result.txt";
 
 // Try several times in case the box we're running on is slow.
 const kMaxCheckExistAttempts = 30; // seconds
 var gCheckExistsAttempts = 0;
 
+const tempDir = do_get_tempdir();
+
 function checkFile() {
   // This is where we expect the output
-  var tempFile = do_get_cwd();
+  var tempFile = tempDir.clone();
   tempFile.append(kOutputFile);
 
   if (!tempFile.exists()) {
     if (gCheckExistsAttempts >= kMaxCheckExistAttempts) {
       do_throw("Expected File " + tempFile.path + " does not exist after " +
                  kMaxCheckExistAttempts + " seconds");
     }
     else {
@@ -85,17 +87,17 @@ function run_test() {
 
   if (!exe.exists()) {
     // Maybe we are on windows
     exe.leafName = "WriteArgument.exe";
     if (!exe.exists())
       do_throw("Could not locate the WriteArgument tests executable\n");
   }
 
-  var outFile = processDir.clone();
+  var outFile = tempDir.clone();
   outFile.append(kOutputFile);
 
   // Set an environment variable for WriteArgument to pick up
   var envSvc =
     Components.classes["@mozilla.org/process/environment;1"]
               .getService(Components.interfaces.nsIEnvironment);
 
   // The Write Argument file needs to know where its libraries are, so