Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / imported / web-platform-tests / html / dom / elements-sections.js
bloba22aed9f696580aa30837238c0fdaf4559649ca5
1 // Up-to-date as of 2013-04-12.
2 var sectionElements = {
3 body: {
4 // Obsolete
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},
10 background: "string",
12 article: {},
13 section: {},
14 nav: {},
15 aside: {},
16 h1: {
17 // Obsolete
18 align: "string",
20 h2: {
21 // Obsolete
22 align: "string",
24 h3: {
25 // Obsolete
26 align: "string",
28 h4: {
29 // Obsolete
30 align: "string",
32 h5: {
33 // Obsolete
34 align: "string",
36 h6: {
37 // Obsolete
38 align: "string",
40 hgroup: {},
41 header: {},
42 footer: {},
43 address: {},
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]);
63 });