Bug 1008481 - Switch to the root dir instead of the profile dir. r=me
authorBobby Holley <bobbyholley@gmail.com>
Sat, 13 Sep 2014 13:13:22 -0700
changeset 205210 4390a99d47423c611d4bb3380f36832eda5b84bf
parent 205209 426e9f0a67e31430be5cabff8925751c9dc5b39c
child 205211 1dfce3e64238c35e8d46dc9d011c238a25504af2
push id49109
push userbobbyholley@gmail.com
push dateSat, 13 Sep 2014 20:13:31 +0000
treeherdermozilla-inbound@1dfce3e64238 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1008481
milestone35.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 1008481 - Switch to the root dir instead of the profile dir. r=me
caps/tests/mochitest/test_bug995943.xul
--- a/caps/tests/mochitest/test_bug995943.xul
+++ b/caps/tests/mochitest/test_bug995943.xul
@@ -24,35 +24,33 @@ https://bugzilla.mozilla.org/show_bug.cg
   function debug(msg) { info(msg); }
 
   /** Test for CAPS file:// URI prefs. **/
   SimpleTest.waitForExplicitFinish();
   SimpleTest.requestCompleteLog();
   if (Services.appinfo.OS == "Darwin") // See bug 1067022
     SimpleTest.expectAssertions(0, 1);
 
-  var profileDir = "file://" + Cc["@mozilla.org/file/directory_service;1"]
-                               .getService(Ci.nsIProperties)
-                               .get("ProfD", Ci.nsILocalFile).path;
+  var rootdir = Services.appinfo.OS == "WINNT" ? "file:///C:" : "file:///";
 
   function checkLoadFileURI(domain, shouldLoad) {
     debug("Invoking checkLoadFileURI with domain: " + domain + ", shouldLoad: " + shouldLoad);
     return new Promise(function(resolve, reject) {
       $('ifr').addEventListener('load', function l1() {
         debug("Invoked l1 for " + domain);
         $('ifr').removeEventListener('load', l1);
         function l2() {
           debug("Invoked l2 for " + domain);
           $('ifr').removeEventListener('load', l2);
           ok(shouldLoad, "Successfully loaded file:// URI for domain: " + domain);
           resolve();
         }
         $('ifr').addEventListener('load', l2);
         try {
-          window[0].wrappedJSObject.location = profileDir;
+          window[0].wrappedJSObject.location = rootdir;
           debug("Successfully navigated for " + domain);
         } catch (e) {
           ok(!shouldLoad && /denied|insecure/.test(e),
              "Prevented loading of file:// URI for domain: " + domain + " - " + e);
           $('ifr').removeEventListener('load', l2);
           resolve();
         }
       });