Bug 808608 - Remove special testing for Location in test_bug505915. r=me

Removing test coverage isn't great. But the only reason this test is doing all
this funny stuff with Location is that it thinks that it's always wrapped in
an Xray wrapper and that we always do a dynamic security check, which is no
longer true. Moreover, it checks for very specific error messages, which are
kind of in flux right now as I'm fixing up GWNOJO. The calls are never going
to actually succeed (since location isn't a Node), so it's not really clear
how to fix up this test to do something uniquely useful in a readable way.
I've added enough Location test coverage recently that I'm comfortable removing
this part.
This commit is contained in:
Bobby Holley 2012-11-21 13:20:05 -08:00
Родитель 11d6106099
Коммит 234ba415b6
1 изменённых файлов: 0 добавлений и 42 удалений

Просмотреть файл

@ -38,48 +38,6 @@ function go() {
"threw a security exception instead of an invalid child exception"); "threw a security exception instead of an invalid child exception");
} }
// Location is always wrapped, so test it separately.
ifr.onload = null;
var path = "/tests/js/xpconnect/tests/mochitest/file_bug505915.html";
ifr.contentWindow.location = "http://mochi.test:8888/" + path;
yield;
try {
document.documentElement.appendChild(ifr.contentWindow.location);
ok(false, "weird behavior");
} catch (e) {
ok(!/NS_ERROR_XPC_SECURITY_MANAGER_VETO/.test(e),
"didn't throw a security exception");
}
oldLocation = ifr.contentWindow.location;
ifr.contentWindow.location = "http://example.org/" + path;
yield;
try {
document.documentElement.appendChild(oldLocation);
ok(false, "weird behavior");
} catch (e) {
ok(/NS_ERROR_XPC_SECURITY_MANAGER_VETO/.test(e),
"threw a security exception instead of an invalid child exception");
}
try {
document.documentElement.appendChild(ifr.contentWindow.location);
ok(false, "weird behavior");
} catch (e) {
ok(/NS_ERROR_XPC_SECURITY_MANAGER_VETO/.test(e),
"threw a security exception instead of an invalid child exception");
}
oldLocation = ifr.contentWindow.location;
ifr.contentWindow.location = "http://mochi.test:8888/" + path;
yield;
try {
document.documentElement.appendChild(oldLocation);
ok(false, "weird behavior");
} catch (e) {
ok(!/NS_ERROR_XPC_SECURITY_MANAGER_VETO/.test(e),
"didn't throw a security exception");
}
SimpleTest.finish(); SimpleTest.finish();
yield; yield;
} }