Bug 420659 - initial Mochitest support for running Camino. r=jwalden, a=test-only, Camino-only

git-svn-id: svn://10.0.0.236/trunk@251269 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
alqahira%ardisson.org 2008-05-06 17:52:26 +00:00
parent eca05ab3b7
commit 7d63a4788d
3 changed files with 31 additions and 2 deletions

View File

@ -62,6 +62,9 @@ else
PROGRAM = $(MOZ_APP_NAME)-bin$(BIN_SUFFIX) PROGRAM = $(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
endif endif
ifeq ($(MOZ_BUILD_APP),camino)
browser_path = \"$(DIST)/Camino.app/Contents/MacOS/Camino\"
else
ifeq ($(OS_ARCH),Darwin) ifeq ($(OS_ARCH),Darwin)
ifdef MOZ_DEBUG ifdef MOZ_DEBUG
browser_path = \"$(DIST)/$(MOZ_APP_DISPLAYNAME)Debug.app/Contents/MacOS/$(PROGRAM)\" browser_path = \"$(DIST)/$(MOZ_APP_DISPLAYNAME)Debug.app/Contents/MacOS/$(PROGRAM)\"
@ -71,6 +74,7 @@ endif
else else
browser_path = \"$(DIST)/bin/$(PROGRAM)\" browser_path = \"$(DIST)/bin/$(PROGRAM)\"
endif endif
endif
AUTOMATION_PPARGS = \ AUTOMATION_PPARGS = \
-DBROWSER_PATH=$(browser_path) \ -DBROWSER_PATH=$(browser_path) \
@ -83,6 +87,12 @@ else
AUTOMATION_PPARGS += -DIS_MAC=0 AUTOMATION_PPARGS += -DIS_MAC=0
endif endif
ifeq ($(MOZ_BUILD_APP),camino)
AUTOMATION_PPARGS += -DIS_CAMINO=1
else
AUTOMATION_PPARGS += -DIS_CAMINO=0
endif
ifeq ($(host_os), cygwin) ifeq ($(host_os), cygwin)
AUTOMATION_PPARGS += -DIS_CYGWIN=1 AUTOMATION_PPARGS += -DIS_CYGWIN=1
endif endif

View File

@ -120,6 +120,7 @@ unprivilegedServers = [
#else #else
IS_CYGWIN = False IS_CYGWIN = False
#endif #endif
#expand IS_CAMINO = __IS_CAMINO__ != 0
UNIXISH = not IS_WIN32 and not IS_MAC UNIXISH = not IS_WIN32 and not IS_MAC
@ -242,6 +243,8 @@ user_pref("accessibility.typeaheadfind.autostart", false);
user_pref("javascript.options.showInConsole", true); user_pref("javascript.options.showInConsole", true);
user_pref("layout.debug.enable_data_xbl", true); user_pref("layout.debug.enable_data_xbl", true);
user_pref("browser.EULA.override", true); user_pref("browser.EULA.override", true);
user_pref("camino.warn_when_closing", false); // Camino-only, harmless to others
""" """
prefs.append(part) prefs.append(part)
@ -286,6 +289,8 @@ function FindProxyForURL(url, host)
part = """ part = """
user_pref("network.proxy.type", 2); user_pref("network.proxy.type", 2);
user_pref("network.proxy.autoconfig_url", "%(pacURL)s"); user_pref("network.proxy.autoconfig_url", "%(pacURL)s");
user_pref("camino.use_system_proxy_settings", false); // Camino-only, harmless to others
""" % {"pacURL": pacURL} """ % {"pacURL": pacURL}
prefs.append(part) prefs.append(part)
@ -306,7 +311,7 @@ def runApp(testURL, env, app, profileDir, extraArgs):
# now run with the profile we created # now run with the profile we created
cmd = app cmd = app
if IS_MAC and not cmd.endswith("-bin"): if IS_MAC and not IS_CAMINO and not cmd.endswith("-bin"):
cmd += "-bin" cmd += "-bin"
cmd = os.path.abspath(cmd) cmd = os.path.abspath(cmd)
@ -319,7 +324,11 @@ def runApp(testURL, env, app, profileDir, extraArgs):
else: else:
profileDirectory = profileDir + "/" profileDirectory = profileDir + "/"
args.extend(("-no-remote", "-profile", profileDirectory, testURL)) args.extend(("-no-remote", "-profile", profileDirectory))
if IS_CAMINO:
args.extend(("-url", testURL))
else:
args.append((testURL))
args.extend(extraArgs) args.extend(extraArgs)
proc = Process(cmd, args, env = env) proc = Process(cmd, args, env = env)
log.info("Application pid: %d", proc.pid) log.info("Application pid: %d", proc.pid)

View File

@ -80,6 +80,9 @@ else
PROGRAM = $(MOZ_APP_NAME)-bin$(BIN_SUFFIX) PROGRAM = $(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
endif endif
ifeq ($(MOZ_BUILD_APP),camino)
browser_path = \"../$(DIST)/Camino.app/Contents/MacOS/Camino\"
else
ifeq ($(OS_ARCH),Darwin) ifeq ($(OS_ARCH),Darwin)
ifdef MOZ_DEBUG ifdef MOZ_DEBUG
browser_path = \"../$(DIST)/$(MOZ_APP_DISPLAYNAME)Debug.app/Contents/MacOS/$(PROGRAM)\" browser_path = \"../$(DIST)/$(MOZ_APP_DISPLAYNAME)Debug.app/Contents/MacOS/$(PROGRAM)\"
@ -89,6 +92,7 @@ endif
else else
browser_path = \"../$(DIST)/bin/$(PROGRAM)\" browser_path = \"../$(DIST)/bin/$(PROGRAM)\"
endif endif
endif
# These go in _tests/ so they need to go up an extra path segement # These go in _tests/ so they need to go up an extra path segement
TEST_DRIVER_PPARGS = \ TEST_DRIVER_PPARGS = \
@ -102,6 +106,12 @@ else
TEST_DRIVER_PPARGS += -DIS_MAC=0 TEST_DRIVER_PPARGS += -DIS_MAC=0
endif endif
ifeq ($(MOZ_BUILD_APP),camino)
TEST_DRIVER_PPARGS += -DIS_CAMINO=1
else
TEST_DRIVER_PPARGS += -DIS_CAMINO=0
endif
ifeq ($(host_os), cygwin) ifeq ($(host_os), cygwin)
TEST_DRIVER_PPARGS += -DIS_CYGWIN=1 TEST_DRIVER_PPARGS += -DIS_CYGWIN=1
endif endif