arv@chromium.org | dcecd91 | 2009-11-24 00:30:37 +0000 | [diff] [blame] | 1 | <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 | <html> |
| 3 | <head> |
mark.lam@apple.com | b130a34 | 2013-09-07 22:48:36 +0000 | [diff] [blame] | 4 | <script src="../../../resources/js-test-pre.js"></script> |
arv@chromium.org | dcecd91 | 2009-11-24 00:30:37 +0000 | [diff] [blame] | 5 | </head> |
| 6 | <body> |
ap@apple.com | 92352d0 | 2017-05-24 22:53:00 +0000 | [diff] [blame] | 7 | <script> |
| 8 | description("This tests indexing outside the range of the style object."); |
| 9 | |
| 10 | var element = document.createElement('div'); |
| 11 | element.style.color = 'red'; |
| 12 | document.documentElement.appendChild(element); |
| 13 | var style = element.style; |
| 14 | |
| 15 | shouldEvaluateTo('style.length', 1); |
| 16 | shouldBeEqualToString('style[0]', 'color'); |
| 17 | shouldBeEqualToString('style.item(1)', ''); |
| 18 | shouldBeUndefined('style[1]'); |
| 19 | shouldBeUndefined('style[-1]') |
| 20 | |
| 21 | document.documentElement.removeChild(element); |
| 22 | </script> |
mark.lam@apple.com | b130a34 | 2013-09-07 22:48:36 +0000 | [diff] [blame] | 23 | <script src="../../../resources/js-test-post.js"></script> |
arv@chromium.org | dcecd91 | 2009-11-24 00:30:37 +0000 | [diff] [blame] | 24 | </body> |
| 25 | </html> |