diff options
Diffstat (limited to 'LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-computed-style-item.js')
-rw-r--r-- | LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-computed-style-item.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-computed-style-item.js b/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-computed-style-item.js new file mode 100644 index 0000000..8522f65 --- /dev/null +++ b/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-computed-style-item.js @@ -0,0 +1,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; |