summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-computed-style-item.js
blob: 8522f65149512476afb454a31d01b1c6273f174d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
description("This tests indexing outside the range of the computed style object.");

var element = document.createElement('div');
element.style.color = 'rgb(120, 120, 120)';
document.documentElement.appendChild(element);
var computedStyle = window.getComputedStyle(element, null);

shouldBeEqualToString('typeof computedStyle.length', 'number');
shouldBeEqualToString('computedStyle[computedStyle.length]', '');
shouldBeUndefined('computedStyle[-1]')

document.documentElement.removeChild(element);

successfullyParsed = true;