returns("url-for-the-script-variant").any();
assetResolverMock.expects
.rewriteURLWithPageURLRewriter("url-for-the-script-variant", PageURLType.SCRIPT)
.returns("url-for-the-script-variant").any();
final DOMProtocol protocol = createProtocol();
requestContextMock.expects.
getMarinerPageContext().returns(pageContextMock).any();
final StylingEngine stylingEngine = getStylingEngine();
final PaneInstanceMock paneInstance = getPaneInstance();
pageContextMock.expects.enteringXDIMECPElement().any();
pageContextMock.expects.insideXDIMECPElement().returns(false).any();
pageContextMock.expects.exitingXDIMECPElement().any();
pageContextMock.expects.getStylingEngine().returns(stylingEngine).any();
pageContextMock.expects.getCurrentContainerInstance().
returns(paneInstance).any();
pageContextMock.expects.initialisedCanvas().returns(true).any();
pageContextMock.expects.getProtocol().returns(protocol).any();
pageContextMock.fuzzy.pushOutputBuffer(
mockFactory.expectsInstanceOf(DOMOutputBuffer.class)).does(
new MethodAction() {
public Object perform(MethodActionEvent event)
throws Throwable {
Object buffer = event.getArgument(OutputBuffer.class);
outputBufferStack.push(buffer);
return null;
}
}).any();
pageContextMock.fuzzy.popOutputBuffer(
mockFactory.expectsInstanceOf(DOMOutputBuffer.class)).does(
new MethodAction() {
public Object perform(MethodActionEvent event)
throws Throwable {
return outputBufferStack.pop();
}
}).any();
pageContextMock.expects.getCurrentOutputBuffer().does(
new MethodAction() {
public Object perform(MethodActionEvent event) throws Throwable {
return outputBufferStack.peek();
}
}).any();
pageContextMock.expects.getVolantisBean().returns(volantisBeanMock).any();
pageContextMock.expects.getPolicyReferenceFactory().returns(
policyReferenceFactoryMock).any();
pageContextMock.fuzzy.getDevicePolicyValue(mockFactory.expectsAny()).
returns(null).any();
pageContextMock.expects.getPolicyReferenceResolver().returns(null).any();
pageContextMock.expects.getAssetResolver().returns(assetResolverMock).
any();
pageContextMock.expects.getCurrentProject().returns(runtimeProjectMock).
any();
pageContextMock.expects.getBaseURL().returns(null).any();
protocol.setMarinerPageContext(pageContextMock);
protocol.initialiseCanvas();
final ExpressionFactory expressionFactory =
ExpressionFactory.getDefaultInstance();
final NamespacePrefixTracker prefixTracker =
NamespaceFactory.getDefaultInstance().createPrefixTracker();