Bug 810810 - Fixup misc. directory issues with plugin tests. r=bsmedberg, glandium
authorJim Mathies <jmathies@mozilla.com>
Sat, 17 Nov 2012 14:35:24 -0600
changeset 113625 e4cd4714357d9adbc53a05eb02bcf1bac03d1114
parent 113624 ee74c1c99707cba7ef641e827d3b55f8be44d887
child 113626 131a7ee2362c4ae530cab9effc6143c9cfca4b00
push id18268
push userjmathies@mozilla.com
push dateSat, 17 Nov 2012 20:35:41 +0000
treeherdermozilla-inbound@e4cd4714357d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg, glandium
bugs810810
milestone19.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 810810 - Fixup misc. directory issues with plugin tests. r=bsmedberg, glandium
dom/plugins/test/unit/head_plugins.js
toolkit/mozapps/extensions/test/xpcshell/test_plugins.js
--- a/dom/plugins/test/unit/head_plugins.js
+++ b/dom/plugins/test/unit/head_plugins.js
@@ -1,16 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 // Finds the test plugin library
 function get_test_plugin() {
-  var plugins = gDirSvc.get("CurProcD", Ci.nsILocalFile);
+  var plugins = gDirSvc.get("GreD", Ci.nsILocalFile);
   plugins.append("plugins");
   do_check_true(plugins.exists());
   var plugin = plugins.clone();
   // OSX plugin
   plugin.append("Test.plugin");
   if (plugin.exists()) {
     plugin.normalize();
     return plugin;
--- a/toolkit/mozapps/extensions/test/xpcshell/test_plugins.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_plugins.js
@@ -13,17 +13,17 @@ function run_test() {
   AddonManager.addAddonListener(AddonListener);
   AddonManager.addInstallListener(InstallListener);
 
   run_test_1();
 }
 
 // Finds the test plugin library
 function get_test_plugin() {
-  var plugins = Services.dirsvc.get("CurProcD", AM_Ci.nsIFile);
+  var plugins = Services.dirsvc.get("GreD", AM_Ci.nsIFile);
   plugins.append("plugins");
   do_check_true(plugins.exists());
 
   var plugin = plugins.clone();
   // OSX plugin
   plugin.append("Test.plugin");
   if (plugin.exists())
     return plugin;
@@ -99,17 +99,20 @@ function run_test_1() {
       // Work around the fact that on Linux source builds, if we're using
       // symlinks (i.e. objdir), then Linux will see these as a different scope
       // to non-symlinks.
       // See Bug 562886 and Bug 568027.
       if (testPlugin.isSymlink()) {
         do_check_neq(p.scope, AddonManager.SCOPE_APPLICATION);
         do_check_neq(p.scope, AddonManager.SCOPE_PROFILE);
       } else {
-        do_check_eq(p.scope, AddonManager.SCOPE_APPLICATION);
+        // XXX Prior to landing bug 755724 on mc this will be application,
+        // afterward it will be system.
+        do_check_true(p.scope == AddonManager.SCOPE_APPLICATION ||
+                      p.scope == AddonManager.SCOPE_SYSTEM);
       }
       do_check_true("isCompatibleWith" in p);
       do_check_true("findUpdates" in p);
 
       run_test_2(p);
     });
   });
 }