X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=tests%2Forg%2Fcacert%2Fgigi%2FTestSecurityHeaders.java;h=ddff38ee2c096ac8b9d3e6da687d2014e503e35d;hb=480cb29387c76ccc19f8fa8fb0abe8ae1b069730;hp=9df4e22c978de866e2ce3140ee566005ad75a9e1;hpb=d6aa4dd32a3135e877224b0f75a3838852a714ad;p=gigi.git diff --git a/tests/org/cacert/gigi/TestSecurityHeaders.java b/tests/org/cacert/gigi/TestSecurityHeaders.java index 9df4e22c..ddff38ee 100644 --- a/tests/org/cacert/gigi/TestSecurityHeaders.java +++ b/tests/org/cacert/gigi/TestSecurityHeaders.java @@ -10,22 +10,21 @@ import org.junit.Test; import static org.junit.Assert.*; public class TestSecurityHeaders extends ManagedTest { - @Test - public void testSTS() throws IOException { - HttpURLConnection uc = (HttpURLConnection) new URL("https://" - + getServerName()).openConnection(); - assertNotNull(uc.getHeaderField("Strict-Transport-Security")); - } - - public void testCSP() throws IOException { - HttpURLConnection uc = (HttpURLConnection) new URL("https://" - + getServerName()).openConnection(); - assertNotNull(uc.getHeaderField("Content-Security-Policy")); - } - public void testAllowOrigin() throws IOException { - HttpURLConnection uc = (HttpURLConnection) new URL("https://" - + getServerName()).openConnection(); - assertNotNull(uc.getHeaderField("Access-Control-Allow-Origin")); - - } + + @Test + public void testSTS() throws IOException { + HttpURLConnection uc = (HttpURLConnection) new URL("https://" + getServerName()).openConnection(); + assertNotNull(uc.getHeaderField("Strict-Transport-Security")); + } + + public void testCSP() throws IOException { + HttpURLConnection uc = (HttpURLConnection) new URL("https://" + getServerName()).openConnection(); + assertNotNull(uc.getHeaderField("Content-Security-Policy")); + } + + public void testAllowOrigin() throws IOException { + HttpURLConnection uc = (HttpURLConnection) new URL("https://" + getServerName()).openConnection(); + assertNotNull(uc.getHeaderField("Access-Control-Allow-Origin")); + + } }