Package com.volantis.mcs.runtime.debug

Examples of com.volantis.mcs.runtime.debug.StrictStyledDOMHelper


     * Return an <img/> element from a simple DOM.
     *
     * @return
     */
    protected Element createImgElement() {
        StrictStyledDOMHelper domHelper = new StrictStyledDOMHelper();
        Document dom = domHelper.parse(
                "<html>" +
                        "<head>" +
                        "<title>Hello</title>" +
                        "</head>" +
                        "<body>" +
View Full Code Here


                               DOMProtocol protocol)
            throws IOException,
                   SAXException,
                   ParserConfigurationException {

        StrictStyledDOMHelper styledDOMHelper = new StrictStyledDOMHelper(null);
        Document document = styledDOMHelper.parse(inputXML);

        DOMTransformer transformer = new HighlightTransformer();
        transformer.transform(protocol, document);

        String actualXML = styledDOMHelper.render(document);

        Document styledDom = styledDOMHelper.parse(expectedXML);
        String canonicalExpectedXML = styledDOMHelper.render(styledDom);

        System.out.println("Expected: " + expectedXML);
        System.out.println("Actual  : " + actualXML);
        assertXMLEquals("Actual XML does not match expected XML",
                        canonicalExpectedXML,
View Full Code Here

                protocolSupportFactoryMock, protocolConfigurationMock);

        domProtocolMock.expects.getProtocolConfiguration().returns(
                protocolConfigurationMock).any();

        final StrictStyledDOMHelper domHelper = new StrictStyledDOMHelper();

        Document dom = domHelper.parse(input);
        final DOMTransformer transformer = new CSSRemappingTransformer();

        dom = transformer.transform(domProtocolMock, dom);

        assertXMLEquals("", expected, domHelper.render(dom));
    }
View Full Code Here

        // =====================================================================
        //   Test Expectations
        // =====================================================================
        DOMTransformer transformer = new DeferredInheritTransformer();

        StrictStyledDOMHelper helper = new StrictStyledDOMHelper(null);

        Document document = helper.parse(
                "<div style='text-align: -internal-deferred-inherit'>" +
                "<div style='text-align: -internal-deferred-inherit'>" +
                "<div style='text-align: right'>" +
                "<div style='text-align: -internal-deferred-inherit'/>" +
                "</div>" +
                "</div>" +
                "</div>" +
                "");
        Document transformed = transformer.transform(null, document);
        assertSame(document, transformed);

        String actual = helper.render(document);
        String expected = "<div>" +
                "<div>" +
                "<div style='text-align: right'>" +
                "<div/>" +
                "</div>" +
View Full Code Here

     * contain the stack trace of the IOException.
     *
     * @return a StringWriter - not null
     */
    private String getSerializedDocument() {
        StrictStyledDOMHelper strictStyledDOMHelper =
                new StrictStyledDOMHelper(null);
        return strictStyledDOMHelper.render(document);
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.runtime.debug.StrictStyledDOMHelper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.