/** Test for Bug 862380 **/
SimpleTest.waitForExplicitFinish();
function go() {
checkNotEnumerable($('ifr').contentWindow, true);
checkNotEnumerable($('ifr').contentWindow.location, false);
SimpleTest.finish();
}
function checkNotEnumerable(obj, isWindow) {
try {
const expectedWindow = ["0"];
const expectedLocation = [];
const expected = isWindow ? expectedWindow : expectedLocation;
is(Object.keys(obj).length, expected.length, "Object.keys gives right array length"); var actual = [];
for (vari in obj)
actual.push(i);
is(actual.length, expected.length, "Enumeration sees the right number of props");
actual.sort();
expected.sort();
for (vari = 0; i < actual.length; ++i)
is(actual[i], expected[i], "Arrays should be the same " + i);
} catch (e) {
ok(false, "threw: " + e);
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.