summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-style-item.js
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-style-item.js')
-rw-r--r--LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-style-item.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-style-item.js b/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-style-item.js
new file mode 100644
index 0000000..ad85fb9
--- /dev/null
+++ b/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-style-item.js
@@ -0,0 +1,15 @@
+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[1]', '');
+shouldBeUndefined('style[-1]')
+
+document.documentElement.removeChild(element);
+
+successfullyParsed = true;