I think I figured out the problem with bug 384192; the code added to quit.js is also used in the browser tests, but it triggers an undefined-variable exception there, and I think the tests are getting killed by test timeout code that doesn't print a helpful 'tests timed out' message to give a little help determining the cause of the failure. We shall see...

This commit is contained in:
jwalden@mit.edu 2007-07-12 20:38:31 -07:00
parent 50dd33d1af
commit c1fc2bbd75
4 changed files with 45 additions and 15 deletions

View File

@ -12,7 +12,7 @@
</div>
<iframe name="frame1" src="file_crossdomainprops_inner.html"></iframe>
<iframe name="frame2" src="http://localhost:8889/tests/dom/tests/mochitest/dom-level0/file_crossdomainprops_inner.html"></iframe>
<iframe name="frame2" src="http://example.com/tests/dom/tests/mochitest/dom-level0/file_crossdomainprops_inner.html"></iframe>
<pre id="test">
<script class="testbody" type="text/javascript">

View File

@ -359,9 +359,6 @@ sub initializeProfile {
my ($app_path, $do_browser_tests) = @_;
my $pref_content = <<PREFEND;
user_pref("browser.dom.window.dump.enabled", true);
user_pref("capability.principal.codebase.p1.granted", "UniversalXPConnect UniversalBrowserRead UniversalBrowserWrite UniversalPreferencesRead UniversalPreferencesWrite UniversalFileRead");
user_pref("capability.principal.codebase.p1.id", "http://localhost:8888");
user_pref("capability.principal.codebase.p1.subjectName", "");
user_pref("dom.disable_open_during_load", false);
user_pref("dom.max_script_run_time", 0); // no slow script dialogs
user_pref("signed.applets.codebase_principal_support", true);
@ -369,6 +366,49 @@ user_pref("security.warn_submit_insecure", false);
user_pref("browser.shell.checkDefaultBrowser", false);
PREFEND
#
# Since some tests require cross-domain support in Mochitest, across ports,
# domains, subdomains, etc. we have a proxying hack in cross-domain.js which
# maps a bunch of servers onto localhost:8888. We have to grant them the same
# privileges as localhost:8888 here, since the browser only knows them as the
# URLs they're pretending to be. See cross-domain.js for the other copy of
# this list.
#
# KEEP THESE TWO LISTS IN SYNC!
#
my @servers = ("http://localhost:8888",
"http://example.org:80",
"http://test1.example.org:80",
"http://test2.example.org:80",
"http://sub1.test1.example.org:80",
"http://sub1.test2.example.org:80",
"http://sub2.test1.example.org:80",
"http://sub2.test2.example.org:80",
"http://example.org:8000",
"http://test1.example.org:8000",
"http://test2.example.org:8000",
"http://sub1.test1.example.org:8000",
"http://sub1.test2.example.org:8000",
"http://sub2.test1.example.org:8000",
"http://sub2.test2.example.org:8000",
"http://example.com:80",
"http://test1.example.com:80",
"http://test2.example.com:80",
"http://sub1.test1.example.com:80",
"http://sub1.test2.example.com:80",
"http://sub2.test1.example.com:80",
"http://sub2.test2.example.com:80");
my $i = 1;
my $server;
foreach $server (@servers) {
$pref_content .= <<SERVERPREFEND;
user_pref("capability.principal.codebase.p$i.granted", "UniversalXPConnect UniversalBrowserRead UniversalBrowserWrite UniversalPreferencesRead UniversalPreferencesWrite UniversalFileRead");
user_pref("capability.principal.codebase.p$i.id", "$server");
user_pref("capability.principal.codebase.p$i.subjectName", "");
SERVERPREFEND
$i++;
}
my $chrome_content = <<CHROMEEND;
\@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */
toolbar,

View File

@ -42,9 +42,7 @@
// sucks.
const SERVER_PORT = 8888;
const SERVER_PORT_OTHER_DOMAIN = 8889;
var server; // for use in the shutdown handler, if necessary
var otherDomainServer; // for use in the shutdown handler, if necessary
//
// HTML GENERATION
@ -138,16 +136,12 @@ function runServer()
serverBasePath.append("mochitest");
server = new nsHttpServer();
server.registerDirectory("/", serverBasePath);
otherDomainServer = new nsHttpServer();
otherDomainServer.registerDirectory("/", serverBasePath);
if (environment["CLOSE_WHEN_DONE"])
server.registerPathHandler("/server/shutdown", serverShutdown);
server.setIndexHandler(defaultDirHandler);
server.start(SERVER_PORT);
otherDomainServer.setIndexHandler(defaultDirHandler);
otherDomainServer.start(SERVER_PORT_OTHER_DOMAIN);
// touch a file in the profile directory to indicate we're alive
var foStream = Cc["@mozilla.org/network/file-output-stream;1"]
@ -407,10 +401,8 @@ function testListing(metadata, response)
src: "/tests/SimpleTest/TestRunner.js"}),
SCRIPT({type: "text/javascript",
src: "/tests/SimpleTest/MozillaFileLogger.js"}),
/*
SCRIPT({type: "text/javascript",
src: "/tests/SimpleTest/cross-domain.js"}),
*/
SCRIPT({type: "text/javascript",
src: "/tests/SimpleTest/quit.js"}),
SCRIPT({type: "text/javascript",

View File

@ -100,11 +100,9 @@ function goQuitApplication()
return false;
}
/*
// shut down cross-domain mapping (really reverts preference values)
if (crossDomain)
if (typeof crossDomain != "undefined")
crossDomain.disable();
*/
const kAppStartup = '@mozilla.org/toolkit/app-startup;1';
const kAppShell = '@mozilla.org/appshell/appShellService;1';