blob: d4113d8778fe2b52c9754929999fb477c2b931e9 [file] [log] [blame]
arv@chromium.orgdcecd912009-11-24 00:30:37 +00001<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2<html>
3<head>
mark.lam@apple.comb130a342013-09-07 22:48:36 +00004<script src="../../../resources/js-test-pre.js"></script>
arv@chromium.orgdcecd912009-11-24 00:30:37 +00005</head>
6<body>
ap@apple.com92352d02017-05-24 22:53:00 +00007<script>
8description("This tests indexing outside the range of the style object.");
9
10var element = document.createElement('div');
11element.style.color = 'red';
12document.documentElement.appendChild(element);
13var style = element.style;
14
15shouldEvaluateTo('style.length', 1);
16shouldBeEqualToString('style[0]', 'color');
17shouldBeEqualToString('style.item(1)', '');
18shouldBeUndefined('style[1]');
19shouldBeUndefined('style[-1]')
20
21document.documentElement.removeChild(element);
22</script>
mark.lam@apple.comb130a342013-09-07 22:48:36 +000023<script src="../../../resources/js-test-post.js"></script>
arv@chromium.orgdcecd912009-11-24 00:30:37 +000024</body>
25</html>