Skip to content

Commit

Permalink
Merge pull request servo#1208 from Ms2ger/elements
Browse files Browse the repository at this point in the history
Move the data from interfaces.js into a separate JS file.
  • Loading branch information
sideshowbarker committed Aug 22, 2014
2 parents 27769f9 + d0da426 commit 4154396
Show file tree
Hide file tree
Showing 3 changed files with 144 additions and 284 deletions.
147 changes: 4 additions & 143 deletions html/editing/dnd/the-draggable-attribute/draggable_attribute.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,156 +4,17 @@
<meta charset='utf-8'>
<title>HTML Test: draggable_attribute</title>
<link rel='author' title='Intel' href='http://www.intel.com'>
<link rel='help' href='http://www.w3.org/html/wg/drafts/html/CR/editing.html#the-draggable-attribute'>
<link rel='help' href='http://www.whatwg.org/html/#the-draggable-attribute'>
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
<script src='/html/semantics/interfaces.js'></script>
</head>

<body>
<div id='log'> </div>

<script>
//The "data_all" below has been stolen from @Ms2ger's html/semantics/interfaces.html, thanks!
var data_all = [
["abbr", ""],
["acronym", ""],
["address", ""],
["applet", "Applet"],
["audio", "Audio"],
["b", ""],
["base", "Base"],
["basefont", "BaseFont"],
["bdo", ""],
["bgsound", "Unknown"],
["big", ""],
["blink", "Unknown"],
["blockquote", "Quote"],
["body", "Body"],
["br", "BR"],
["button", "Button"],
["canvas", "Canvas"],
["caption", "TableCaption"],
["center", ""],
["cite", ""],
["code", ""],
["col", "TableCol"],
["colgroup", "TableCol"],
["dd", ""],
["del", "Mod"],
["dfn", ""],
["dir", "Directory"],
["div", "Div"],
["dl", "DList"],
["dt", ""],
["em", ""],
["embed", "Embed"],
["fieldset", "FieldSet"],
["font", "Font"],
["form", "Form"],
["frame", "Frame"],
["frameset", "FrameSet"],
["h1", "Heading"],
["h2", "Heading"],
["h3", "Heading"],
["h4", "Heading"],
["h5", "Heading"],
["h6", "Heading"],
["head", "Head"],
["hr", "HR"],
["html", "Html"],
["i", ""],
["iframe", "IFrame"],
["image", "Unknown"],
["img", "Image"],
["input", "Input"],
["ins", "Mod"],
["isindex", "Unknown"],
["kbd", ""],
["keygen", "Keygen"],
["label", "Label"],
["legend", "Legend"],
["li", "LI"],
["link", "Link"],
["listing", ""],
["map", "Map"],
["marquee", "Marquee"],
["menu", "Menu"],
["meta", "Meta"],
["multicol", "Unknown"],
["nobr", ""],
["noembed", ""],
["noframes", ""],
["noscript", ""],
["object", "Object"],
["ol", "OList"],
["optgroup", "OptGroup"],
["option", "Option"],
["p", "Paragraph"],
["param", "Param"],
["plaintext", ""],
["pre", "Pre"],
["q", "Quote"],
["s", ""],
["samp", ""],
["script", "Script"],
["select", "Select"],
["small", ""],
["source", "Source"],
["spacer", "Unknown"],
["span", "Span"],
["strike", ""],
["strong", ""],
["style", "Style"],
["sub", ""],
["sup", ""],
["table", "Table"],
["tbody", "TableSection"],
["td", "TableDataCell"],
["textarea", "TextArea"],
["tfoot", "TableSection"],
["th", "TableHeaderCell"],
["thead", "TableSection"],
["title", "Title"],
["tr", "TableRow"],
["tt", ""],
["u", ""],
["ul", "UList"],
["var", ""],
["video", "Video"],
["wbr", ""],
["xmp", ""],
["section", ""],
["nav", ""],
["article", ""],
["aside", ""],
["hgroup", ""],
["header", ""],
["footer", ""],
["time", "Unknown"],
["mark", ""],
["progress", "Progress"],
["meter", "Meter"],
["ruby", ""],
["rt", ""],
["rp", ""],
["figure", ""],
["datalist", "DataList"],
["output", "Output"],
["details", "Details"],
["command", "Command"],
["nextid", "Unknown"],
["rb", "Unknown"],
["bdi", ""],
["data", "Data"],
["a", "Anchor"],
["area", "Area"],
["dialog", "Dialog"],
["figcaption", ""],
["summary", ""],
["track", "Track"]
];

data_all.forEach(function(a) {
elements.forEach(function(a) {
test(function() {
var eElement = document.createElement(a[0]);
assert_inherits(eElement, 'draggable', 'Element ' + a[0] +' should have draggable property');
Expand All @@ -176,7 +37,7 @@
}
}

data_all.forEach(function(a) {
elements.forEach(function(a) {

test(function() {
//Default values for elements
Expand Down
143 changes: 2 additions & 141 deletions html/semantics/interfaces.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,150 +6,11 @@
<link rel="help" href="http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf#page=96">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
var data = [
["abbr", ""],
["acronym", ""],
["address", ""],
["applet", "Applet"],
["audio", "Audio"],
["b", ""],
["base", "Base"],
["basefont", "Unknown"],
["bdo", ""],
["bgsound", "Unknown"],
["big", ""],
["blink", "Unknown"],
["blockquote", "Quote"],
["body", "Body"],
["br", "BR"],
["button", "Button"],
["canvas", "Canvas"],
["caption", "TableCaption"],
["center", ""],
["cite", ""],
["code", ""],
["col", "TableCol"],
["colgroup", "TableCol"],
["dd", ""],
["del", "Mod"],
["dfn", ""],
["dir", "Directory"],
["div", "Div"],
["dl", "DList"],
["dt", ""],
["em", ""],
["embed", "Embed"],
["fieldset", "FieldSet"],
["font", "Font"],
["form", "Form"],
["frame", "Frame"],
["frameset", "FrameSet"],
["h1", "Heading"],
["h2", "Heading"],
["h3", "Heading"],
["h4", "Heading"],
["h5", "Heading"],
["h6", "Heading"],
["head", "Head"],
["hr", "HR"],
["html", "Html"],
["i", ""],
["iframe", "IFrame"],
["image", "Unknown"],
["img", "Image"],
["input", "Input"],
["ins", "Mod"],
["isindex", "Unknown"],
["kbd", ""],
["keygen", "Keygen"],
["label", "Label"],
["legend", "Legend"],
["li", "LI"],
["link", "Link"],
["listing", ""],
["map", "Map"],
["marquee", "Marquee"],
["menu", "Menu"],
["meta", "Meta"],
["multicol", "Unknown"],
["nobr", ""],
["noembed", ""],
["noframes", ""],
["noscript", ""],
["object", "Object"],
["ol", "OList"],
["optgroup", "OptGroup"],
["option", "Option"],
["p", "Paragraph"],
["param", "Param"],
["plaintext", ""],
["pre", "Pre"],
["q", "Quote"],
["s", ""],
["samp", ""],
["script", "Script"],
["select", "Select"],
["small", ""],
["source", "Source"],
["spacer", "Unknown"],
["span", "Span"],
["strike", ""],
["strong", ""],
["style", "Style"],
["sub", ""],
["sup", ""],
["table", "Table"],
["tbody", "TableSection"],
["td", "TableDataCell"],
["textarea", "TextArea"],
["tfoot", "TableSection"],
["th", "TableHeaderCell"],
["thead", "TableSection"],
["title", "Title"],
["tr", "TableRow"],
["tt", ""],
["u", ""],
["ul", "UList"],
["var", ""],
["video", "Video"],
["wbr", ""],
["xmp", ""],
["section", ""],
["nav", ""],
["article", ""],
["aside", ""],
["hgroup", ""],
["header", ""],
["footer", ""],
["time", "Time"],
["mark", ""],
["progress", "Progress"],
["meter", "Meter"],
["ruby", ""],
["rt", ""],
["rp", ""],
["figure", ""],
["datalist", "DataList"],
["output", "Output"],
["details", "Details"],
["command", "Command"],
["nextid", "Unknown"],
["rb", "Unknown"],
["bdi", ""],
["data", "Data"],
["a", "Anchor"],
["area", "Area"],
["dialog", "Dialog"],
["figcaption", ""],
["summary", ""],
["track", "Track"]
];
</script>
<script src=interfaces.js></script>
<div id="log"></div>
<script>
test(function() {
data.forEach(function(a) {
elements.forEach(function(a) {
test(function() {
var e = document.createElement(a[0]), i = "HTML" + a[1] + "Element";
assert_class_string(e, i,
Expand Down
Loading

0 comments on commit 4154396

Please sign in to comment.