зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
975927f557
Коммит
e2e02c0bfa
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче