Examples of TestMarinerPageContext


Examples of com.volantis.mcs.context.TestMarinerPageContext

        //protocol.addStyleMapping(atts, style);
        TestDOMOutputBuffer buffer = new TestDOMOutputBuffer();


        TestMarinerPageContext testPageContext =
                (TestMarinerPageContext)protocol.getMarinerPageContext();
        testPageContext.setFormFragmentResetState(true);

        testable.setCurrentBuffer(atts.getEntryContainerInstance(), buffer);

        StringBuffer sb = new StringBuffer();
View Full Code Here

Examples of com.volantis.mcs.context.TestMarinerPageContext

        propertyValues.setComputedValue(
                StylePropertyDetails.MCS_MENU_ORIENTATION,
                vertical ? MCSMenuOrientationKeywords.VERTICAL
                : MCSMenuOrientationKeywords.HORIZONTAL);

        TestMarinerPageContext testPageContext =
                (TestMarinerPageContext)protocol.getMarinerPageContext();
        testPageContext.setFormFragmentResetState(true);

       testable.setCurrentBuffer(atts.getEntryContainerInstance(), buffer);

       String type = (multiSelect) ? "checkbox" : "radio";
       String seperator = (vertical) ? "<br/>" : "\u00a0";
View Full Code Here

Examples of com.volantis.mcs.context.TestMarinerPageContext

    public void testDoImage() throws Exception {
        DOMOutputBuffer buffer = new DOMOutputBuffer();
        buffer.initialise();

        // Needed to allow the call to getTextFromReference within doImage to work
        context = new TestMarinerPageContext();

        protocol.setMarinerPageContext(context);

        ImageAttributes attrs = new ImageAttributes();
        attrs.setSrc("http://www.volantis.com/my_image.jpg");
View Full Code Here

Examples of com.volantis.mcs.context.TestMarinerPageContext

     * Test the adding of grid attributes
     */
    public void testAddGridAttributes() throws Exception {
        MarinerRequestContext requestContext = new TestMarinerRequestContext();
        resetElement();
        context = new TestMarinerPageContext();
        context.pushRequestContext(requestContext);
        context.setDeviceName("PC");
        context.setDevice(INTERNAL_DEVICE_FACTORY.createInternalDevice(
            new DefaultDevice(DEVICE_NAME, new HashMap(), null)));
        protocol.setMarinerPageContext(context);
View Full Code Here

Examples of com.volantis.mcs.context.TestMarinerPageContext

        ProtocolBuilder builder = new ProtocolBuilder();
        VolantisProtocol protocol = builder.build(
                new TestProtocolRegistry.TestXHTMLBasicFactory(),
                InternalDeviceTestHelper.createTestDevice());

        privateSetUp(protocol, new TestMarinerPageContext());

        // Element start should return SKIP ELEMENT BODY as XHTMLBasic
        // does not support script.
        int i = element.elementStart(requestContext,attributes );       
        assertEquals("Wrong code returned by elementStart",
View Full Code Here

Examples of com.volantis.mcs.context.TestMarinerPageContext

     * for the com.volantis.mcs.protocols.DOMProtocol class.
     */
    public void testWriteImage()
        throws Exception {
        privateSetUp();
        TestMarinerPageContext context = new TestMarinerPageContext();
        context.pushRequestContext(requestContext);
        protocol.setMarinerPageContext(context);
        DOMOutputBuffer buffer = new TestDOMOutputBuffer();
        context.setCurrentOutputBuffer(buffer);
        context.setCurrentPane(new Pane(new CanvasLayout()));

        CanvasLayout canvasLayout = new CanvasLayout();

        Pane pane = new Pane(canvasLayout);
        pane.setWidth("100");
View Full Code Here

Examples of com.volantis.mcs.context.TestMarinerPageContext

                      attributes.getHeight());
    }

    public void testWritePageHead() throws Exception {
        privateSetUp();
        TestMarinerPageContext context = new TestMarinerPageContext();
        context.pushRequestContext(requestContext);
        context.setBooleanDevicePolicyValue(DOMProtocol.SUPPORTS_JAVASCRIPT, true);
        protocol.setMarinerPageContext(context);
        context.setProtocol(protocol);

        protocol.writePageHead();
        stringWriter.flush();
        // NOTE: see to do below for why this looks so weird
        assertEquals("DOMProtocol.writePageHead generated incorrect output",
View Full Code Here

Examples of com.volantis.mcs.context.TestMarinerPageContext

                     stringWriter.toString());
    }

    public void testDoMeta() throws Exception {
        privateSetUp();
        TestMarinerPageContext pageContext = new TestMarinerPageContext();
        protocol.setMarinerPageContext(pageContext);

        DOMOutputBuffer buffer = new DOMOutputBuffer();
        buffer.initialise();
View Full Code Here

Examples of com.volantis.mcs.context.TestMarinerPageContext

    public void testSpatialFormatIterator() throws Exception {
        privateSetUp();

        MarinerRequestContext requestContext
            = new TestMarinerRequestContext();
        TestMarinerPageContext context = new TestMarinerPageContext();
        context.pushRequestContext(requestContext);
        protocol.setMarinerPageContext(context);
        DOMOutputBuffer buffer = new TestDOMOutputBuffer();
        context.setCurrentOutputBuffer(buffer);
        InternalDevice d = INTERNAL_DEVICE_FACTORY.createInternalDevice(
            new DefaultDevice("Netscape4", new HashMap(), null));
        context.setDevice(d);
        context.setDeviceName("Netscape4");

        // Activate the device layout.
        // Activate the device layout.
        RuntimeDeviceLayout runtimeDeviceLayout1 =
                RuntimeDeviceLayoutTestHelper.activate(canvasLayout);
        RuntimeDeviceLayout runtimeDeviceLayout =
                runtimeDeviceLayout1;

        TestDeviceLayoutContext deviceLayoutContext = new TestDeviceLayoutContext();
        deviceLayoutContext.setDeviceLayout(runtimeDeviceLayout);
        context.pushDeviceLayoutContext(deviceLayoutContext);

        protocol.writeOpenSpatialFormatIterator(
            getSpatialFormatIteratorAttributes());
        protocol.writeOpenSpatialFormatIteratorRow(
            getSpatialFormatIteratorAttributes());
View Full Code Here

Examples of com.volantis.mcs.context.TestMarinerPageContext

    // javadoc inherited
    public void testAddAnchorAttributesLinkStyle() throws Exception {

        // Set up the required contexts
        MarinerRequestContext requestContext = new TestMarinerRequestContext();
        TestMarinerPageContext context = new TestMarinerPageContext();
        context.pushRequestContext(requestContext);
        ContextInternals.setMarinerPageContext(requestContext, context);
        testable.setStyleSheetRenderer(CSSStyleSheetRenderer.getSingleton());
        context.setDeviceName("PC-Win32-IE5.5");
        protocol.setMarinerPageContext(context);

        AnchorAttributes attributes = new AnchorAttributes();
        attributes.setStyles(StylesBuilder.getInitialValueStyles());
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.