1 // Up-to-date as of 2013-04-12.
2 var sectionElements
= {
5 text
: {type
: "string", treatNullAsEmptyString
: true},
6 link
: {type
: "string", treatNullAsEmptyString
: true},
7 vLink
: {type
: "string", treatNullAsEmptyString
: true},
8 aLink
: {type
: "string", treatNullAsEmptyString
: true},
9 bgColor
: {type
: "string", treatNullAsEmptyString
: true},
46 mergeElements(sectionElements
);
48 extraTests
.push(function() {
49 ReflectionTests
.reflects({type
: "enum", keywords
: ["ltr", "rtl", "auto"]}, "dir", document
, "dir", document
.documentElement
);
50 // TODO: these behave differently if the body element is a frameset. Also
51 // should probably test with multiple bodies.
52 ReflectionTests
.reflects({type
: "string", treatNullAsEmptyString
: true}, "fgColor", document
, "text", document
.body
);
53 ReflectionTests
.reflects({type
: "string", treatNullAsEmptyString
: true}, "linkColor", document
, "link", document
.body
);
54 ReflectionTests
.reflects({type
: "string", treatNullAsEmptyString
: true}, "vlinkColor", document
, "vlink", document
.body
);
55 ReflectionTests
.reflects({type
: "string", treatNullAsEmptyString
: true}, "alinkColor", document
, "alink", document
.body
);
56 ReflectionTests
.reflects({type
: "string", treatNullAsEmptyString
: true}, "bgColor", document
, "bgcolor", document
.body
);
57 // Don't mess up the colors :)
58 document
.documentElement
.removeAttribute("dir");
59 var attrs
= ["text", "bgcolor", "link", "alink", "vlink"];
60 for (var i
= 0; i
< attrs
.length
; i
++) {
61 document
.body
.removeAttribute(attrs
[i
]);