Bug 823228 part 1. Make browser-test.js ignore indexed properties on the window when determining whether a test leaked properties onto the global. r=dao

This commit is contained in:
Boris Zbarsky 2013-01-17 12:30:36 -05:00
parent 46e506ad80
commit 958259eb05

View File

@ -254,6 +254,13 @@ Tester.prototype = {
}
Object.keys(window).forEach(function (prop) {
if (parseInt(prop) == prop) {
// This is a string which when parsed as an integer and then
// stringified gives the original string. As in, this is in fact a
// string representation of an integer, so an index into
// window.frames. Skip those.
return;
}
if (this._globalProperties.indexOf(prop) == -1) {
this._globalProperties.push(prop);
if (this._globalPropertyWhitelist.indexOf(prop) == -1)