You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by al...@apache.org on 2011/08/27 17:56:36 UTC

svn commit: r1162382 - in /myfaces/html5/trunk: ./ myfaces-html5-core/ myfaces-html5-core/src/main/java/org/apache/myfaces/html5/renderkit/util/ myfaces-html5-core/src/test/java/org/ myfaces-html5-core/src/test/java/org/apache/ myfaces-html5-core/src/t...

Author: aliok
Date: Sat Aug 27 15:56:35 2011
New Revision: 1162382

URL: http://svn.apache.org/viewvc?rev=1162382&view=rev
Log:
MFHTML5-6

Added:
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5.test/
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5.test/AbstractHtml5ViewControllerTestCase.java
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5.test/HtmlCheckAttributesUtil.java
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5.test/HtmlRenderedAttr.java
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5.test/TestUtils.java
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputColorRendererTest.java
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputDateTimeRendererTest.java
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputEmailRendererTest.java
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputNumberSliderRendererTest.java
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputNumberSpinnerRendererTest.java
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputTextRendererTest.java
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/media/
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/media/AudioRendererTest.java
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/media/VideoRendererTest.java
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/output/
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/output/MeterRendererTest.java
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/output/ProgressRendererTest.java
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/output/SlideRendererTest.java
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/output/SlideViewRendererTest.java
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/panel/
    myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/panel/DivRendererTest.java
Modified:
    myfaces/html5/trunk/myfaces-html5-core/pom.xml
    myfaces/html5/trunk/myfaces-html5-core/src/main/java/org/apache/myfaces/html5/renderkit/util/PassThroughAttributes.java
    myfaces/html5/trunk/myfaces-html5-demo/pom.xml
    myfaces/html5/trunk/pom.xml
    myfaces/html5/trunk/src/site/site.xml

Modified: myfaces/html5/trunk/myfaces-html5-core/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/html5/trunk/myfaces-html5-core/pom.xml?rev=1162382&r1=1162381&r2=1162382&view=diff
==============================================================================
--- myfaces/html5/trunk/myfaces-html5-core/pom.xml (original)
+++ myfaces/html5/trunk/myfaces-html5-core/pom.xml Sat Aug 27 15:56:35 2011
@@ -16,7 +16,7 @@
  * limitations under the License.
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
     <modelVersion>4.0.0</modelVersion>
 
@@ -82,6 +82,22 @@
             <type>jar</type>
             <scope>compile</scope>
         </dependency>
+
+        <!-- test dependencies -->
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.8.1</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.myfaces.test</groupId>
+            <artifactId>myfaces-test20</artifactId>
+            <version>1.0.0</version>
+            <scope>test</scope>
+        </dependency>
+
     </dependencies>
 
     <build>
@@ -242,7 +258,7 @@
                             <goal>make-config</goal>
                         </goals>
                     </execution>
-                    
+
                     <!-- generate <hx> JSP tld file -->
                     <execution>
                         <id>make-html5-hx-tld-forsite</id>
@@ -289,11 +305,11 @@
                             <goal>make-config</goal>
                         </goals>
                     </execution>
-                    
+
                 </executions>
             </plugin>
         </plugins>
-    </build>   
+    </build>
 
     <profiles>
         <profile>
@@ -309,7 +325,7 @@
                         -Running the install and site with generate-site profile fails since these executions is run already on install phase!
                         -So, for facelets documentation, only need to run site goal!
                     -->
-                    
+
                     <plugin>
                         <groupId>org.apache.myfaces.buildtools</groupId>
                         <artifactId>myfaces-builder-plugin</artifactId>
@@ -341,7 +357,7 @@
                             </execution>
                         </executions>
                     </plugin>
-                    
+
                 </plugins>
             </build>
 
@@ -352,15 +368,15 @@
                         <groupId>net.sourceforge.maven-taglib</groupId>
                         <artifactId>maven-taglib-plugin</artifactId>
                         <version>2.4</version>
-                            <configuration>
+                        <configuration>
                             <!-- 
                                 <taglib.src.dir>${basedir}/target/classes/META-INF</taglib.src.dir> -->
-                                <srcDir>${basedir}/target/tlddoc-facelets</srcDir>
-                                <!-- 
-                                <tldDocDir>${basedir}/target/site/tlddoc-facelets</tldDocDir>
-                                 -->
-                                <tldDocDir>${basedir}/target/site/tlddoc</tldDocDir>
-                            </configuration>
+                            <srcDir>${basedir}/target/tlddoc-facelets</srcDir>
+                            <!--
+                           <tldDocDir>${basedir}/target/site/tlddoc-facelets</tldDocDir>
+                            -->
+                            <tldDocDir>${basedir}/target/site/tlddoc</tldDocDir>
+                        </configuration>
                     </plugin>
 
                     <!-- trigger tagdoc-index report -->

Modified: myfaces/html5/trunk/myfaces-html5-core/src/main/java/org/apache/myfaces/html5/renderkit/util/PassThroughAttributes.java
URL: http://svn.apache.org/viewvc/myfaces/html5/trunk/myfaces-html5-core/src/main/java/org/apache/myfaces/html5/renderkit/util/PassThroughAttributes.java?rev=1162382&r1=1162381&r2=1162382&view=diff
==============================================================================
--- myfaces/html5/trunk/myfaces-html5-core/src/main/java/org/apache/myfaces/html5/renderkit/util/PassThroughAttributes.java (original)
+++ myfaces/html5/trunk/myfaces-html5-core/src/main/java/org/apache/myfaces/html5/renderkit/util/PassThroughAttributes.java Sat Aug 27 15:56:35 2011
@@ -32,6 +32,7 @@ import java.util.Map;
 public interface PassThroughAttributes
 {
     Map<String, String> AUDIO = map(13)
+        .attrs(PassThroughAttributeGroups.HTML_GLOBAL_PROPS)
         .attrs(PassThroughAttributeGroups.HTML5_GLOBAL_PROPS)
         //media props
         .attr(PRELOAD_PROP)
@@ -102,14 +103,12 @@ public interface PassThroughAttributes
         .attrs(PassThroughAttributeGroups.HTML5_GLOBAL_PROPS)
         .attrs(PassThroughAttributeGroups.HTML5_INPUT_PROPS)
         .attr(REQUIRED_PROP)
-        .attr(READONLY_PROP)
         .unmodifiable();
 
     Map<String, String> INPUT_DATE_TIME = map(6)
         .attrs(PassThroughAttributeGroups.HTML5_GLOBAL_PROPS)
         .attrs(PassThroughAttributeGroups.HTML5_INPUT_PROPS)
         .attr(REQUIRED_PROP)
-        .attr(READONLY_PROP)
         .unmodifiable();
 
     Map<String, String> PROGRESS = map(11)

Added: myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5.test/AbstractHtml5ViewControllerTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5.test/AbstractHtml5ViewControllerTestCase.java?rev=1162382&view=auto
==============================================================================
--- myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5.test/AbstractHtml5ViewControllerTestCase.java (added)
+++ myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5.test/AbstractHtml5ViewControllerTestCase.java Sat Aug 27 15:56:35 2011
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.html5.test;
+
+import org.apache.myfaces.test.mock.MockResponseWriter;
+
+import java.io.StringWriter;
+
+public abstract class AbstractHtml5ViewControllerTestCase extends org.apache.myfaces.test.base.AbstractViewControllerTestCase
+{
+    protected MockResponseWriter writer;
+
+    public AbstractHtml5ViewControllerTestCase(String name)
+    {
+        super(name);
+    }
+
+    @Override
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+
+        writer = new MockResponseWriter(new StringWriter(), null, null);
+        facesContext.setResponseWriter(writer);
+
+        TestUtils.addDefaultRenderers(facesContext);
+    }
+
+    @Override
+    protected void tearDown() throws Exception
+    {
+        writer = null;
+        super.tearDown();
+    }
+
+}

Added: myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5.test/HtmlCheckAttributesUtil.java
URL: http://svn.apache.org/viewvc/myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5.test/HtmlCheckAttributesUtil.java?rev=1162382&view=auto
==============================================================================
--- myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5.test/HtmlCheckAttributesUtil.java (added)
+++ myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5.test/HtmlCheckAttributesUtil.java Sat Aug 27 15:56:35 2011
@@ -0,0 +1,149 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.html5.test;
+
+import java.util.Map;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+import org.apache.myfaces.test.mock.MockResponseWriter;
+
+public class HtmlCheckAttributesUtil
+{
+    private static void addBaseAttributes(UIComponent component, HtmlRenderedAttr[] attrs)
+    {
+        Map map = component.getAttributes();
+        for(int i = 0; i < attrs.length; i++) 
+        {
+            HtmlRenderedAttr attr = attrs[i];
+            map.put(attr.getName(), attr.getValue());
+        }
+    }
+    
+    private static void checkRenderedAttributes(HtmlRenderedAttr[] attrs, String output) throws Exception
+    {
+        for(int i = 0; i < attrs.length; i++) 
+        {
+            //assertContainsOnlyOnce(attrs[i], output);
+            checkAttributeOccurrences(attrs[i], output);
+        }
+    }
+    
+    /**
+     * This method adds all attributes from attrs into the component.  After adding the attributes,
+     * it calls the encodeAll() method of the component.  The html generated from the component's
+     * renderer will be checked to see if the attributes have been rendered correctly.
+     * @param component  The component whose attributes will be tested.
+     * @param context    
+     * @param writer     The ResponseWriter used by the renderer to output the html generated.
+     * @param attrs      An array of attributes which will be tested.
+     * @throws Exception
+     */
+    public static void checkRenderedAttributes(
+            UIComponent component, 
+            FacesContext context, 
+            MockResponseWriter writer,
+            HtmlRenderedAttr[] attrs) throws Exception 
+    {
+        
+        addBaseAttributes(component, attrs);
+        component.encodeBegin(context);
+        component.encodeChildren(context);
+        component.encodeEnd(context);
+        context.renderResponse();
+        checkRenderedAttributes(attrs, writer.getWriter().toString());
+    }
+    
+    /**
+     * Checks the attrs array if it has elements which were rendered incorrectly.
+     * @param attrs The attributes to be checked.
+     * @return True if there are attributes not rendered correctly.
+     */
+    public static boolean hasFailedAttrRender(HtmlRenderedAttr[] attrs) 
+    {
+        for(int i = 0; i < attrs.length; i++) 
+        {
+            if(!attrs[i].isRenderSuccessful()) return true;
+        }
+        return false;
+    }
+    
+    /**
+     * Constructs an error message string detailing which attributes were not rendered
+     * and which attributes were rendered more than once.
+     * @param attrs   The attributes to be tested.
+     * @param actual  The html generated by the renderer.
+     * @return The error message.
+     */
+    public static String constructErrorMessage(HtmlRenderedAttr[] attrs, String actual) 
+    {
+        StringBuffer messgBuffer = new StringBuffer();
+        for(int i = 0; i < attrs.length; i++) 
+        {
+            if(attrs[i].getErrorCode() == HtmlRenderedAttr.RENDERED_MORE_TIMES_THAN_EXPECTED) 
+            {
+                messgBuffer.append(attrs[i].getName()).append(" (");
+                messgBuffer.append(attrs[i].getExpectedHtml()).append(") was rendered more times (");
+                messgBuffer.append(attrs[i].getActualOccurrences()).append(") than expected (");
+                messgBuffer.append(attrs[i].getExpectedOccurrences()).append(").");
+                messgBuffer.append(System.getProperty("line.separator"));
+            } 
+            else if(attrs[i].getErrorCode() == HtmlRenderedAttr.RENDERED_LESS_TIMES_THAN_EXPECTED)
+            {
+                messgBuffer.append(attrs[i].getName()).append(" (");
+                messgBuffer.append(attrs[i].getExpectedHtml()).append(") was rendered less times (");
+                messgBuffer.append(attrs[i].getActualOccurrences()).append(") than expected (");
+                messgBuffer.append(attrs[i].getExpectedOccurrences()).append(").");
+                messgBuffer.append(System.getProperty("line.separator"));
+            }
+        }
+        messgBuffer.append("Actual HTML: ").append(actual);
+        return messgBuffer.toString();
+    }
+    
+    private static void checkAttributeOccurrences(HtmlRenderedAttr attr, String actual)
+    {
+        String expectedHtml = attr.getExpectedHtml();
+        
+        int index;
+        int offset = 0;
+        while((index=actual.indexOf(expectedHtml,offset)) != -1) 
+        {
+            attr.increaseActualOccurrences();
+            if(attr.getActualOccurrences() > attr.getExpectedOccurrences()) 
+            {
+                attr.setErrorCode(HtmlRenderedAttr.RENDERED_MORE_TIMES_THAN_EXPECTED);
+                return;
+            } 
+
+            offset += index + expectedHtml.length();
+        }
+        
+        if(attr.getActualOccurrences() < attr.getExpectedOccurrences()) 
+        {
+            attr.setErrorCode(HtmlRenderedAttr.RENDERED_LESS_TIMES_THAN_EXPECTED);
+        } 
+        else 
+        {
+            attr.setRenderSuccessful(true);
+        }
+    }
+
+}

Added: myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5.test/HtmlRenderedAttr.java
URL: http://svn.apache.org/viewvc/myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5.test/HtmlRenderedAttr.java?rev=1162382&view=auto
==============================================================================
--- myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5.test/HtmlRenderedAttr.java (added)
+++ myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5.test/HtmlRenderedAttr.java Sat Aug 27 15:56:35 2011
@@ -0,0 +1,135 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.html5.test;
+
+public class HtmlRenderedAttr
+{
+    public static final int RENDERED_MORE_TIMES_THAN_EXPECTED = 1;
+    public static final int RENDERED_LESS_TIMES_THAN_EXPECTED = 2;
+    
+    private String name;
+    private Object value;
+    private String expectedHtml;
+    private boolean renderSuccessful;
+    private int errorCode;
+    private int expectedOccurrences;
+    private int actualOccurrences;
+    
+    public HtmlRenderedAttr(String name) {
+        this(name, name, name + "=\"" + name + "\"");
+        expectedOccurrences = 1;
+    }
+    
+    public HtmlRenderedAttr(String name, int expectedOccurences) {
+        this(name);
+        this.expectedOccurrences = expectedOccurences;
+    }
+    
+    /**
+     * Represents an attribute of a component that is expected to be
+     * rendered into html
+     * @param name  The name of the attribute.
+     * @param value The value of the attribute.
+     * @param expectedHtml The expected html output for this attribute.  
+     *     E.g. name="value".
+     */
+    public HtmlRenderedAttr(String name, Object value, String expectedHtml) {
+        this.name = name;
+        this.value = value;
+        this.expectedHtml = expectedHtml;
+        
+        renderSuccessful = false;
+        expectedOccurrences = 1;
+    }
+    
+    public HtmlRenderedAttr(String name, Object value, String expectedHtml, int occurances) {
+        this(name, value, expectedHtml);
+        this.expectedOccurrences = occurances;
+    }
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setName(String name)
+    {
+        this.name = name;
+    }
+
+    public Object getValue()
+    {
+        return value;
+    }
+
+    public void setValue(Object value)
+    {
+        this.value = value;
+    }
+
+    public String getExpectedHtml()
+    {
+        return expectedHtml;
+    }
+
+    public void setExpectedHtml(String expectedHtml)
+    {
+        this.expectedHtml = expectedHtml;
+    }
+
+    /**
+     * This returns the result of the rendering of the attribute.
+     * @return True if the rendered html output of this attribute is
+     * the same as expectedHtml.  False if either the attribute was not
+     * rendered, it was rendered multiple times, or the rendered html
+     * is different from expectedHtml.
+     */
+    public boolean isRenderSuccessful()
+    {
+        return renderSuccessful;
+    }
+
+    public void setRenderSuccessful(boolean renderSuccessful)
+    {
+        this.renderSuccessful = renderSuccessful;
+    }
+
+    public int getErrorCode()
+    {
+        return errorCode;
+    }
+
+    public void setErrorCode(int errorCode)
+    {
+        this.errorCode = errorCode;
+        setRenderSuccessful(false);
+    }
+    
+    public void increaseActualOccurrences() {
+        actualOccurrences++;
+    }
+    
+    public int getActualOccurrences() {
+        return this.actualOccurrences;
+    }
+    
+    public int getExpectedOccurrences() {
+        return this.expectedOccurrences;
+    }
+}

Added: myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5.test/TestUtils.java
URL: http://svn.apache.org/viewvc/myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5.test/TestUtils.java?rev=1162382&view=auto
==============================================================================
--- myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5.test/TestUtils.java (added)
+++ myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5.test/TestUtils.java Sat Aug 27 15:56:35 2011
@@ -0,0 +1,229 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.html5.test;
+
+import java.io.IOException;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.render.RenderKit;
+import javax.faces.render.Renderer;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public abstract class TestUtils
+{
+    /** Default Logger */
+    private static final Log log = LogFactory.getLog(TestUtils.class);
+
+    /** utility class, do not instantiate */
+    private TestUtils()
+    {
+        // utility class, disable instantiation
+    }
+
+    /**
+     * Add all of Tomahawk's renderers.  Currently this is not tied to 
+     * faces-config.xml, so all change to the file MUST also be made here.
+     * 
+     * @param facesContext
+     * @todo Do not add renderer if renderer is already added.
+     */
+    public static void addDefaultRenderers(FacesContext facesContext)
+    {
+        addRenderer(facesContext, "org.apache.myfaces.Div", "org.apache.myfaces.html5.Div",
+                "org.apache.myfaces.html5.renderkit.panel.DivRenderer");
+
+        addRenderer(facesContext, "javax.faces.Input", "org.apache.myfaces.html5.Text",
+                "org.apache.myfaces.html5.renderkit.input.HtmlInputTextRenderer");
+
+        addRenderer(facesContext, "javax.faces.Input", "org.apache.myfaces.html5.Color",
+                "org.apache.myfaces.html5.renderkit.input.HtmlInputColorRenderer");
+
+        addRenderer(facesContext, "javax.faces.Input", "org.apache.myfaces.html5.DateTime",
+                "org.apache.myfaces.html5.renderkit.input.HtmlInputDateTimeRenderer");
+
+        addRenderer(facesContext, "javax.faces.Input", "org.apache.myfaces.html5.Email",
+                "org.apache.myfaces.html5.renderkit.input.HtmlInputEmailRenderer");
+
+        addRenderer(facesContext, "javax.faces.Input", "org.apache.myfaces.html5.NumberSlider",
+                "org.apache.myfaces.html5.renderkit.input.HtmlInputNumberSliderRenderer");
+
+        addRenderer(facesContext, "javax.faces.Input", "org.apache.myfaces.html5.NumberSpinner",
+                "org.apache.myfaces.html5.renderkit.input.HtmlInputNumberSpinnerRenderer");
+
+        addRenderer(facesContext, "org.apache.myfaces.Media", "org.apache.myfaces.html5.Audio",
+                "org.apache.myfaces.html5.renderkit.media.AudioRenderer");
+
+        addRenderer(facesContext, "org.apache.myfaces.Media", "org.apache.myfaces.html5.Video",
+                "org.apache.myfaces.html5.renderkit.media.VideoRenderer");
+
+        addRenderer(facesContext, "org.apache.myfaces.Meter", "org.apache.myfaces.html5.Meter",
+                "org.apache.myfaces.html5.renderkit.output.MeterRenderer");
+
+        addRenderer(facesContext, "org.apache.myfaces.Progress", "org.apache.myfaces.html5.Progress",
+                "org.apache.myfaces.html5.renderkit.output.ProgressRenderer");
+
+        addRenderer(facesContext, "org.apache.myfaces.SlideView", "org.apache.myfaces.html5.SlideView",
+                "org.apache.myfaces.html5.renderkit.output.SlideViewRenderer");
+
+        addRenderer(facesContext, "org.apache.myfaces.Slide", "org.apache.myfaces.html5.Slide",
+                "org.apache.myfaces.html5.renderkit.output.SlideRenderer");
+
+    }
+
+    /**
+     * Add a renderer to the FacesContext.
+     * 
+     * @param facesContext Faces Context
+     * @param family Componenet Family
+     * @param rendererType Component Type
+     * @param renderClassName Class Name of Renderer
+     */
+    public static void addRenderer(FacesContext facesContext, String family,
+            String rendererType, String renderClassName)
+    {
+        Renderer renderer = (javax.faces.render.Renderer) newInstance(renderClassName);
+        RenderKit kit = facesContext.getRenderKit();
+        kit.addRenderer(family, rendererType, renderer);
+    }
+
+    /**
+     * Tries a Class.loadClass with the context class loader of the current thread first and
+     * automatically falls back to the ClassUtils class loader (i.e. the loader of the
+     * myfaces.jar lib) if necessary.
+     * 
+     * Note: This was copied from org.apache.myfaces.shared.util.ClassUtils
+     *
+     * @param type fully qualified name of a non-primitive non-array class
+     * @return the corresponding Class
+     * @throws NullPointerException if type is null
+     * @throws ClassNotFoundException
+     */
+    private static Class classForName(String type)
+            throws ClassNotFoundException
+    {
+        if (type == null)
+            throw new NullPointerException("type");
+        try
+        {
+            // Try WebApp ClassLoader first
+            return Class.forName(type, false, // do not initialize for faster startup
+                    Thread.currentThread().getContextClassLoader());
+        }
+        catch (ClassNotFoundException ignore)
+        {
+            // fallback: Try ClassLoader for ClassUtils (i.e. the myfaces.jar lib)
+            return Class.forName(type, false, // do not initialize for faster startup
+                    TestUtils.class.getClassLoader());
+        }
+    }
+
+    /**
+     * Same as {@link #classForName(String)}, but throws a RuntimeException
+     * (FacesException) instead of a ClassNotFoundException.
+     *
+     * Note: This was copied from org.apache.myfaces.shared.util.ClassUtils
+     *
+     * @return the corresponding Class
+     * @throws NullPointerException if type is null
+     * @throws FacesException if class not found
+     */
+    private static Class simpleClassForName(String type)
+    {
+        try
+        {
+            return classForName(type);
+        }
+        catch (ClassNotFoundException e)
+        {
+            log.error("Class " + type + " not found", e);
+            throw new FacesException(e);
+        }
+    }
+
+    /**
+     * Create an instance of the class with the type of <code>type</code>.
+     * 
+     * Note: This was copied from org.apache.myfaces.shared.util.ClassUtils
+     *
+     * @param type Type of new class.
+     * @return Instance of the class <code>type</code>
+     * @throws FacesException
+     */
+    private static Object newInstance(String type) throws FacesException
+    {
+        if (type == null)
+            return null;
+        return newInstance(simpleClassForName(type));
+    }
+
+    /**
+     * Create an instance of the class <code>clazz</code>.
+     * 
+     * Note: This was copied from org.apache.myfaces.shared.util.ClassUtils
+     *
+     * @param clazz Class to create an instance of.
+     * @return Instance of the class <code>clazz</code>
+     * @throws FacesException
+     */
+    private static Object newInstance(Class clazz) throws FacesException
+    {
+        try
+        {
+            return clazz.newInstance();
+        }
+        catch (NoClassDefFoundError e)
+        {
+            log.error("Class : " + clazz.getName() + " not found.", e);
+            throw new FacesException(e);
+        }
+        catch (InstantiationException e)
+        {
+            log.error(e.getMessage(), e);
+            throw new FacesException(e);
+        }
+        catch (IllegalAccessException e)
+        {
+            log.error(e.getMessage(), e);
+            throw new FacesException(e);
+        }
+    }
+
+    /**
+     * Renderered a component, including it's children, then complete the reponse.
+     * 
+     * @param context Faces Context
+     * @param component Component to be rendered.
+     * @throws IOException Thrown while rendering.
+     */
+    public static void renderComponent(FacesContext context,
+            UIComponent component) throws IOException
+    {
+        Renderer renderer = context.getRenderKit().getRenderer(
+                component.getFamily(), component.getRendererType());
+        renderer.encodeBegin(context, component);
+        renderer.encodeChildren(context, component);
+        renderer.encodeEnd(context, component);
+        context.responseComplete();
+        context.renderResponse();
+    }
+}

Added: myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputColorRendererTest.java
URL: http://svn.apache.org/viewvc/myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputColorRendererTest.java?rev=1162382&view=auto
==============================================================================
--- myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputColorRendererTest.java (added)
+++ myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputColorRendererTest.java Sat Aug 27 15:56:35 2011
@@ -0,0 +1,56 @@
+package org.apache.myfaces.html5.renderkit.input;
+
+import org.apache.myfaces.html5.component.input.HtmlInputColor;
+import org.apache.myfaces.html5.test.AbstractHtml5ViewControllerTestCase;
+import org.apache.myfaces.html5.test.HtmlCheckAttributesUtil;
+import org.apache.myfaces.html5.test.HtmlRenderedAttr;
+
+/**
+ * @author Ali Ok (aliok@apache.org)
+ */
+public class HtmlInputColorRendererTest extends AbstractHtml5ViewControllerTestCase {
+
+    private HtmlInputColor htmlInputColor;
+
+    public HtmlInputColorRendererTest(String name) {
+        super(name);
+    }
+
+    @Override
+    public void setUp() throws Exception {
+        super.setUp();
+        htmlInputColor = new HtmlInputColor();
+    }
+
+    public void testPassThruHtmlProperties() throws Exception {
+        HtmlRenderedAttr[] attrs = {
+            //Html5 Global Props
+            new HtmlRenderedAttr("draggable", true, "draggable=\"true\""),
+            new HtmlRenderedAttr("hidden", true, "hidden=\"true\""),
+            //Common input props
+            new HtmlRenderedAttr("align"),
+            new HtmlRenderedAttr("alt"),
+            new HtmlRenderedAttr("maxlength", 3, "maxlength=\"3\""),
+            new HtmlRenderedAttr("readonly", true, "readonly=\"true\""),
+            new HtmlRenderedAttr("style"),
+            new HtmlRenderedAttr("styleClass", "styleClass", "class=\"styleClass\""),
+            new HtmlRenderedAttr("dir"),
+            new HtmlRenderedAttr("lang"),
+            new HtmlRenderedAttr("title"),
+            new HtmlRenderedAttr("accesskey"),
+            new HtmlRenderedAttr("tabindex"),
+            new HtmlRenderedAttr("disabled", true, "disabled=\"true\""),
+            //Input props
+            new HtmlRenderedAttr("autofocus", true, "autofocus=\"true\""),
+            new HtmlRenderedAttr("datalist", "datalist", "list=\"datalist\""),
+        };
+
+        HtmlCheckAttributesUtil.checkRenderedAttributes(htmlInputColor, facesContext, writer, attrs);
+        if(HtmlCheckAttributesUtil.hasFailedAttrRender(attrs))
+        {
+            fail(HtmlCheckAttributesUtil.constructErrorMessage(attrs, writer.getWriter().toString()));
+        }
+    }
+
+
+}

Added: myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputDateTimeRendererTest.java
URL: http://svn.apache.org/viewvc/myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputDateTimeRendererTest.java?rev=1162382&view=auto
==============================================================================
--- myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputDateTimeRendererTest.java (added)
+++ myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputDateTimeRendererTest.java Sat Aug 27 15:56:35 2011
@@ -0,0 +1,58 @@
+package org.apache.myfaces.html5.renderkit.input;
+
+import org.apache.myfaces.html5.component.input.HtmlInputColor;
+import org.apache.myfaces.html5.component.input.HtmlInputDateTime;
+import org.apache.myfaces.html5.test.AbstractHtml5ViewControllerTestCase;
+import org.apache.myfaces.html5.test.HtmlCheckAttributesUtil;
+import org.apache.myfaces.html5.test.HtmlRenderedAttr;
+
+/**
+ * @author Ali Ok (aliok@apache.org)
+ */
+public class HtmlInputDateTimeRendererTest extends AbstractHtml5ViewControllerTestCase {
+
+    private HtmlInputDateTime htmlInputDateTime;
+
+    public HtmlInputDateTimeRendererTest(String name) {
+        super(name);
+    }
+
+    @Override
+    public void setUp() throws Exception {
+        super.setUp();
+        htmlInputDateTime = new HtmlInputDateTime();
+    }
+
+    public void testPassThruHtmlProperties() throws Exception {
+        HtmlRenderedAttr[] attrs = {
+            //Html5 Global Props
+            new HtmlRenderedAttr("draggable", true, "draggable=\"true\""),
+            new HtmlRenderedAttr("hidden", true, "hidden=\"true\""),
+            //Common input props
+            new HtmlRenderedAttr("align"),
+            new HtmlRenderedAttr("alt"),
+            new HtmlRenderedAttr("maxlength", 3, "maxlength=\"3\""),
+            new HtmlRenderedAttr("readonly", true, "readonly=\"true\""),
+            new HtmlRenderedAttr("style"),
+            new HtmlRenderedAttr("styleClass", "styleClass", "class=\"styleClass\""),
+            new HtmlRenderedAttr("dir"),
+            new HtmlRenderedAttr("lang"),
+            new HtmlRenderedAttr("title"),
+            new HtmlRenderedAttr("accesskey"),
+            new HtmlRenderedAttr("tabindex"),
+            new HtmlRenderedAttr("disabled", true, "disabled=\"true\""),
+            //Input props
+            new HtmlRenderedAttr("autofocus", true, "autofocus=\"true\""),
+            new HtmlRenderedAttr("datalist", "datalist", "list=\"datalist\""),
+            new HtmlRenderedAttr("required", true, "required=\"true\""),
+        };
+
+        HtmlCheckAttributesUtil.checkRenderedAttributes(htmlInputDateTime, facesContext, writer, attrs);
+        if(HtmlCheckAttributesUtil.hasFailedAttrRender(attrs))
+        {
+            fail(HtmlCheckAttributesUtil.constructErrorMessage(attrs, writer.getWriter().toString()));
+        }
+    }
+
+
+}

Added: myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputEmailRendererTest.java
URL: http://svn.apache.org/viewvc/myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputEmailRendererTest.java?rev=1162382&view=auto
==============================================================================
--- myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputEmailRendererTest.java (added)
+++ myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputEmailRendererTest.java Sat Aug 27 15:56:35 2011
@@ -0,0 +1,62 @@
+package org.apache.myfaces.html5.renderkit.input;
+
+import org.apache.myfaces.html5.component.HtmlInputEmail;
+import org.apache.myfaces.html5.component.input.HtmlInputDateTime;
+import org.apache.myfaces.html5.test.AbstractHtml5ViewControllerTestCase;
+import org.apache.myfaces.html5.test.HtmlCheckAttributesUtil;
+import org.apache.myfaces.html5.test.HtmlRenderedAttr;
+
+/**
+ * @author Ali Ok (aliok@apache.org)
+ */
+public class HtmlInputEmailRendererTest extends AbstractHtml5ViewControllerTestCase {
+
+    private HtmlInputEmail htmlInputEmail;
+
+    public HtmlInputEmailRendererTest(String name) {
+        super(name);
+    }
+
+    @Override
+    public void setUp() throws Exception {
+        super.setUp();
+        htmlInputEmail = new HtmlInputEmail();
+    }
+
+    public void testPassThruHtmlProperties() throws Exception {
+        HtmlRenderedAttr[] attrs = {
+            //Html5 Global Props
+            new HtmlRenderedAttr("draggable", true, "draggable=\"true\""),
+            new HtmlRenderedAttr("hidden", true, "hidden=\"true\""),
+            //Common input props
+            new HtmlRenderedAttr("align"),
+            new HtmlRenderedAttr("alt"),
+            new HtmlRenderedAttr("maxlength", 3, "maxlength=\"3\""),
+            new HtmlRenderedAttr("readonly", true, "readonly=\"true\""),
+            new HtmlRenderedAttr("style"),
+            new HtmlRenderedAttr("styleClass", "styleClass", "class=\"styleClass\""),
+            new HtmlRenderedAttr("dir"),
+            new HtmlRenderedAttr("lang"),
+            new HtmlRenderedAttr("title"),
+            new HtmlRenderedAttr("accesskey"),
+            new HtmlRenderedAttr("tabindex"),
+            new HtmlRenderedAttr("disabled", true, "disabled=\"true\""),
+            //Input props
+            new HtmlRenderedAttr("autofocus", true, "autofocus=\"true\""),
+            new HtmlRenderedAttr("datalist", "datalist", "list=\"datalist\""),
+
+            //email input props
+            new HtmlRenderedAttr("required", true, "required=\"true\""),
+            new HtmlRenderedAttr("multiple", true, "multiple=\"true\""),
+            new HtmlRenderedAttr("placeholder"),
+        };
+
+        HtmlCheckAttributesUtil.checkRenderedAttributes(htmlInputEmail, facesContext, writer, attrs);
+        if(HtmlCheckAttributesUtil.hasFailedAttrRender(attrs))
+        {
+            fail(HtmlCheckAttributesUtil.constructErrorMessage(attrs, writer.getWriter().toString()));
+        }
+    }
+
+
+}

Added: myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputNumberSliderRendererTest.java
URL: http://svn.apache.org/viewvc/myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputNumberSliderRendererTest.java?rev=1162382&view=auto
==============================================================================
--- myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputNumberSliderRendererTest.java (added)
+++ myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputNumberSliderRendererTest.java Sat Aug 27 15:56:35 2011
@@ -0,0 +1,57 @@
+package org.apache.myfaces.html5.renderkit.input;
+
+import org.apache.myfaces.html5.component.HtmlInputEmail;
+import org.apache.myfaces.html5.component.input.HtmlInputNumberSlider;
+import org.apache.myfaces.html5.test.AbstractHtml5ViewControllerTestCase;
+import org.apache.myfaces.html5.test.HtmlCheckAttributesUtil;
+import org.apache.myfaces.html5.test.HtmlRenderedAttr;
+
+/**
+ * @author Ali Ok (aliok@apache.org)
+ */
+public class HtmlInputNumberSliderRendererTest extends AbstractHtml5ViewControllerTestCase {
+
+    private HtmlInputNumberSlider htmlInputNumberSlider;
+
+    public HtmlInputNumberSliderRendererTest(String name) {
+        super(name);
+    }
+
+    @Override
+    public void setUp() throws Exception {
+        super.setUp();
+        htmlInputNumberSlider = new HtmlInputNumberSlider();
+    }
+
+    public void testPassThruHtmlProperties() throws Exception {
+        HtmlRenderedAttr[] attrs = {
+            //Html5 Global Props
+            new HtmlRenderedAttr("draggable", true, "draggable=\"true\""),
+            new HtmlRenderedAttr("hidden", true, "hidden=\"true\""),
+            //Common input props
+            new HtmlRenderedAttr("align"),
+            new HtmlRenderedAttr("alt"),
+            new HtmlRenderedAttr("maxlength", 3, "maxlength=\"3\""),
+            new HtmlRenderedAttr("readonly", true, "readonly=\"true\""),
+            new HtmlRenderedAttr("style"),
+            new HtmlRenderedAttr("styleClass", "styleClass", "class=\"styleClass\""),
+            new HtmlRenderedAttr("dir"),
+            new HtmlRenderedAttr("lang"),
+            new HtmlRenderedAttr("title"),
+            new HtmlRenderedAttr("accesskey"),
+            new HtmlRenderedAttr("tabindex"),
+            new HtmlRenderedAttr("disabled", true, "disabled=\"true\""),
+            //Input props
+            new HtmlRenderedAttr("autofocus", true, "autofocus=\"true\""),
+            new HtmlRenderedAttr("datalist", "datalist", "list=\"datalist\""),
+        };
+
+        HtmlCheckAttributesUtil.checkRenderedAttributes(htmlInputNumberSlider, facesContext, writer, attrs);
+        if(HtmlCheckAttributesUtil.hasFailedAttrRender(attrs))
+        {
+            fail(HtmlCheckAttributesUtil.constructErrorMessage(attrs, writer.getWriter().toString()));
+        }
+    }
+
+
+}

Added: myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputNumberSpinnerRendererTest.java
URL: http://svn.apache.org/viewvc/myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputNumberSpinnerRendererTest.java?rev=1162382&view=auto
==============================================================================
--- myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputNumberSpinnerRendererTest.java (added)
+++ myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputNumberSpinnerRendererTest.java Sat Aug 27 15:56:35 2011
@@ -0,0 +1,59 @@
+package org.apache.myfaces.html5.renderkit.input;
+
+import org.apache.myfaces.html5.component.input.HtmlInputNumberSlider;
+import org.apache.myfaces.html5.component.input.HtmlInputNumberSpinner;
+import org.apache.myfaces.html5.test.AbstractHtml5ViewControllerTestCase;
+import org.apache.myfaces.html5.test.HtmlCheckAttributesUtil;
+import org.apache.myfaces.html5.test.HtmlRenderedAttr;
+
+/**
+ * @author Ali Ok (aliok@apache.org)
+ */
+public class HtmlInputNumberSpinnerRendererTest extends AbstractHtml5ViewControllerTestCase {
+
+    private HtmlInputNumberSpinner htmlInputNumberSpinner;
+
+    public HtmlInputNumberSpinnerRendererTest(String name) {
+        super(name);
+    }
+
+    @Override
+    public void setUp() throws Exception {
+        super.setUp();
+        htmlInputNumberSpinner = new HtmlInputNumberSpinner();
+    }
+
+    public void testPassThruHtmlProperties() throws Exception {
+        HtmlRenderedAttr[] attrs = {
+            //Html5 Global Props
+            new HtmlRenderedAttr("draggable", true, "draggable=\"true\""),
+            new HtmlRenderedAttr("hidden", true, "hidden=\"true\""),
+            //Common input props
+            new HtmlRenderedAttr("align"),
+            new HtmlRenderedAttr("alt"),
+            new HtmlRenderedAttr("maxlength", 3, "maxlength=\"3\""),
+            new HtmlRenderedAttr("readonly", true, "readonly=\"true\""),
+            new HtmlRenderedAttr("style"),
+            new HtmlRenderedAttr("styleClass", "styleClass", "class=\"styleClass\""),
+            new HtmlRenderedAttr("dir"),
+            new HtmlRenderedAttr("lang"),
+            new HtmlRenderedAttr("title"),
+            new HtmlRenderedAttr("accesskey"),
+            new HtmlRenderedAttr("tabindex"),
+            new HtmlRenderedAttr("disabled", true, "disabled=\"true\""),
+            //Input props
+            new HtmlRenderedAttr("autofocus", true, "autofocus=\"true\""),
+            new HtmlRenderedAttr("datalist", "datalist", "list=\"datalist\""),
+            //spinner props
+            new HtmlRenderedAttr("required", true, "required=\"true\""),
+        };
+
+        HtmlCheckAttributesUtil.checkRenderedAttributes(htmlInputNumberSpinner, facesContext, writer, attrs);
+        if(HtmlCheckAttributesUtil.hasFailedAttrRender(attrs))
+        {
+            fail(HtmlCheckAttributesUtil.constructErrorMessage(attrs, writer.getWriter().toString()));
+        }
+    }
+
+
+}

Added: myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputTextRendererTest.java
URL: http://svn.apache.org/viewvc/myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputTextRendererTest.java?rev=1162382&view=auto
==============================================================================
--- myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputTextRendererTest.java (added)
+++ myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/input/HtmlInputTextRendererTest.java Sat Aug 27 15:56:35 2011
@@ -0,0 +1,130 @@
+package org.apache.myfaces.html5.renderkit.input;
+
+import org.apache.myfaces.html5.component.input.HtmlInputText;
+import org.apache.myfaces.html5.test.AbstractHtml5ViewControllerTestCase;
+import org.apache.myfaces.html5.test.HtmlCheckAttributesUtil;
+import org.apache.myfaces.html5.test.HtmlRenderedAttr;
+
+/**
+ * @author Ali Ok (aliok@apache.org)
+ */
+public class HtmlInputTextRendererTest extends AbstractHtml5ViewControllerTestCase {
+
+    private HtmlInputText htmlInputText;
+
+    public HtmlInputTextRendererTest(String name) {
+        super(name);
+    }
+
+    @Override
+    public void setUp() throws Exception {
+        super.setUp();
+        this.htmlInputText = new HtmlInputText();
+    }
+
+    @Override
+    public void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    public void testPassThruHtmlPropertiesForInputTextForTypeText() throws Exception
+    {
+        this.htmlInputText.setType("text");
+
+        doTestForInputText();
+    }
+
+    public void testPassThruHtmlPropertiesForInputTextForTypeSearch() throws Exception
+    {
+        this.htmlInputText.setType("search");
+
+        doTestForInputText();
+    }
+
+    public void testPassThruHtmlPropertiesForInputTextForTypeURL() throws Exception
+    {
+        this.htmlInputText.setType("url");
+
+        doTestForInputText();
+    }
+
+    public void testPassThruHtmlPropertiesForInputTextForTypeTel() throws Exception
+    {
+        this.htmlInputText.setType("tel");
+
+        doTestForInputText();
+    }
+
+
+
+    private void doTestForInputText() throws Exception {
+        HtmlRenderedAttr[] attrs = {
+            //Html5 Global Props
+            new HtmlRenderedAttr("draggable", true, "draggable=\"true\""),
+            new HtmlRenderedAttr("hidden", true, "hidden=\"true\""),
+            //Common input props
+            new HtmlRenderedAttr("align"),
+            new HtmlRenderedAttr("alt"),
+            new HtmlRenderedAttr("maxlength", 3, "maxlength=\"3\""),
+            new HtmlRenderedAttr("readonly", true, "readonly=\"true\""),
+            new HtmlRenderedAttr("style"),
+            new HtmlRenderedAttr("styleClass", "styleClass", "class=\"styleClass\""),
+            new HtmlRenderedAttr("dir"),
+            new HtmlRenderedAttr("lang"),
+            new HtmlRenderedAttr("title"),
+            new HtmlRenderedAttr("accesskey"),
+            new HtmlRenderedAttr("tabindex"),
+            new HtmlRenderedAttr("disabled", true, "disabled=\"true\""),
+            //Input props
+            new HtmlRenderedAttr("autofocus", true, "autofocus=\"true\""),
+            new HtmlRenderedAttr("datalist", "datalist", "list=\"datalist\""),
+            //text input props
+            new HtmlRenderedAttr("placeholder"),
+            new HtmlRenderedAttr("required", true, "required=\"true\""),
+        };
+
+        HtmlCheckAttributesUtil.checkRenderedAttributes(htmlInputText, facesContext, writer, attrs);
+        if(HtmlCheckAttributesUtil.hasFailedAttrRender(attrs))
+        {
+            fail(HtmlCheckAttributesUtil.constructErrorMessage(attrs, writer.getWriter().toString()));
+        }
+    }
+
+    public void testPassThruHtmlPropertiesForInputTextForTypeTextarea() throws Exception
+    {
+        this.htmlInputText.setType("textarea");
+
+        HtmlRenderedAttr[] attrs = {
+            //Html5 Global Props
+            new HtmlRenderedAttr("draggable", true, "draggable=\"true\""),
+            new HtmlRenderedAttr("hidden", true, "hidden=\"true\""),
+            //Common input props
+            new HtmlRenderedAttr("align"),
+            new HtmlRenderedAttr("alt"),
+            new HtmlRenderedAttr("maxlength", 3, "maxlength=\"3\""),
+            new HtmlRenderedAttr("readonly", true, "readonly=\"true\""),
+            new HtmlRenderedAttr("style"),
+            new HtmlRenderedAttr("styleClass", "styleClass", "class=\"styleClass\""),
+            new HtmlRenderedAttr("dir"),
+            new HtmlRenderedAttr("lang"),
+            new HtmlRenderedAttr("title"),
+            new HtmlRenderedAttr("accesskey"),
+            new HtmlRenderedAttr("tabindex"),
+            new HtmlRenderedAttr("disabled", true, "disabled=\"true\""),
+            //Textarea props
+            new HtmlRenderedAttr("autofocus", true, "autofocus=\"true\""),
+            new HtmlRenderedAttr("required", true, "required=\"true\""),
+            new HtmlRenderedAttr("cols", 1, "cols=\"1\""),
+            new HtmlRenderedAttr("rows", 1, "rows=\"1\""),
+            new HtmlRenderedAttr("wrap"),
+
+        };
+
+        HtmlCheckAttributesUtil.checkRenderedAttributes(htmlInputText, facesContext, writer, attrs);
+        if(HtmlCheckAttributesUtil.hasFailedAttrRender(attrs))
+        {
+            fail(HtmlCheckAttributesUtil.constructErrorMessage(attrs, writer.getWriter().toString()));
+        }
+    }
+
+}

Added: myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/media/AudioRendererTest.java
URL: http://svn.apache.org/viewvc/myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/media/AudioRendererTest.java?rev=1162382&view=auto
==============================================================================
--- myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/media/AudioRendererTest.java (added)
+++ myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/media/AudioRendererTest.java Sat Aug 27 15:56:35 2011
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.myfaces.html5.renderkit.media;
+
+import org.apache.myfaces.html5.component.media.Audio;
+import org.apache.myfaces.html5.component.media.Video;
+import org.apache.myfaces.html5.test.AbstractHtml5ViewControllerTestCase;
+import org.apache.myfaces.html5.test.HtmlCheckAttributesUtil;
+import org.apache.myfaces.html5.test.HtmlRenderedAttr;
+
+/**
+ * @author Ali Ok (aliok@apache.org)
+ */
+public class AudioRendererTest extends AbstractHtml5ViewControllerTestCase {
+
+    private Audio audio;
+
+    public AudioRendererTest(String name) {
+        super(name);
+    }
+
+    @Override
+    public void setUp() throws Exception {
+        super.setUp();
+        audio = new Audio();
+    }
+
+    public void testPassThruHtmlProperties() throws Exception
+    {
+        HtmlRenderedAttr[] attrs = {
+            //Global Props
+            new HtmlRenderedAttr("dir"),
+            new HtmlRenderedAttr("lang"),
+            new HtmlRenderedAttr("style"),
+            new HtmlRenderedAttr("styleClass", "styleClass", "class=\"styleClass\""),
+            new HtmlRenderedAttr("title"),
+            new HtmlRenderedAttr("accesskey"),
+            new HtmlRenderedAttr("tabindex"),
+            //audio
+            new HtmlRenderedAttr("preload"),
+            new HtmlRenderedAttr("showControls", true, "controls=\"true\""),
+            new HtmlRenderedAttr("loop", true, "loop=\"true\""),
+            new HtmlRenderedAttr("autoplay", true, "autoplay=\"true\""),
+            new HtmlRenderedAttr("hidden", true, "hidden=\"true\""),
+        };
+
+        HtmlCheckAttributesUtil.checkRenderedAttributes(audio, facesContext, writer, attrs);
+        if(HtmlCheckAttributesUtil.hasFailedAttrRender(attrs))
+        {
+            fail(HtmlCheckAttributesUtil.constructErrorMessage(attrs, writer.getWriter().toString()));
+        }
+    }
+
+}

Added: myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/media/VideoRendererTest.java
URL: http://svn.apache.org/viewvc/myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/media/VideoRendererTest.java?rev=1162382&view=auto
==============================================================================
--- myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/media/VideoRendererTest.java (added)
+++ myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/media/VideoRendererTest.java Sat Aug 27 15:56:35 2011
@@ -0,0 +1,55 @@
+package org.apache.myfaces.html5.renderkit.media;
+
+import org.apache.myfaces.html5.component.media.Video;
+import org.apache.myfaces.html5.test.AbstractHtml5ViewControllerTestCase;
+import org.apache.myfaces.html5.test.HtmlCheckAttributesUtil;
+import org.apache.myfaces.html5.test.HtmlRenderedAttr;
+
+/**
+ * @author Ali Ok (aliok@apache.org)
+ */
+public class VideoRendererTest extends AbstractHtml5ViewControllerTestCase {
+
+    private Video video;
+
+    public VideoRendererTest(String name) {
+        super(name);
+    }
+
+    @Override
+    public void setUp() throws Exception {
+        super.setUp();
+        video = new Video();
+    }
+
+    public void testPassThruHtmlProperties() throws Exception
+    {
+        HtmlRenderedAttr[] attrs = {
+            //Global Props
+            new HtmlRenderedAttr("dir"),
+            new HtmlRenderedAttr("lang"),
+            new HtmlRenderedAttr("style"),
+            new HtmlRenderedAttr("styleClass", "styleClass", "class=\"styleClass\""),
+            new HtmlRenderedAttr("title"),
+            new HtmlRenderedAttr("accesskey"),
+            new HtmlRenderedAttr("tabindex"),
+            //audio
+            new HtmlRenderedAttr("preload"),
+            new HtmlRenderedAttr("showControls", true, "controls=\"true\""),
+            new HtmlRenderedAttr("loop", true, "loop=\"true\""),
+            new HtmlRenderedAttr("autoplay", true, "autoplay=\"true\""),
+            new HtmlRenderedAttr("hidden", true, "hidden=\"true\""),
+            //video
+            new HtmlRenderedAttr("poster"),
+            new HtmlRenderedAttr("width"),
+            new HtmlRenderedAttr("height"),
+        };
+
+        HtmlCheckAttributesUtil.checkRenderedAttributes(video, facesContext, writer, attrs);
+        if(HtmlCheckAttributesUtil.hasFailedAttrRender(attrs))
+        {
+            fail(HtmlCheckAttributesUtil.constructErrorMessage(attrs, writer.getWriter().toString()));
+        }
+    }
+
+}

Added: myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/output/MeterRendererTest.java
URL: http://svn.apache.org/viewvc/myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/output/MeterRendererTest.java?rev=1162382&view=auto
==============================================================================
--- myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/output/MeterRendererTest.java (added)
+++ myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/output/MeterRendererTest.java Sat Aug 27 15:56:35 2011
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.myfaces.html5.renderkit.output;
+
+import org.apache.myfaces.html5.component.output.Meter;
+import org.apache.myfaces.html5.test.AbstractHtml5ViewControllerTestCase;
+import org.apache.myfaces.html5.test.HtmlCheckAttributesUtil;
+import org.apache.myfaces.html5.test.HtmlRenderedAttr;
+
+/**
+ * @author Ali Ok (aliok@apache.org)
+ */
+public class MeterRendererTest extends AbstractHtml5ViewControllerTestCase {
+
+    private Meter meter;
+
+    public MeterRendererTest(String name) {
+        super(name);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        meter = new Meter();
+    }
+
+    public void testPassThruHtmlProperties() throws Exception
+    {
+        HtmlRenderedAttr[] attrs = {
+            //Global Props
+            new HtmlRenderedAttr("dir"),
+            new HtmlRenderedAttr("lang"),
+            new HtmlRenderedAttr("style"),
+            new HtmlRenderedAttr("styleClass", "styleClass", "class=\"styleClass\""),
+            new HtmlRenderedAttr("title"),
+            new HtmlRenderedAttr("accesskey"),
+            new HtmlRenderedAttr("tabindex"),
+            //Html5 Global Props
+            new HtmlRenderedAttr("draggable", true, "draggable=\"true\""),
+            new HtmlRenderedAttr("hidden", true, "hidden=\"true\""),
+            //meter
+            new HtmlRenderedAttr("value", 10.0, "value=\"10.0\""),
+            new HtmlRenderedAttr("maximum", 10.0, "max=\"10.0\""),
+            new HtmlRenderedAttr("minimum", 10.0, "min=\"10.0\""),
+            new HtmlRenderedAttr("low", 10.0, "low=\"10.0\""),
+            new HtmlRenderedAttr("high", 10.0, "high=\"10.0\""),
+            new HtmlRenderedAttr("optimum", 10.0, "optimum=\"10.0\""),
+        };
+
+        HtmlCheckAttributesUtil.checkRenderedAttributes(meter, facesContext, writer, attrs);
+        if(HtmlCheckAttributesUtil.hasFailedAttrRender(attrs))
+        {
+            fail(HtmlCheckAttributesUtil.constructErrorMessage(attrs, writer.getWriter().toString()));
+        }
+    }
+
+}

Added: myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/output/ProgressRendererTest.java
URL: http://svn.apache.org/viewvc/myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/output/ProgressRendererTest.java?rev=1162382&view=auto
==============================================================================
--- myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/output/ProgressRendererTest.java (added)
+++ myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/output/ProgressRendererTest.java Sat Aug 27 15:56:35 2011
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.myfaces.html5.renderkit.output;
+
+import org.apache.myfaces.html5.component.output.Meter;
+import org.apache.myfaces.html5.component.output.Progress;
+import org.apache.myfaces.html5.test.AbstractHtml5ViewControllerTestCase;
+import org.apache.myfaces.html5.test.HtmlCheckAttributesUtil;
+import org.apache.myfaces.html5.test.HtmlRenderedAttr;
+
+/**
+ * @author Ali Ok (aliok@apache.org)
+ */
+public class ProgressRendererTest extends AbstractHtml5ViewControllerTestCase {
+
+    private Progress progress;
+
+    public ProgressRendererTest(String name) {
+        super(name);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        progress = new Progress();
+    }
+
+    public void testPassThruHtmlProperties() throws Exception
+    {
+        HtmlRenderedAttr[] attrs = {
+            //Global Props
+            new HtmlRenderedAttr("dir"),
+            new HtmlRenderedAttr("lang"),
+            new HtmlRenderedAttr("style"),
+            new HtmlRenderedAttr("styleClass", "styleClass", "class=\"styleClass\""),
+            new HtmlRenderedAttr("title"),
+            new HtmlRenderedAttr("accesskey"),
+            new HtmlRenderedAttr("tabindex"),
+            //Html5 Global Props
+            new HtmlRenderedAttr("draggable", true, "draggable=\"true\""),
+            new HtmlRenderedAttr("hidden", true, "hidden=\"true\""),
+            //meter
+            new HtmlRenderedAttr("value", 10.0, "value=\"10.0\""),
+            new HtmlRenderedAttr("maximum", 10.0, "max=\"10.0\""),
+        };
+
+        HtmlCheckAttributesUtil.checkRenderedAttributes(progress, facesContext, writer, attrs);
+        if(HtmlCheckAttributesUtil.hasFailedAttrRender(attrs))
+        {
+            fail(HtmlCheckAttributesUtil.constructErrorMessage(attrs, writer.getWriter().toString()));
+        }
+    }
+
+}

Added: myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/output/SlideRendererTest.java
URL: http://svn.apache.org/viewvc/myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/output/SlideRendererTest.java?rev=1162382&view=auto
==============================================================================
--- myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/output/SlideRendererTest.java (added)
+++ myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/output/SlideRendererTest.java Sat Aug 27 15:56:35 2011
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.myfaces.html5.renderkit.output;
+
+import org.apache.myfaces.html5.component.output.Slide;
+import org.apache.myfaces.html5.test.AbstractHtml5ViewControllerTestCase;
+import org.apache.myfaces.html5.test.HtmlCheckAttributesUtil;
+import org.apache.myfaces.html5.test.HtmlRenderedAttr;
+
+/**
+ * @author Ali Ok (aliok@apache.org)
+ */
+public class SlideRendererTest extends AbstractHtml5ViewControllerTestCase {
+
+    private Slide slide;
+
+    public SlideRendererTest(String name) {
+        super(name);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        this.slide = new Slide();
+    }
+
+    public void testPassThruHtmlProperties() throws Exception
+    {
+        HtmlRenderedAttr[] attrs = {
+            //Global Props
+            new HtmlRenderedAttr("dir"),
+            new HtmlRenderedAttr("lang"),
+            new HtmlRenderedAttr("style"),
+            new HtmlRenderedAttr("styleClass", "styleClass", "class=\"styleClass\""),
+            new HtmlRenderedAttr("title"),
+            new HtmlRenderedAttr("accesskey"),
+            new HtmlRenderedAttr("tabindex"),
+            //Html5 Global Props
+            new HtmlRenderedAttr("draggable", true, "draggable=\"true\""),
+            new HtmlRenderedAttr("hidden", true, "hidden=\"true\""),
+        };
+
+        HtmlCheckAttributesUtil.checkRenderedAttributes(slide, facesContext, writer, attrs);
+        if(HtmlCheckAttributesUtil.hasFailedAttrRender(attrs))
+        {
+            fail(HtmlCheckAttributesUtil.constructErrorMessage(attrs, writer.getWriter().toString()));
+        }
+    }
+}

Added: myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/output/SlideViewRendererTest.java
URL: http://svn.apache.org/viewvc/myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/output/SlideViewRendererTest.java?rev=1162382&view=auto
==============================================================================
--- myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/output/SlideViewRendererTest.java (added)
+++ myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/output/SlideViewRendererTest.java Sat Aug 27 15:56:35 2011
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.myfaces.html5.renderkit.output;
+
+import org.apache.myfaces.html5.component.output.SlideView;
+import org.apache.myfaces.html5.test.AbstractHtml5ViewControllerTestCase;
+import org.apache.myfaces.html5.test.HtmlCheckAttributesUtil;
+import org.apache.myfaces.html5.test.HtmlRenderedAttr;
+
+/**
+ * @author Ali Ok (aliok@apache.org)
+ */
+public class SlideViewRendererTest extends AbstractHtml5ViewControllerTestCase {
+
+    private SlideView slideView;
+
+    public SlideViewRendererTest(String name) {
+        super(name);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        this.slideView = new SlideView();
+    }
+
+    public void testPassThruHtmlProperties() throws Exception
+    {
+        HtmlRenderedAttr[] attrs = {
+            //Global Props
+            new HtmlRenderedAttr("dir"),
+            new HtmlRenderedAttr("lang"),
+            new HtmlRenderedAttr("style"),
+            new HtmlRenderedAttr("styleClass", "styleClass", "class=\"styleClass\""),
+            new HtmlRenderedAttr("title"),
+            new HtmlRenderedAttr("accesskey"),
+            new HtmlRenderedAttr("tabindex"),
+            //Html5 Global Props
+            new HtmlRenderedAttr("draggable", true, "draggable=\"true\""),
+            new HtmlRenderedAttr("hidden", true, "hidden=\"true\""),
+        };
+
+        HtmlCheckAttributesUtil.checkRenderedAttributes(slideView, facesContext, writer, attrs);
+        if(HtmlCheckAttributesUtil.hasFailedAttrRender(attrs))
+        {
+            fail(HtmlCheckAttributesUtil.constructErrorMessage(attrs, writer.getWriter().toString()));
+        }
+    }
+}

Added: myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/panel/DivRendererTest.java
URL: http://svn.apache.org/viewvc/myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/panel/DivRendererTest.java?rev=1162382&view=auto
==============================================================================
--- myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/panel/DivRendererTest.java (added)
+++ myfaces/html5/trunk/myfaces-html5-core/src/test/java/org/apache/myfaces/html5/renderkit/panel/DivRendererTest.java Sat Aug 27 15:56:35 2011
@@ -0,0 +1,76 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+package org.apache.myfaces.html5.renderkit.panel;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.apache.myfaces.html5.component.panel.Div;
+import org.apache.myfaces.html5.test.AbstractHtml5ViewControllerTestCase;
+import org.apache.myfaces.html5.test.HtmlCheckAttributesUtil;
+import org.apache.myfaces.html5.test.HtmlRenderedAttr;
+
+
+public class DivRendererTest extends AbstractHtml5ViewControllerTestCase {
+
+    private Div div;
+
+    public DivRendererTest(String name) {
+        super(name);
+    }
+
+    public static Test suite() {
+        return new TestSuite(DivRendererTest.class);
+    }
+
+    @Override
+    public void setUp() throws Exception {
+        super.setUp();
+        div = new Div();
+    }
+
+    @Override
+    public void tearDown() throws Exception {
+        super.tearDown();
+        div = null;
+    }
+
+    public void testPassThruHtmlProperties() throws Exception
+    {
+        HtmlRenderedAttr[] attrs = {
+            //Global Props
+            new HtmlRenderedAttr("dir"),
+            new HtmlRenderedAttr("lang"),
+            new HtmlRenderedAttr("style"),
+            new HtmlRenderedAttr("styleClass", "styleClass", "class=\"styleClass\""),
+            new HtmlRenderedAttr("title"),
+            new HtmlRenderedAttr("accesskey"),
+            new HtmlRenderedAttr("tabindex"),
+            //Html5 Global Props
+            new HtmlRenderedAttr("draggable", true, "draggable=\"true\""),
+            new HtmlRenderedAttr("hidden", true, "hidden=\"true\"")
+        };
+
+        HtmlCheckAttributesUtil.checkRenderedAttributes(div, facesContext, writer, attrs);
+        if(HtmlCheckAttributesUtil.hasFailedAttrRender(attrs))
+        {
+            fail(HtmlCheckAttributesUtil.constructErrorMessage(attrs, writer.getWriter().toString()));
+        }
+    }
+
+}

Modified: myfaces/html5/trunk/myfaces-html5-demo/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/html5/trunk/myfaces-html5-demo/pom.xml?rev=1162382&r1=1162381&r2=1162382&view=diff
==============================================================================
--- myfaces/html5/trunk/myfaces-html5-demo/pom.xml (original)
+++ myfaces/html5/trunk/myfaces-html5-demo/pom.xml Sat Aug 27 15:56:35 2011
@@ -96,7 +96,7 @@
         <dependency>
             <groupId>org.apache.myfaces.html5</groupId>
             <artifactId>myfaces-html5-core</artifactId>
-            <version>${parent.version}</version>
+            <version>${project.parent.version}</version>
         </dependency>
 
         <dependency>

Modified: myfaces/html5/trunk/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/html5/trunk/pom.xml?rev=1162382&r1=1162381&r2=1162382&view=diff
==============================================================================
--- myfaces/html5/trunk/pom.xml (original)
+++ myfaces/html5/trunk/pom.xml Sat Aug 27 15:56:35 2011
@@ -8,7 +8,7 @@
   ~ "License"); you may not use this file except in compliance
   ~ with the License.  You may obtain a copy of the License at
   ~
-  ~    http://www.apache.org/licenses/LICENSE-2.0
+  ~   http://www.apache.org/licenses/LICENSE-2.0
   ~
   ~ Unless required by applicable law or agreed to in writing,
   ~ software distributed under the License is distributed on an

Modified: myfaces/html5/trunk/src/site/site.xml
URL: http://svn.apache.org/viewvc/myfaces/html5/trunk/src/site/site.xml?rev=1162382&r1=1162381&r2=1162382&view=diff
==============================================================================
--- myfaces/html5/trunk/src/site/site.xml (original)
+++ myfaces/html5/trunk/src/site/site.xml Sat Aug 27 15:56:35 2011
@@ -8,7 +8,7 @@
   ~ "License"); you may not use this file except in compliance
   ~ with the License.  You may obtain a copy of the License at
   ~
-  ~    http://www.apache.org/licenses/LICENSE-2.0
+  ~   http://www.apache.org/licenses/LICENSE-2.0
   ~
   ~ Unless required by applicable law or agreed to in writing,
   ~ software distributed under the License is distributed on an