@Test public void testRewriteInefficientPNG() throws Exception { HttpResponse resp = createResponse("org/apache/shindig/gadgets/rewrite/image/inefficient.png", "image/png"); HttpResponse httpResponse = rewrite(resp); assertTrue(httpResponse.getContentLength() <= resp.getContentLength()); assertEquals("image/png", httpResponse.getHeader("Content-Type")); }
@Test public void testRewriteInefficientPNG() throws Exception { HttpResponse resp = createResponse("org/apache/shindig/gadgets/rewrite/image/inefficient.png", "image/png"); HttpResponse httpResponse = rewrite(resp); assertTrue(httpResponse.getContentLength() <= resp.getContentLength()); assertEquals("image/png", httpResponse.getHeader("Content-Type")); }
@Test public void testStripAlpha() throws Exception { HttpResponse resp = createResponse("org/apache/shindig/gadgets/rewrite/image/rgbawithnoalpha.png", "image/png"); HttpResponse httpResponse = rewrite(resp); assertTrue(httpResponse.getContentLength() <= resp.getContentLength()); assertEquals("image/png", httpResponse.getHeader("Content-Type")); }
@Test public void testRewriteInefficientPNG() throws Exception { HttpResponse resp = createResponse("org/apache/shindig/gadgets/rewrite/image/inefficient.png", "image/png"); HttpResponse httpResponse = rewrite(resp); assertTrue(httpResponse.getContentLength() <= resp.getContentLength()); assertEquals("image/png", httpResponse.getHeader("Content-Type")); }
@Test public void testStripAlpha() throws Exception { HttpResponse resp = createResponse("org/apache/shindig/gadgets/rewrite/image/rgbawithnoalpha.png", "image/png"); HttpResponse httpResponse = rewrite(resp); assertTrue(httpResponse.getContentLength() <= resp.getContentLength()); assertEquals("image/png", httpResponse.getHeader("Content-Type")); }
@Test public void testStripAlpha() throws Exception { HttpResponse resp = createResponse("org/apache/shindig/gadgets/rewrite/image/rgbawithnoalpha.png", "image/png"); HttpResponse httpResponse = rewrite(resp); assertTrue(httpResponse.getContentLength() <= resp.getContentLength()); assertEquals("image/png", httpResponse.getHeader("Content-Type")); }