зеркало из https://github.com/mozilla/pjs.git
bug 419826 - Make browser mochitests run on SeaMonkey, r=gavin
This commit is contained in:
Родитель
1a52b41712
Коммит
6accfa81a8
|
@ -1,9 +1,10 @@
|
|||
if (Cc === undefined) {
|
||||
var Cc = Components.classes;
|
||||
var Ci = Components.interfaces;
|
||||
}
|
||||
window.addEventListener("load", testOnLoad, false);
|
||||
|
||||
function testOnLoad() {
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
|
||||
// Make sure to launch the test harness for the first opened window only
|
||||
var prefs = Cc["@mozilla.org/preferences-service;1"].
|
||||
getService(Ci.nsIPrefBranch);
|
||||
|
|
|
@ -95,6 +95,12 @@ use constant A11Y_PATH => "/redirect-a11y.html";
|
|||
use constant TESTS_URL => "http://" . TEST_SERVER_HOST . TEST_PATH;
|
||||
use constant CHROMETESTS_URL => "http://" . TEST_SERVER_HOST . CHROME_PATH;
|
||||
use constant A11YTESTS_URL => "http://" . TEST_SERVER_HOST . A11Y_PATH;
|
||||
# main browser chrome URL, same as browser.chromeURL pref
|
||||
#ifdef MOZ_SUITE
|
||||
use constant BROWSER_CHROME_URL => "chrome://navigator/content/navigator.xul";
|
||||
#else
|
||||
use constant BROWSER_CHROME_URL => "chrome://browser/content/browser.xul";
|
||||
#endif
|
||||
|
||||
# Max time in seconds to wait for server startup before tests will fail -- if
|
||||
# this seems big, it's mostly for debug machines where cold startup
|
||||
|
@ -523,7 +529,7 @@ CHROMEEND
|
|||
die("Could not open manifest file $!");
|
||||
print MANIFEST ("content mochikit $chrometest_dir\n");
|
||||
if ($do_browser_tests) {
|
||||
print MANIFEST ("overlay chrome://browser/content/browser.xul chrome://mochikit/content/browser-test-overlay.xul\n");
|
||||
print MANIFEST ("overlay " . BROWSER_CHROME_URL . " chrome://mochikit/content/browser-test-overlay.xul\n");
|
||||
}
|
||||
close(MANIFEST);
|
||||
|
||||
|
|
|
@ -63,6 +63,12 @@ TESTS_URL = "http://" + TEST_SERVER_HOST + TEST_PATH
|
|||
CHROMETESTS_URL = "http://" + TEST_SERVER_HOST + CHROME_PATH
|
||||
A11YTESTS_URL = "http://" + TEST_SERVER_HOST + A11Y_PATH
|
||||
SERVER_SHUTDOWN_URL = "http://" + TEST_SERVER_HOST + "/server/shutdown"
|
||||
# main browser chrome URL, same as browser.chromeURL pref
|
||||
#ifdef MOZ_SUITE
|
||||
BROWSER_CHROME_URL = "chrome://navigator/content/navigator.xul"
|
||||
#else
|
||||
BROWSER_CHROME_URL = "chrome://browser/content/browser.xul"
|
||||
#endif
|
||||
|
||||
# Max time in seconds to wait for server startup before tests will fail -- if
|
||||
# this seems big, it's mostly for debug machines where cold startup
|
||||
|
@ -423,7 +429,7 @@ toolbar#nav-bar {
|
|||
manifestFile = open(manifest, "w")
|
||||
manifestFile.write("content mochikit " + chrometestDir + "\n")
|
||||
if options.browserChrome:
|
||||
overlayLine = "overlay chrome://browser/content/browser.xul " \
|
||||
overlayLine = "overlay " + BROWSER_CHROME_URL + " " \
|
||||
"chrome://mochikit/content/browser-test-overlay.xul\n"
|
||||
manifestFile.write(overlayLine)
|
||||
manifestFile.close()
|
||||
|
|
Загрузка…
Ссылка в новой задаче