*/
public class CachingWebDriverTestCase extends WebDriverTestAbstract {
// JavaDoc inherited
protected XMLPipelineConfiguration createPipelineConfiguration() {
final XMLPipelineConfiguration config =
super.createPipelineConfiguration();
final ConnectionConfiguration connectionConfiguration =
new ConnectionConfigurationImpl();
connectionConfiguration.setCachingEnabled(true);
connectionConfiguration.setMaxCacheEntries(1000);
config.storeConfiguration(
ConnectionConfiguration.class, connectionConfiguration);
final URLContentCacheConfiguration urlConfig =
new URLContentCacheConfiguration(config);
WebDriverConfigurationImpl webdConf = new WebDriverConfigurationImpl() {
// JavaDoc inherited
PluggableHTTPManager getPluggableHTTPManager(String protocol) {
return new CachingPluggableHTTPManager(
new HTTPClientPluggableHTTPManager(), urlConfig.getCache());
}
};
config.storeConfiguration(WebDriverConfiguration.class, webdConf);
return config;
}