summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvrubezhny2014-05-29 13:31:22 (EDT)
committerNick Sandonato2014-05-29 13:49:44 (EDT)
commit5ec33ca8336ce8de51926b97e919ef47acb1cdfc (patch)
treea3a94fec580c494d614e5aa6a986bdf7ccc79f0c
parent3046c97e1531aac2d219f1cc55e134a24c9ded89 (diff)
downloadwebtools.sourceediting.tests-5ec33ca8336ce8de51926b97e919ef47acb1cdfc.zip
webtools.sourceediting.tests-5ec33ca8336ce8de51926b97e919ef47acb1cdfc.tar.gz
webtools.sourceediting.tests-5ec33ca8336ce8de51926b97e919ef47acb1cdfc.tar.bz2
Bug 427969 - Undefined attribute name for HTML 5v201405291916R3_6_0
JUnit Test Cases are added in order to verify the new HTML 5 attributes and values Signed-off-by: vrubezhny <vrubezhny@exadel.com>
-rw-r--r--tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/html5/model/HTML5ContentModelTest.java23
1 files changed, 21 insertions, 2 deletions
diff --git a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/html5/model/HTML5ContentModelTest.java b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/html5/model/HTML5ContentModelTest.java
index d9f437e..9de7792 100644
--- a/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/html5/model/HTML5ContentModelTest.java
+++ b/tests/org.eclipse.wst.html.core.tests/src/org/eclipse/wst/html/core/tests/html5/model/HTML5ContentModelTest.java
@@ -238,12 +238,31 @@ public class HTML5ContentModelTest extends TestCase {
HTML50Namespace.ATTR_VALUE_COLOR, HTML50Namespace.ATTR_VALUE_DATE, HTML50Namespace.ATTR_VALUE_DATETIME, HTML50Namespace.ATTR_VALUE_DATETIME_LOCAL, HTML50Namespace.ATTR_VALUE_EMAIL, HTML50Namespace.ATTR_VALUE_MONTH, HTML50Namespace.ATTR_VALUE_NUMBER_STRING, HTML50Namespace.ATTR_VALUE_RANGE, HTML50Namespace.ATTR_VALUE_SEARCH, HTML50Namespace.ATTR_VALUE_TEL, HTML50Namespace.ATTR_VALUE_TIME,HTML50Namespace.ATTR_VALUE_WEEK,HTML50Namespace.ATTR_VALUE_URL});
}
+ /*
+ * Test Case for Bug #427969 - Names of HTML 5 BODY element events
+ */
+ public void testAttributesOnHTML5Body() {
+ checkAttrNames(CMDocType.HTML5_DOC_TYPE, HTML40Namespace.ElementName.BODY,
+ getMergedlist(getMergedlist(getGlobalList(), HTML5AttributeCollection.getBodyEventList()),
+ new String[] {HTML40Namespace.ATTR_NAME_BGCOLOR, HTML40Namespace.ATTR_NAME_TEXT, HTML40Namespace.ATTR_NAME_LINK,
+ HTML40Namespace.ATTR_NAME_ONLOAD, HTML40Namespace.ATTR_NAME_ONUNLOAD, HTML40Namespace.ATTR_NAME_BACKGROUND,
+ HTML40Namespace.ATTR_NAME_MARGINWIDTH, HTML40Namespace.ATTR_NAME_MARGINHEIGHT, HTML40Namespace.ATTR_NAME_TOPMARGIN,
+ HTML40Namespace.ATTR_NAME_BOTTOMMARGIN, HTML40Namespace.ATTR_NAME_LEFTMARGIN, HTML40Namespace.ATTR_NAME_RIGHTMARGIN}));
+ }
+
+ /*
+ * Test Case for Bug #427969 - Values of 'translate' attribute.
+ * The attribute is common for all HTML 5 elements, we'll use 'body' element for test.
+ */
+ public void testAttributesOnHTML5BodyTranslate() {
+ checkAttrValues(CMDocType.HTML5_DOC_TYPE, HTML40Namespace.ElementName.BODY, HTML50Namespace.ATTR_NAME_TRANSLATE,
+ new String[]{"", HTML40Namespace.ATTR_VALUE_YES, HTML40Namespace.ATTR_VALUE_NO});
+ }
+
public void testHTML5document() {
checkDocument(CMDocType.HTML5_DOC_TYPE);
}
-
-
private void verifyAttributeDeclaration(CMElementDeclaration elemDecl, CMNode attr) {
assertTrue(attr.getNodeType() == CMNode.ATTRIBUTE_DECLARATION);
assertNotNull("no name on an attribute declaration", attr.getNodeName());