зеркало из https://github.com/mozilla/gecko-dev.git
Bug 982680. Fix regress-406572.js to actually test something useful. r=peterv,waldo
This commit is contained in:
Родитель
0eef5b6131
Коммит
5aa57cc218
|
@ -14,19 +14,26 @@ printStatus (summary);
|
|||
|
||||
if (typeof window != 'undefined')
|
||||
{
|
||||
var s = self;
|
||||
try {
|
||||
actual = "FAIL: Unexpected exception thrown";
|
||||
|
||||
document.writeln(uneval(self));
|
||||
self = 1;
|
||||
document.writeln(uneval(self));
|
||||
var win = window;
|
||||
var windowString = String(window);
|
||||
window = 1;
|
||||
reportCompare(windowString, String(window), "window should be readonly");
|
||||
|
||||
if (1)
|
||||
function self() { return 1; }
|
||||
actual = ""; // We should reach this line, and throw an exception after it
|
||||
|
||||
document.writeln(uneval(self));
|
||||
if (1)
|
||||
function window() { return 1; }
|
||||
|
||||
// The test harness might rely on self having its original value: restore it.
|
||||
self = s;
|
||||
actual = "FAIL: this line should never be reached";
|
||||
|
||||
// The test harness might rely on window having its original value:
|
||||
// restore it.
|
||||
window = win;
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче