Bug 422872, fix test in test_contentAreaUtils.js for both suite and toolkit. r=sayrer

git-svn-id: svn://10.0.0.236/trunk@247799 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
Callek%gmail.com
2008-03-14 05:46:45 +00:00
parent 1fdee21f9c
commit 2e013ffb3e
2 changed files with 14 additions and 4 deletions

View File

@@ -71,14 +71,19 @@ function test_urlSecurityCheck() {
do_throw("urlSecurityCheck failed to handle the http URI as a string (uri spec)");
}
let shouldThrow = true;
try {
urlSecurityCheck(CHROME_URI, nullPrincipal,
DISALLOW_INHERIT_PRINCIPAL);
do_throw("urlSecurityCheck should throw when linking to a chrome uri with a null principal");
}
catch(ex) { }
catch(ex) {
shouldThrow = false;
}
if (shouldThrow)
do_throw("urlSecurityCheck should throw when linking to a chrome uri with a null principal");
}
function run_test()
{
loadUtilsScript();

View File

@@ -71,14 +71,19 @@ function test_urlSecurityCheck() {
do_throw("urlSecurityCheck failed to handle the http URI as a string (uri spec)");
}
let shouldThrow = true;
try {
urlSecurityCheck(CHROME_URI, nullPrincipal,
DISALLOW_INHERIT_PRINCIPAL);
do_throw("urlSecurityCheck should throw when linking to a chrome uri with a null principal");
}
catch(ex) { }
catch(ex) {
shouldThrow = false;
}
if (shouldThrow)
do_throw("urlSecurityCheck should throw when linking to a chrome uri with a null principal");
}
function run_test()
{
loadUtilsScript();