Remove java-specific preferences from Firefox UI, hidden prefs. Java should be managed via the addons manager. Also improves accuracy of "window.navigator.javaEnabled()". b=506985 r/sr=jst uireview=faaborg
authorJosh Aas <joshmoz@gmail.com>
Mon, 24 Aug 2009 15:56:43 -0700
changeset 31800 46daa864e04cc66b70d005d71ab3bece56a86250
parent 31799 1cb9e3096e8b390d485bbfce54271a2e2f400a04
child 31801 201784b33fc94a3a55139cc7dc8684e66aee803c
push idunknown
push userunknown
push dateunknown
bugs506985
milestone1.9.3a1pre
Remove java-specific preferences from Firefox UI, hidden prefs. Java should be managed via the addons manager. Also improves accuracy of "window.navigator.javaEnabled()". b=506985 r/sr=jst uireview=faaborg
browser/components/migration/src/nsDogbertProfileMigrator.cpp
browser/components/migration/src/nsSafariProfileMigrator.cpp
browser/components/migration/src/nsSeamonkeyProfileMigrator.cpp
browser/components/preferences/content.xul
dom/base/nsGlobalWindow.cpp
js/tests/e4x/Regress/regress-308111.js
modules/libpref/src/init/all.js
modules/plugin/base/src/nsPluginHost.cpp
modules/plugin/base/src/nsPluginHost.h
testing/sisyphus/prefs/mail-user.js
testing/sisyphus/prefs/public-user.js
testing/sisyphus/prefs/test-user.js
--- a/browser/components/migration/src/nsDogbertProfileMigrator.cpp
+++ b/browser/components/migration/src/nsDogbertProfileMigrator.cpp
@@ -394,17 +394,16 @@ nsDogbertProfileMigrator::GetSourceHomeP
 #define F(a) nsDogbertProfileMigrator::a
 
 static 
 nsDogbertProfileMigrator::PrefTransform gTransforms[] = {
   // Simple Copy Prefs
   { "browser.anchor_color",           0, F(GetString),   F(SetString), PR_FALSE, { -1 } },
   { "browser.visited_color",          0, F(GetString),   F(SetString), PR_FALSE, { -1 } },
   { "browser.startup.homepage",       0, F(GetString),   F(SetString), PR_FALSE, { -1 } },
-  { "security.enable_java",           0, F(GetBool),     F(SetBool),   PR_FALSE, { -1 } },
   { "network.cookie.cookieBehavior",  0, F(GetInt),      F(SetInt),    PR_FALSE, { -1 } },
   { "network.cookie.warnAboutCookies",0, F(GetBool),     F(SetBool),   PR_FALSE, { -1 } },
   { "javascript.enabled",             0, F(GetBool),     F(SetBool),   PR_FALSE, { -1 } },
   { "network.proxy.type",             0, F(GetInt),      F(SetInt),    PR_FALSE, { -1 } },
   { "network.proxy.no_proxies_on",    0, F(GetString),   F(SetString), PR_FALSE, { -1 } },
   { "network.proxy.autoconfig_url",   0, F(GetString),   F(SetString), PR_FALSE, { -1 } },
   { "network.proxy.ftp",              0, F(GetString),   F(SetString), PR_FALSE, { -1 } },
   { "network.proxy.ftp_port",         0, F(GetInt),      F(SetInt),    PR_FALSE, { -1 } },
--- a/browser/components/migration/src/nsSafariProfileMigrator.cpp
+++ b/browser/components/migration/src/nsSafariProfileMigrator.cpp
@@ -342,17 +342,16 @@ nsSafariProfileMigrator::PrefTransform g
   { CFSTR("DownloadsClearingPolicy"),     _SPM(INT),      "browser.download.manager.retention", _SPM(SetDownloadRetention), PR_FALSE, { -1 } },
   { CFSTR("WebKitDefaultTextEncodingName"),_SPM(STRING),  "intl.charset.default",           _SPM(SetDefaultEncoding), PR_FALSE, { -1 } },
   { CFSTR("WebKitStandardFont"),          _SPM(STRING),   "font.name.serif.",               _SPM(SetFontName), PR_FALSE, { -1 } },
   { CFSTR("WebKitDefaultFontSize"),       _SPM(INT),      "font.size.serif.",               _SPM(SetFontSize), PR_FALSE, { -1 } },
   { CFSTR("WebKitFixedFont"),             _SPM(STRING),   "font.name.fixed.",               _SPM(SetFontName), PR_FALSE, { -1 } },
   { CFSTR("WebKitDefaultFixedFontSize"),  _SPM(INT),      "font.size.fixed.",               _SPM(SetFontSize), PR_FALSE, { -1 } },
   { CFSTR("WebKitMinimumFontSize"),       _SPM(INT),      "font.minimum-size.",             _SPM(SetFontSize), PR_FALSE, { -1 } },
   { CFSTR("WebKitDisplayImagesKey"),      _SPM(BOOL),     "permissions.default.image",      _SPM(SetDisplayImages), PR_FALSE, { -1 } },
-  { CFSTR("WebKitJavaEnabled"),           _SPM(BOOL),     "security.enable_java",           _SPM(SetBool), PR_FALSE, { -1 } },
   { CFSTR("WebKitJavaScriptEnabled"),     _SPM(BOOL),     "javascript.enabled",             _SPM(SetBool), PR_FALSE, { -1 } },
   { CFSTR("WebKitJavaScriptCanOpenWindowsAutomatically"),
                                           _SPM(BOOL),     "dom.disable_open_during_load",   _SPM(SetBoolInverted), PR_FALSE, { -1 } }
 };
 
 nsresult
 nsSafariProfileMigrator::SetBool(void* aTransform, nsIPrefBranch* aBranch)
 {
--- a/browser/components/migration/src/nsSeamonkeyProfileMigrator.cpp
+++ b/browser/components/migration/src/nsSeamonkeyProfileMigrator.cpp
@@ -365,17 +365,16 @@ nsSeamonkeyProfileMigrator::PrefTransfor
   MAKESAMETYPEPREFTRANSFORM("security.warn_entering_weak",              Bool),
   MAKESAMETYPEPREFTRANSFORM("security.warn_leaving_secure",             Bool),
   MAKESAMETYPEPREFTRANSFORM("security.warn_submit_insecure",            Bool),
   MAKESAMETYPEPREFTRANSFORM("security.warn_viewing_mixed",              Bool),
   MAKESAMETYPEPREFTRANSFORM("security.default_personal_cert",           String),
   MAKESAMETYPEPREFTRANSFORM("security.OSCP.enabled",                    Int),
   MAKESAMETYPEPREFTRANSFORM("security.OSCP.signingCA",                  String),
   MAKESAMETYPEPREFTRANSFORM("security.OSCP.URL",                        String),
-  MAKESAMETYPEPREFTRANSFORM("security.enable_java",                     Bool),
   MAKESAMETYPEPREFTRANSFORM("javascript.enabled",                       Bool),
   MAKESAMETYPEPREFTRANSFORM("dom.disable_window_move_resize",           Bool),
   MAKESAMETYPEPREFTRANSFORM("dom.disable_window_flip",                  Bool),
   MAKESAMETYPEPREFTRANSFORM("dom.disable_window_open_feature.status",   Bool),
   MAKESAMETYPEPREFTRANSFORM("dom.disable_window_status_change",         Bool),
   MAKESAMETYPEPREFTRANSFORM("dom.disable_image_src_set",                Bool),
   MAKESAMETYPEPREFTRANSFORM("accessibility.typeaheadfind.autostart",    Bool),
   MAKESAMETYPEPREFTRANSFORM("accessibility.typeaheadfind.linksonly",    Bool),
--- a/browser/components/preferences/content.xul
+++ b/browser/components/preferences/content.xul
@@ -55,17 +55,16 @@
 
     <preferences id="contentPreferences">
       <!--XXX buttons prefs -->
 
       <!-- POPUPS, IMAGES, JAVASCRIPT -->
       <preference id="dom.disable_open_during_load"   name="dom.disable_open_during_load"   type="bool"/>
       <preference id="permissions.default.image"      name="permissions.default.image"      type="int"/>
       <preference id="javascript.enabled"             name="javascript.enabled"             type="bool"/>
-      <preference id="security.enable_java"           name="security.enable_java"           type="bool"/>
 
       <preference id="pref.advanced.images.disable_button.view_image"
                   name="pref.advanced.images.disable_button.view_image"
                   type="bool"/>
       <preference id="pref.advanced.javascript.disable_button.advanced"
                   name="pref.advanced.javascript.disable_button.advanced"
                   type="bool"/>
 
@@ -125,24 +124,16 @@
             </vbox>
             <vbox>
               <button id="advancedJSButton" label="&advancedJS.label;"
                       accesskey="&advancedJS.accesskey;"
                       oncommand="gContentPane.showAdvancedJS();"
                       preference="pref.advanced.javascript.disable_button.advanced"/>
             </vbox>
           </row>
-          <row id="enableJavaRow">
-            <vbox align="start">
-              <checkbox id="enableJava"
-                        label="&enableJava.label;"
-                        accesskey="&enableJava.accesskey;"
-                        preference="security.enable_java"/>
-            </vbox>
-          </row>
         </rows>
       </grid>
     </groupbox>
 
     <!-- Fonts and Colors -->
     <groupbox id="fontsGroup">
       <caption label="&fontsAndColors.label;"/>
 
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -9453,17 +9453,41 @@ nsNavigator::GetBuildID(nsAString& aBuil
   aBuildID.Truncate();
   AppendASCIItoUTF16(buildID, aBuildID);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNavigator::JavaEnabled(PRBool *aReturn)
 {
-  *aReturn = nsContentUtils::GetBoolPref("security.enable_java");
+  // Return true if we have a handler for "application/x-java-vm",
+  // otherwise return false.
+  *aReturn = PR_FALSE;
+
+  if (!mMimeTypes) {
+    mMimeTypes = new nsMimeTypeArray(this);
+    if (!mMimeTypes)
+      return NS_ERROR_OUT_OF_MEMORY;
+  }
+
+  RefreshMIMEArray();
+
+  PRUint32 count;
+  mMimeTypes->GetLength(&count);
+  for (PRUint32 i = 0; i < count; i++) {
+    nsresult rv;
+    nsIDOMMimeType* type = mMimeTypes->GetItemAt(i, &rv);
+    nsAutoString mimeString;
+    if (type && NS_SUCCEEDED(type->GetType(mimeString))) {
+      if (mimeString.EqualsLiteral("application/x-java-vm")) {
+        *aReturn = PR_TRUE;
+        break;
+      }
+    }
+  }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNavigator::TaintEnabled(PRBool *aReturn)
 {
   *aReturn = PR_FALSE;
--- a/js/tests/e4x/Regress/regress-308111.js
+++ b/js/tests/e4x/Regress/regress-308111.js
@@ -936,17 +936,16 @@ var xml = <prefs>
 <pref><name>font.name.sans-serif.zh-CN</name></pref>
 <pref><name>browser.startup.homepage_override.mstone</name></pref>
 <pref><name>profile.migration_directory</name></pref>
 <pref><name>font.name-list.serif.ja</name></pref>
 <pref><name>mousewheel.withnokey.action</name></pref>
 <pref><name>network.http.accept-encoding</name></pref>
 <pref><name>capability.policy.default.Window.length</name></pref>
 <pref><name>font.default.x-mlym</name></pref>
-<pref><name>security.enable_java</name></pref>
 <pref><name>network.standard-url.escape-utf8</name></pref>
 <pref><name>network.standard-url.encode-utf8</name></pref>
 <pref><name>network.IDN.whitelist.info</name></pref>
 <pref><name>font.name.monospace.x-armn</name></pref>
 <pref><name>keyword.enabled</name></pref>
 <pref><name>capability.policy.default.History.forward.get</name></pref>
 </prefs>;
 
--- a/modules/libpref/src/init/all.js
+++ b/modules/libpref/src/init/all.js
@@ -544,17 +544,16 @@ pref("javascript.options.jit.chrome",   
 // This preference limits the memory usage of javascript.
 // If you want to change these values for your device,
 // please find Bug 417052 comment 17 and Bug 456721
 // Comment 32.
 pref("javascript.options.mem.high_water_mark", 32);
 pref("javascript.options.mem.gc_frequency",   1600);
 
 // advanced prefs
-pref("security.enable_java",                true);
 pref("advanced.mailftp",                    false);
 pref("image.animation_mode",                "normal");
 
 // Same-origin policy for file URIs, "false" is traditional
 pref("security.fileuri.strict_origin_policy", true);
 
 // If there is ever a security firedrill that requires
 // us to block certian ports global, this is the pref 
--- a/modules/plugin/base/src/nsPluginHost.cpp
+++ b/modules/plugin/base/src/nsPluginHost.cpp
@@ -935,29 +935,16 @@ nsPluginTag::GetDisabled(PRBool* aDisabl
 }
 
 NS_IMETHODIMP
 nsPluginTag::SetDisabled(PRBool aDisabled)
 {
   if (HasFlag(NS_PLUGIN_FLAG_ENABLED) == !aDisabled)
     return NS_OK;
 
-  if (mIsJavaPlugin) {
-    nsresult rv;
-    nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    PRBool javaEnabled;
-    rv = pref->GetBoolPref("security.enable_java", &javaEnabled);
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    if (javaEnabled == aDisabled)
-      return pref->SetBoolPref("security.enable_java", !aDisabled);
-  }
-
   if (aDisabled)
     UnMark(NS_PLUGIN_FLAG_ENABLED);
   else
     Mark(NS_PLUGIN_FLAG_ENABLED);
 
   mPluginHost->UpdatePluginInfo(this);
   return NS_OK;
 }
@@ -2453,19 +2440,17 @@ nsPluginStreamListenerPeer::VisitHeader(
 
   return listener->NewResponseHeader(PromiseFlatCString(header).get(),
                                      PromiseFlatCString(value).get());
 }
 
 nsPluginHost::nsPluginHost()
   // No need to initialize members to nsnull, PR_FALSE etc because this class
   // has a zeroing operator new.
-  : mJavaEnabled(PR_TRUE)
-{
-
+{
   gActivePluginList = &mPluginInstanceTagList;
 
   // check to see if pref is set at startup to let plugins take over in
   // full page mode for certain image mime types that we handle internally
   mPrefService = do_GetService(NS_PREFSERVICE_CONTRACTID);
   if (mPrefService) {
     PRBool tmp;
     nsresult rv = mPrefService->GetBoolPref("plugin.override_internal_types",
@@ -2482,21 +2467,16 @@ nsPluginHost::nsPluginHost()
     rv = mPrefService->GetBoolPref("plugin.default_plugin_disabled", &tmp);
     if (NS_SUCCEEDED(rv)) {
       mDefaultPluginDisabled = tmp;
     }
 
 #ifdef WINCE
     mDefaultPluginDisabled = PR_TRUE;
 #endif
-
-    rv = mPrefService->GetBoolPref("security.enable_java", &tmp);
-    if (NS_SUCCEEDED(rv)) {
-      mJavaEnabled = tmp;
-    }
   }
 
   nsCOMPtr<nsIObserverService> obsService = do_GetService("@mozilla.org/observer-service;1");
   if (obsService) {
     obsService->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, PR_FALSE);
     obsService->AddObserver(this, NS_PRIVATE_BROWSING_SWITCH_TOPIC, PR_FALSE);
   }
 
@@ -2530,22 +2510,16 @@ NS_IMPL_ISUPPORTS3(nsPluginHost,
 nsPluginHost*
 nsPluginHost::GetInst()
 {
   if (!sInst) {
     sInst = new nsPluginHost();
     if (!sInst)
       return nsnull;
     NS_ADDREF(sInst);
-
-    // Must call this after the refcount is already 1!
-    if (NS_FAILED(sInst->AddPrefObserver())) {
-      NS_RELEASE(sInst);
-      return nsnull;
-    }
   }
 
   NS_ADDREF(sInst);
   return sInst;
 }
 
 // static
 const char *
@@ -2986,19 +2960,16 @@ NS_IMETHODIMP nsPluginHost::Destroy()
     nsCOMPtr<nsIDirectoryService> dirService =
       do_GetService(kDirectoryServiceContractID);
     if (dirService)
       dirService->UnregisterProvider(mPrivateDirServiceProvider);
     mPrivateDirServiceProvider = nsnull;
   }
 #endif /* XP_WIN */
 
-  nsCOMPtr<nsIPrefBranch2> prefBranch(do_QueryInterface(mPrefService));
-  if (prefBranch)
-    prefBranch->RemoveObserver("security.enable_java", this);
   mPrefService = nsnull; // release prefs service to avoid leaks!
 
   return NS_OK;
 }
 
 void nsPluginHost::UnloadUnusedLibraries()
 {
   // unload any remaining plugin libraries from memory
@@ -3133,24 +3104,18 @@ NS_IMETHODIMP nsPluginHost::InstantiateE
   }
 
   // Look for even disabled plugins, because if the plugin for this type is
   // disabled, we don't want to go on and end up in SetUpDefaultPluginInstance.
   nsPluginTag* pluginTag = FindPluginForType(aMimeType, PR_FALSE);
   if (pluginTag) {
     if (!pluginTag->IsEnabled())
       return NS_ERROR_NOT_AVAILABLE;
-  } else if (!mJavaEnabled && IsJavaMIMEType(aMimeType)) {
-    // Even if we had no Java plugin, if mJavaEnabled is false we should throw
-    // here for Java types.  Note that we only need to do this for the case
-    // when pluginTag is null; if we had a pluginTag, it would have its
-    // NS_PLUGIN_FLAG_ENABLED set the right way.
-    return NS_ERROR_NOT_AVAILABLE;
-  }
-    
+  }
+
   PRBool isJava = pluginTag && pluginTag->mIsJavaPlugin;
 
   // Determine if the scheme of this URL is one we can handle internaly because we should
   // only open the initial stream if it's one that we can handle internally. Otherwise
   // |NS_OpenURI| in |InstantiateEmbeddedPlugin| may open up a OS protocal registered helper app
   PRBool bCanHandleInternally = PR_FALSE;
   nsCAutoString scheme;
   if (aURL && NS_SUCCEEDED(aURL->GetScheme(scheme))) {
@@ -4418,17 +4383,17 @@ nsresult nsPluginHost::ScanPluginsDirect
           // it is risky and we have never seen this plugin before then disable it
           if (state == nsIBlocklistService::STATE_BLOCKED)
             pluginTag->Mark(NS_PLUGIN_FLAG_BLOCKLISTED);
           else if (state == nsIBlocklistService::STATE_SOFTBLOCKED && !seenBefore)
             enabled = PR_FALSE;
         }
       }
 
-      if (!enabled || (pluginTag->mIsJavaPlugin && !mJavaEnabled))
+      if (!enabled)
         pluginTag->UnMark(NS_PLUGIN_FLAG_ENABLED);
 
       // if this is unwanted plugin we are checkin for, or this is a duplicate plugin,
       // add it to our cache info list so we can cache the unwantedness of this plugin
       // when we sync cached plugins to registry
       NS_ASSERTION(!pluginTag->HasFlag(NS_PLUGIN_FLAG_UNWANTED),
                    "Brand-new tags should not be unwanted");
       if ((checkForUnwantedPlugins && isUnwantedPlugin(pluginTag)) ||
@@ -5062,22 +5027,16 @@ nsPluginHost::ReadPluginInfo()
     if (heapalloced)
       delete [] heapalloced;
 
     if (!tag)
       continue;
 
     // Mark plugin as loaded from cache
     tag->Mark(tagflag | NS_PLUGIN_FLAG_FROMCACHE);
-    if (tag->mIsJavaPlugin) {
-      if (mJavaEnabled)
-        tag->Mark(NS_PLUGIN_FLAG_ENABLED);
-      else
-        tag->UnMark(NS_PLUGIN_FLAG_ENABLED);
-    }
     PR_LOG(nsPluginLogging::gPluginLog, PLUGIN_LOG_BASIC,
       ("LoadCachedPluginsInfo : Loading Cached plugininfo for %s\n", tag->mFileName.get()));
     tag->mNext = mCachedPlugins;
     mCachedPlugins = tag;
 
   }
   return NS_OK;
 }
@@ -5501,38 +5460,16 @@ NS_IMETHODIMP nsPluginHost::Observe(nsIS
   }
   if (!nsCRT::strcmp(NS_PRIVATE_BROWSING_SWITCH_TOPIC, aTopic)) {
     // inform all active plugins of changed private mode state
     for (nsPluginInstanceTag* ap = mPluginInstanceTagList.mFirst; ap; ap = ap->mNext) {
       nsNPAPIPluginInstance* pi = static_cast<nsNPAPIPluginInstance*>(ap->mInstance);
       pi->PrivateModeStateChanged();
     }
   }
-  if (!nsCRT::strcmp(NS_PREFBRANCH_PREFCHANGE_TOPIC_ID, aTopic)) {
-    NS_ASSERTION(someData &&
-                 nsDependentString(someData).EqualsLiteral("security.enable_java"),
-                 "Unexpected pref");
-    nsCOMPtr<nsIPrefBranch> branch = do_QueryInterface(aSubject);
-    NS_ASSERTION(branch, "Not a pref branch?");
-    PRBool enabled;
-    if (NS_FAILED(branch->GetBoolPref("security.enable_java", &enabled)))
-      enabled = PR_TRUE;
-
-    if (enabled != mJavaEnabled) {
-      mJavaEnabled = enabled;
-      // We want to keep the java PluginTag around so we'll know that it's
-      // actually disabled, not just not present.  So just manually mark it as
-      // disabled so at least FindPluginForType/Extension doesn't return
-      // anything.
-      for (nsPluginTag* cur = mPlugins; cur; cur = cur->mNext) {
-        if (cur->mIsJavaPlugin)
-          cur->SetDisabled(!mJavaEnabled);
-      }
-    }
-  }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsPluginHost::HandleBadPlugin(PRLibrary* aLibrary, nsIPluginInstance *aInstance)
 {
   // the |aLibrary| parameter is not needed anymore, after we added |aInstance| which
   // can also be used to look up the plugin name, but we cannot get rid of it because
@@ -5937,24 +5874,16 @@ nsPluginHost::GetPluginName(nsIPluginIns
 nsresult nsPluginHost::AddUnusedLibrary(PRLibrary * aLibrary)
 {
   if (!mUnusedLibraries.Contains(aLibrary)) // don't add duplicates
     mUnusedLibraries.AppendElement(aLibrary);
 
   return NS_OK;
 }
 
-nsresult nsPluginHost::AddPrefObserver()
-{
-  nsCOMPtr<nsIPrefBranch2> prefBranch(do_QueryInterface(mPrefService));
-  NS_ENSURE_TRUE(prefBranch, NS_ERROR_UNEXPECTED);
-  
-  return prefBranch->AddObserver("security.enable_java", this, PR_TRUE);
-}
-
 nsresult nsPluginStreamListenerPeer::ServeStreamAsFile(nsIRequest *request,
                                                        nsISupports* aContext)
 {
   if (!mInstance)
     return NS_ERROR_FAILURE;
 
   // mInstance->Stop calls mPStreamListener->CleanUpStream(), so stream will be properly clean up
   mInstance->Stop();
--- a/modules/plugin/base/src/nsPluginHost.h
+++ b/modules/plugin/base/src/nsPluginHost.h
@@ -336,19 +336,16 @@ private:
   // checks if given plugin is a duplicate of what we already have
   // in the plugin list but found in some different place
   PRBool IsDuplicatePlugin(nsPluginTag * aPluginTag);
 
   nsresult EnsurePrivateDirServiceProvider();
 
   // calls PostPluginUnloadEvent for each library in mUnusedLibraries
   void UnloadUnusedLibraries();
-
-  // Add our pref observer
-  nsresult AddPrefObserver();
   
   char *mPluginPath;
   nsRefPtr<nsPluginTag> mPlugins;
   nsRefPtr<nsPluginTag> mCachedPlugins;
   PRPackedBool mPluginsLoaded;
   PRPackedBool mDontShowBadPluginMessage;
   PRPackedBool mIsDestroyed;
 
--- a/testing/sisyphus/prefs/mail-user.js
+++ b/testing/sisyphus/prefs/mail-user.js
@@ -8,17 +8,16 @@ user_pref("capability.principal.codebase
 user_pref("capability.principal.codebase.p0.id", "http://test.mozilla.com");
 user_pref("capability.principal.codebase.p1.granted", "UniversalPreferencesWrite UniversalXPConnect UniversalBrowserWrite UniversalPreferencesRead UniversalBrowserRead");
 user_pref("capability.principal.codebase.p1.id", "http://test.bclary.com");
 user_pref("dom.allow_scripts_to_close_windows", true);
 user_pref("dom.max_script_run_time", 0);
 user_pref("extensions.update.enabled", false);
 user_pref("extensions.update.notifyUser", false);
 user_pref("mail.startup.enabledMailCheckOnce", false);
-user_pref("security.enable_java", false);
 user_pref("security.warn_submit_insecure", false);
 user_pref("signed.applets.codebase_principal_support", true);
 user_pref("mailnews.start_page.override_url", "http://test.mozilla.com/bin/install-extensions-1.html");
 user_pref("mailnews.start_page.url", "http://test.mozilla.com/bin/install-extensions-1.html");
 user_pref("mailnews.start_page.welcome_url", "http://test.mozilla.com/bin/install-extensions-1.html");
 user_pref("browser.warnOnQuit", false);
 user_pref("extensions.checkCompatibility", false);
 user_pref("extensions.checkUpdateSecurity", false);
--- a/testing/sisyphus/prefs/public-user.js
+++ b/testing/sisyphus/prefs/public-user.js
@@ -13,17 +13,16 @@ user_pref("dom.allow_scripts_to_close_wi
 user_pref("dom.disable_move_resize", true);
 user_pref("dom.disable_open_during_load", true);
 user_pref("dom.disable_window_flip", true);
 user_pref("dom.disable_window_open_feature.status", true);
 user_pref("dom.max_script_run_time", 0);
 user_pref("dom.max_chrome_script_run_time", 0);
 user_pref("javascript.options.showInConsole", true);
 user_pref("layout.css.report_errors", true);
-user_pref("security.enable_java", false);
 user_pref("security.warn_entering_secure", false);
 user_pref("security.warn_entering_weak", false);
 user_pref("security.warn_leaving_secure", false);
 user_pref("security.warn_submit_insecure", false);
 user_pref("security.warn_viewing_mixed", false);
 user_pref("signed.applets.codebase_principal_support", true);
 user_pref("browser.warnOnQuit", false);
 user_pref("extensions.checkCompatibility", false);
--- a/testing/sisyphus/prefs/test-user.js
+++ b/testing/sisyphus/prefs/test-user.js
@@ -10,17 +10,16 @@ user_pref("capability.principal.codebase
 user_pref("capability.principal.codebase.p1.granted", "UniversalPreferencesWrite UniversalXPConnect UniversalBrowserWrite UniversalPreferencesRead UniversalBrowserRead");
 user_pref("capability.principal.codebase.p1.id", "http://test.bclary.com");
 user_pref("dom.allow_scripts_to_close_windows", true);
 user_pref("dom.disable_open_during_load", false);
 user_pref("dom.max_script_run_time", 0);
 user_pref("dom.max_chrome_script_run_time", 0);
 user_pref("javascript.options.showInConsole", true);
 user_pref("layout.css.report_errors", true);
-user_pref("security.enable_java", false);
 user_pref("security.warn_entering_secure", false);
 user_pref("security.warn_entering_weak", false);
 user_pref("security.warn_leaving_secure", false);
 user_pref("security.warn_submit_insecure", false);
 user_pref("security.warn_viewing_mixed", false);
 user_pref("signed.applets.codebase_principal_support", true);
 user_pref("browser.warnOnQuit", false);
 user_pref("browser.cache.check_doc_frequency", 1);