public void ContentTypeIsTextCss() { CssResponse.WriteHeaders(); CssResponse.WriteCss(null); HttpResponse.VerifySet(r => r.ContentType = "text/css", Times.Once()); }
public void CssIsWrittenToResponse() { var str = "testing"; CssResponse.WriteCss(str); HttpResponse.Verify(r => r.Write(str), Times.Once()); }
public void Process(ISemanticProcessor proc, IMembrane membrane, CssResponse resp) { byte[] utf8data = resp.Script.to_Utf8(); resp.Context.Response.ContentType = "text/css"; resp.Context.Response.ContentEncoding = Encoding.UTF8; resp.Context.Response.ContentLength64 = utf8data.Length; resp.Context.Response.OutputStream.Write(utf8data, 0, utf8data.Length); resp.Context.Response.Close(); }
public void Process(ISemanticProcessor proc, IMembrane membrane, CssResponse resp) { // resp.Context.Response.ContentLength64 = resp.Script.Length; if (resp.Context.Request.AcceptEncoding) { resp.Context.Response.WriteCompressed(resp.Script, "text/css"); } else { resp.Context.Response.Write(resp.Script, "text/css"); } }
public void Setup() { CssResponse = new CssResponse(Http.Object, false); CompressedCssResponse = new CssResponse(Http.Object, true); }
public void Setup() { CssResponse = new CssResponse(Http.Object); }
public void Process(ISemanticProcessor proc, IMembrane membrane, CssResponse resp) { // resp.Context.Response.ContentLength64 = resp.Script.Length; resp.Context.Response.Write(resp.Script, "text/css"); }