Examples of StrictStyledDOMHelper


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

    }

    protected void setUp() throws Exception {
        super.setUp();

        helper = new StrictStyledDOMHelper(null);

        internalDevice = InternalDeviceTestHelper.createTestDevice();
    }
View Full Code Here

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

    private StrictStyledDOMHelper helper;

    protected void setUp() throws Exception {
        super.setUp();

        setStrictStyledDOMHelper(new StrictStyledDOMHelper(null));
    }
View Full Code Here

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

    // javadoc inherited
    protected void setUp() throws Exception {
        super.setUp();

        helper = new StrictStyledDOMHelper(null);
        analyser = StylePropertyAnalyser.getInstance();
    }
View Full Code Here

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

public class DefaultCSSTestCase
        extends TestCaseAbstract {

    public void testXFTextMUSelectRows() throws Exception {

        StrictStyledDOMHelper helper = new StrictStyledDOMHelper();
        Document document = helper.parse("<xfmuselect/>");
        Element root = document.getRootElement();
        StyleValue rows = root.getStyles().getPropertyValues()
                .getStyleValue(StylePropertyDetails.MCS_ROWS);
        assertEquals(StyleValueFactory.getDefaultInstance().getInteger(null, 4),
                rows);
View Full Code Here

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

public class InlineStylesIntegrationTestCase extends TestCaseAbstract {

    private StrictStyledDOMHelper strictStyledDOMHelper;

    public void setUp() {
        strictStyledDOMHelper = new StrictStyledDOMHelper(null) {
            public Document parse(InputStream inputStream) {
                return super.parse(inputStream);
            }

            protected StyleSheetCompilerFactory getStyleSheetCompilerFactory() {
View Full Code Here

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

            String expectedXML) throws
            IOException,
            SAXException,
            ParserConfigurationException {

        StrictStyledDOMHelper helper = new StrictStyledDOMHelper(null);

        Document document = helper.parse(inputXML);

        ReplacementPseudoElementFactory replacementPseudoElementFactory =
                new DefaultReplacementPseudoElementFactory(createDOMProtocol());
        PseudoElementDOMTransformer transformer =
                new PseudoElementDOMTransformer(
                        replacementPseudoElementFactory);
        transformer.transform(null,
                document);

        String actualXML = helper.render(document);
        String canonicalExpectedXML = helper.normalize(expectedXML);
        assertXMLEquals("Actual XML does not match expected XML",
                canonicalExpectedXML,
                actualXML);
    }
View Full Code Here

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

                               String expectedXML)
            throws IOException,
                   SAXException,
                   ParserConfigurationException {

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

        DOMTransformer transformer = new MarkerDOMTransformer();
        transformer.transform(createDOMProtocol(), document);

        String actualXML = styledDOMHelper.render(document);

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

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

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

    private StrictStyledDOMHelper helper;

    protected void setUp() throws Exception {
        super.setUp();

        helper = new StrictStyledDOMHelper(null);
    }
View Full Code Here

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

public abstract class HrEmulationTestAbstract extends TestCaseAbstract {

    protected StrictStyledDOMHelper helper;

    public HrEmulationTestAbstract() {
        helper = new StrictStyledDOMHelper(null);
    }
View Full Code Here

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

                .returns(DevicePolicyConstants.PROTOCOL_CSS_EMULATE_WIDTH_TABLE__NONE)
                .any();

        deviceMock.expects.getPixelsX().returns(deviceWidth).any();

        StrictStyledDOMHelper helper = new StrictStyledDOMHelper(null, "STYLE");

        Document document = helper.parse(/*getClass().getResourceAsStream(
                "width-percentages-attributes1-input.xml")*/
                input);

        XHTMLMobile1_0_UnabridgedTransformer transformer =
                new XHTMLMobile1_0_UnabridgedTransformer(transformationConfigurationMock);

        // Don't render the document out before transforming as it is
        // destructive and loses the styles.
//        String before = helper.render(document);
//        System.out.println("before: " + before);
//
        MutableStylePropertySet interesting =
                         new MutableStylePropertySetImpl();
        interesting.add(StylePropertyDetails.WIDTH);
        DebugStyledDocument debugStyledDocument;

        debugStyledDocument = new DebugStyledDocument(interesting);
        String before = debugStyledDocument.debug(document);

        document = transformer.transform(protocolMock, document);

        debugStyledDocument = new DebugStyledDocument(interesting);
        String after = debugStyledDocument.debug(document);

        String result = helper.render(document);

        boolean failed = true;
        try {
            assertXMLEquals("Transformed document does not match", expected, result);
            failed = false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.