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
Родитель 975927f557
Коммит e2e02c0bfa
1 изменённых файлов: 7 добавлений и 0 удалений

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

@ -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)