зеркало из https://github.com/mozilla/gecko-dev.git
JavaScript Test Library - apply with null this parameter passes the global object as this, bug 306591
This commit is contained in:
Родитель
1f1d7e8dfa
Коммит
75f2a4882b
|
@ -59,7 +59,8 @@ actual = String.toUpperCase(new Boolean(true));
|
|||
reportCompare(expect, actual, summary +
|
||||
" String.toUpperCase(new Boolean(true))");
|
||||
|
||||
expect = 2;
|
||||
// null means the global object is passed
|
||||
expect = (typeof window == 'undefined') ? 9 : -1;
|
||||
actual = String.indexOf(null, 'l');
|
||||
reportCompare(expect, actual, summary +
|
||||
" String.indexOf(null, 'l')");
|
||||
|
@ -84,7 +85,8 @@ actual = String.toUpperCase(true);
|
|||
reportCompare(expect, actual, summary +
|
||||
" String.toUpperCase(true)");
|
||||
|
||||
expect = 2;
|
||||
// null means the global object is passed
|
||||
expect = (typeof window == 'undefined') ? -1 : 11;
|
||||
actual = String.indexOf(undefined, 'd');
|
||||
reportCompare(expect, actual, summary +
|
||||
" String.indexOf(undefined, 'd')");
|
||||
|
|
Загрузка…
Ссылка в новой задаче