Search in sources :

Example 1 with Html5MarkupModel

use of org.apache.tapestry5.dom.Html5MarkupModel in project tapestry-5 by apache.

the class DOMTest method html5_void_elements.

/**
 * TAP5-2071
 */
@Test
public void html5_void_elements() {
    final List<String> voidElements = CollectionFactory.newList("area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr");
    MarkupWriter writer = new MarkupWriterImpl(new Html5MarkupModel());
    writer.element("html");
    for (String element : voidElements) {
        writer.element(element);
        writer.end();
    }
    writer.end();
    assertEquals(writer.toString(), "<html><area><base><br><col><command><embed><hr><img><input><keygen><link><meta><param><source><track><wbr></html>");
}
Also used : MarkupWriterImpl(org.apache.tapestry5.internal.services.MarkupWriterImpl) MarkupWriter(org.apache.tapestry5.MarkupWriter) Test(org.testng.annotations.Test)

Aggregations

MarkupWriter (org.apache.tapestry5.MarkupWriter)1 MarkupWriterImpl (org.apache.tapestry5.internal.services.MarkupWriterImpl)1 Test (org.testng.annotations.Test)1