зеркало из https://github.com/mozilla/pjs.git
Bug 422872, fix test in test_contentAreaUtils.js for both suite and toolkit. r=sayrer
This commit is contained in:
Родитель
2fb0fa5639
Коммит
27d622429e
|
@ -71,14 +71,19 @@ function test_urlSecurityCheck() {
|
||||||
do_throw("urlSecurityCheck failed to handle the http URI as a string (uri spec)");
|
do_throw("urlSecurityCheck failed to handle the http URI as a string (uri spec)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let shouldThrow = true;
|
||||||
try {
|
try {
|
||||||
urlSecurityCheck(CHROME_URI, nullPrincipal,
|
urlSecurityCheck(CHROME_URI, nullPrincipal,
|
||||||
DISALLOW_INHERIT_PRINCIPAL);
|
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()
|
function run_test()
|
||||||
{
|
{
|
||||||
loadUtilsScript();
|
loadUtilsScript();
|
||||||
|
|
|
@ -71,14 +71,19 @@ function test_urlSecurityCheck() {
|
||||||
do_throw("urlSecurityCheck failed to handle the http URI as a string (uri spec)");
|
do_throw("urlSecurityCheck failed to handle the http URI as a string (uri spec)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let shouldThrow = true;
|
||||||
try {
|
try {
|
||||||
urlSecurityCheck(CHROME_URI, nullPrincipal,
|
urlSecurityCheck(CHROME_URI, nullPrincipal,
|
||||||
DISALLOW_INHERIT_PRINCIPAL);
|
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()
|
function run_test()
|
||||||
{
|
{
|
||||||
loadUtilsScript();
|
loadUtilsScript();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче