]> WPIA git - gigi.git/blobdiff - tests/org/cacert/gigi/TestSecurityHeaders.java
Merge remote-tracking branch 'origin/libs/scrypt/local'
[gigi.git] / tests / org / cacert / gigi / TestSecurityHeaders.java
index 9df4e22c978de866e2ce3140ee566005ad75a9e1..16f4f3a08580c4d7f5b50d00038b63b8b2cd0b72 100644 (file)
@@ -1,5 +1,7 @@
 package org.cacert.gigi;
 
+import static org.junit.Assert.*;
+
 import java.io.IOException;
 import java.net.HttpURLConnection;
 import java.net.URL;
@@ -7,25 +9,22 @@ import java.net.URL;
 import org.cacert.gigi.testUtils.ManagedTest;
 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"));
+
+    }
 }