summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/dom/CSSStyleDeclaration/script-tests/css-properties-case-sensitive.js
blob: 15949a27d1966f382c9db64bbf29c7301efb0dd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
description(
'This test checks that access to CSS properties via JavaScript properties on DOM elements is case sensitive.'
);

var element = document.createElement('a');
element.style.zIndex = 1;

debug('normal cases');
debug('');

shouldBe("element.style.zIndex", "'1'");
shouldBeUndefined("element.style.ZIndex");

debug('');
debug('"css" prefix');
debug('');

shouldBe("element.style.cssZIndex", "'1'");
shouldBe("element.style.CssZIndex", "'1'");
shouldBeUndefined("element.style.CsszIndex");
shouldBeUndefined("element.style.csszIndex");

debug('');
debug('"pixel" prefix');
debug('');

shouldBe("element.style.pixelZIndex", "1");
shouldBe("element.style.PixelZIndex", "1");
shouldBeUndefined("element.style.pixelzIndex");
shouldBeUndefined("element.style.PixelzIndex");

debug('');
debug('"pos" prefix');
debug('');

shouldBe("element.style.posZIndex", "1");
shouldBe("element.style.PosZIndex", "1");
shouldBeUndefined("element.style.poszIndex");
shouldBeUndefined("element.style.PoszIndex");

var successfullyParsed = true;