// Return the gadget
return gadget;
}
private TestDefaultIframeUriManager makeManager(boolean alwaysToken, boolean ldRequired) {
ContainerConfig config = createMock(ContainerConfig.class);
String altContainer = CONTAINER + "-alt";
Collection<String> containers = Lists.newArrayList(CONTAINER, altContainer);
expect(config.getContainers()).andReturn(containers).anyTimes();
expect(config.getString(CONTAINER, IFRAME_BASE_PATH_KEY)).andReturn(IFRAME_PATH).anyTimes();
expect(config.getString(CONTAINER, LOCKED_DOMAIN_SUFFIX_KEY)).andReturn(LD_SUFFIX).anyTimes();
expect(config.getString(altContainer, LOCKED_DOMAIN_SUFFIX_KEY))
.andReturn(LD_SUFFIX_ALT).anyTimes();
expect(config.getString(CONTAINER, UNLOCKED_DOMAIN_KEY)).andReturn(UNLOCKED_DOMAIN).anyTimes();
expect(config.getBool(CONTAINER, SECURITY_TOKEN_ALWAYS_KEY)).andReturn(alwaysToken).anyTimes();
expect(config.getBool(CONTAINER, LOCKED_DOMAIN_REQUIRED_KEY)).andReturn(ldRequired).anyTimes();
replay(config);
return new TestDefaultIframeUriManager(config);
}