blob: d4113d8778fe2b52c9754929999fb477c2b931e9 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("This tests indexing outside the range of the style object.");
var element = document.createElement('div');
element.style.color = 'red';
document.documentElement.appendChild(element);
var style = element.style;
shouldEvaluateTo('style.length', 1);
shouldBeEqualToString('style[0]', 'color');
shouldBeEqualToString('style.item(1)', '');
shouldBeUndefined('style[1]');
shouldBeUndefined('style[-1]')
document.documentElement.removeChild(element);
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>