OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <script> | 7 <script> |
8 description('Test ES6 iterator works with DOM objects.'); | 8 description('Test ES6 iterator works with DOM objects.'); |
9 | 9 |
10 shouldBeUndefined('internals.iterator'); | 10 shouldBeUndefined('internals.iterator'); |
(...skipping 10 matching lines...) Expand all Loading... |
21 } | 21 } |
22 | 22 |
23 for (var value of internals.values()) { | 23 for (var value of internals.values()) { |
24 debug('value = ' + value); | 24 debug('value = ' + value); |
25 } | 25 } |
26 | 26 |
27 for (var entry of internals.entries()) { | 27 for (var entry of internals.entries()) { |
28 debug('entry = ' + entry); | 28 debug('entry = ' + entry); |
29 } | 29 } |
30 | 30 |
| 31 shouldThrow('internals.forEach("not a function")'); |
| 32 shouldThrow('internals.forEach(function () { debug("callback called"); throw Err
or("stop!"); })'); |
| 33 internals.forEach(function (value, key, object) { |
| 34 debug(this + ', ' + value + ', ' + key + ', ' + object); |
| 35 }, 'thisArg'); |
| 36 internals.forEach(function (value) { |
| 37 debug(value + ': ' + this); |
| 38 }); |
| 39 internals.forEach(function (value) { |
| 40 debug(value + ': ' + this); |
| 41 }, null); |
| 42 internals.forEach(function (value) { |
| 43 'use strict'; |
| 44 debug(value + ': ' + this); |
| 45 }); |
| 46 internals.forEach(function (value) { |
| 47 'use strict'; |
| 48 debug(value + ': ' + this); |
| 49 }, null); |
| 50 internals.forEach(function (value) { |
| 51 'use strict'; |
| 52 debug(value + ': ' + typeof this); |
| 53 }, 3.14); |
| 54 |
31 </script> | 55 </script> |
32 </body> | 56 </body> |
33 </html> | 57 </html> |
OLD | NEW |