Permalink
Browse files

PatrickLightbody Firefox now launches on Snow Leopard

r7828
  • Loading branch information...
Patrick Lightbody
Patrick Lightbody committed Dec 10, 2009
1 parent a4a354e commit 6d3c92601da96b861b9fec30dfc3482fd0cacf1f
@@ -24,14 +24,13 @@
import org.apache.commons.logging.Log;
import org.openqa.jetty.log.LogFactory;
import org.openqa.selenium.Platform;
import org.openqa.selenium.server.ApplicationRegistry;
import org.openqa.selenium.server.BrowserConfigurationOptions;
import org.openqa.selenium.server.RemoteControlConfiguration;
import org.openqa.selenium.server.browserlaunchers.locators.Firefox2or3Locator;
public class FirefoxChromeLauncher extends AbstractBrowserLauncher {
public static final String CHROME_URL = "chrome://killff/content/kill.html";
private static Log LOGGER = LogFactory.getLog(FirefoxChromeLauncher.class);
private File customProfileDir = null;
@@ -65,7 +64,11 @@ public FirefoxChromeLauncher(BrowserConfigurationOptions browserOptions, RemoteC
}
this.browserInstallation = browserInstallation;
shell.setLibraryPath(browserInstallation.libraryPath());
// don't set the library path on Snow Leopard
Platform platform = Platform.getCurrent();
if (!platform.is(Platform.MAC) || ((platform.is(Platform.MAC)) && platform.getMajorVersion() <= 10 && platform.getMinorVersion() <= 5)) {
shell.setLibraryPath(browserInstallation.libraryPath());
}
// Set MOZ_NO_REMOTE in order to ensure we always get a new Firefox process
// http://blog.dojotoolkit.org/2005/12/01/running-multiple-versions-of-firefox-side-by-side
shell.setEnvironmentVariable("MOZ_NO_REMOTE", "1");
@@ -93,6 +96,7 @@ protected void launch(String url) {
"-profile",
profilePath
};
shell.setEnvironmentVariable("NO_EM_RESTART", "1");
shell.setCommandline(cmdarray);
process = shell.asyncSpawn();
} catch (IOException e) {
@@ -112,8 +116,7 @@ private void populateCustomProfileDirectory(String profilePath) throws IOExcepti
browserInstallation.launcherFilePath(),
"-profile",
profilePath,
"-chrome",
CHROME_URL
"-silent"
};
LOGGER.info("Preparing Firefox profile...");
shell.setCommandline(cmdarray);

0 comments on commit 6d3c926

Please sign in to comment.