use of com.liferay.faces.bridge.context.internal.PortalContextBridgeImpl in project liferay-faces-bridge-impl by liferay.
the class BridgePortalContextAjaxRequestTest method testBridgePortalContextAjaxRequest.
@Test
public void testBridgePortalContextAjaxRequest() {
boolean markupHeadElementSupport = true;
boolean ajaxRequest = true;
PortalContext portalContextBridgeImpl = new PortalContextBridgeImpl(new PortletRequestMockImpl(markupHeadElementSupport, ajaxRequest));
testBridgePortalContextAjaxRequest(portalContextBridgeImpl);
markupHeadElementSupport = false;
portalContextBridgeImpl = new PortalContextBridgeImpl(new PortletRequestMockImpl(markupHeadElementSupport, ajaxRequest));
testBridgePortalContextAjaxRequest(portalContextBridgeImpl);
}
use of com.liferay.faces.bridge.context.internal.PortalContextBridgeImpl in project liferay-faces-bridge-impl by liferay.
the class BridgePortalContextTest method testBridgePortalContext.
@Test
public void testBridgePortalContext() {
// PortalContextBridgeImpl should delegate to the portlet container to determine if the optional
// MARKUP_HEAD_ELEMENT feature is supported.
boolean markupHeadElementSupport = true;
PortalContext portalContextBridgeImpl = new PortalContextBridgeImpl(new PortletRequestMockImpl(markupHeadElementSupport));
Assert.assertEquals("true", portalContextBridgeImpl.getProperty(PortalContext.MARKUP_HEAD_ELEMENT_SUPPORT));
testBridgePortalContextAddToHeadSupport(portalContextBridgeImpl, markupHeadElementSupport);
// PortalContextBridgeImpl should delegate to the portlet container to determine if the optional
// MARKUP_HEAD_ELEMENT feature is supported.
markupHeadElementSupport = false;
portalContextBridgeImpl = new PortalContextBridgeImpl(new PortletRequestMockImpl(markupHeadElementSupport));
Assert.assertNull(portalContextBridgeImpl.getProperty(PortalContext.MARKUP_HEAD_ELEMENT_SUPPORT));
testBridgePortalContextAddToHeadSupport(portalContextBridgeImpl, markupHeadElementSupport);
}
Aggregations