Examples of HeterogeneousShorthandOptimizer


Examples of com.volantis.mcs.dom2theme.impl.optimizer.HeterogeneousShorthandOptimizer

        // =====================================================================
        //   Test Expectations
        // =====================================================================

        ShorthandOptimizer optimizer = new HeterogeneousShorthandOptimizer(
                StyleShorthands.BACKGROUND, checkerMock,
                shorthandSetMock);

        setPropertyValue(inputValues,
                StylePropertyDetails.BACKGROUND_ATTACHMENT,
                OptimizerHelper.ANY,
                PropertyStatus.REQUIRED);

        setPropertyValue(inputValues,
                StylePropertyDetails.BACKGROUND_IMAGE,
                BackgroundImageKeywords.NONE,
                PropertyStatus.REQUIRED);

        MutableStyleProperties outputValues =
            ThemeFactory.getDefaultInstance().createMutableStyleProperties();

        optimizer.optimize(TargetEntity.ELEMENT, inputValues, outputValues,
                deviceValuesMock);

        assertEquals("background-attachment:scroll;background-image:none",
                outputValues.getStandardCSS());
    }
View Full Code Here

Examples of com.volantis.mcs.dom2theme.impl.optimizer.HeterogeneousShorthandOptimizer

        // =====================================================================
        //   Test Expectations
        // =====================================================================

        ShorthandOptimizer optimizer = new HeterogeneousShorthandOptimizer(
                StyleShorthands.BACKGROUND, checkerMock,
                shorthandSetMock);

        setPropertyValue(inputValues,
                StylePropertyDetails.BACKGROUND_ATTACHMENT,
                BackgroundAttachmentKeywords.FIXED,
                PropertyStatus.CLEARABLE);

        setPropertyValue(inputValues,
                StylePropertyDetails.BACKGROUND_COLOR,
                StyleColorNames.RED,
                PropertyStatus.REQUIRED);

        MutableStyleProperties outputValues =
            ThemeFactory.getDefaultInstance().createMutableStyleProperties();

        optimizer.optimize(TargetEntity.ELEMENT, inputValues, outputValues,
                deviceValuesMock);

        assertEquals("background-color:red",
                outputValues.getStandardCSS());
    }
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.