// using custom RecordingReplayParseContext for testing actual rewrite. This is more than
// a unit test of JSStringTransformer, but it is useful to capture bugs caused by inconsistency
// among JSStringTransformer, ReplayParseContext and ResultURIConverterFactory (hopefully
// they should be refactored into coherent, easier-to-test components.) this is a common
// setup for proxy-mode (IdentityResultURIConverterFactory returns ProxyHttpsResultURIConverter.)
IdentityResultURIConverterFactory uriConverterFactory = new IdentityResultURIConverterFactory();
rc = new RecordingReplayParseContext(uriConverterFactory, baseURL, null);
rc.setRewriteHttpsOnly(true);
// Note: ParseContext.resolve(String) uses UsableURIFactory.getInstance() for
// making URL absolute. It not only prepends baseURL but also removes escaping