urbanairship-core/src/test/java/com/urbanairship/js/WhitelistTest.java
@Test
    public void testEmptyWhiteList() {
        assertFalse(whitelist.isWhitelisted(null, Whitelist.SCOPE_JAVASCRIPT_INTERFACE));
        assertFalse(whitelist.isWhitelisted("", Whitelist.SCOPE_OPEN_URL));
        assertFalse(whitelist.isWhitelisted("urbanairship.com", Whitelist.SCOPE_JAVASCRIPT_INTERFACE));
        assertFalse(whitelist.isWhitelisted("www.urbanairship.com", Whitelist.SCOPE_OPEN_URL));
        assertFalse(whitelist.isWhitelisted("http://www.urbanairship.com", Whitelist.SCOPE_JAVASCRIPT_INTERFACE));
        assertFalse(whitelist.isWhitelisted("https://www.urbanairship.com", Whitelist.SCOPE_OPEN_URL));
        assertFalse(whitelist.isWhitelisted("http://www.urbanairship.com/what", Whitelist.SCOPE_JAVASCRIPT_INTERFACE));
        assertFalse(whitelist.isWhitelisted("file:///*", Whitelist.SCOPE_OPEN_URL));
    }
/**
     * Test an empty white list rejects all URLs.
     */
Test an empty white list rejects all URLs.
Test an empty white list rejects all URLs .
@Test
    public void testEmptyWhiteList() {
        assertFalse(whitelist.isWhitelisted(null, Whitelist.SCOPE_JAVASCRIPT_INTERFACE));
        assertFalse(whitelist.isWhitelisted("", Whitelist.SCOPE_OPEN_URL));
        assertFalse(whitelist.isWhitelisted("urbanairship.com", Whitelist.SCOPE_JAVASCRIPT_INTERFACE));
        assertFalse(whitelist.isWhitelisted("www.urbanairship.com", Whitelist.SCOPE_OPEN_URL));
        assertFalse(whitelist.isWhitelisted("http://www.urbanairship.com", Whitelist.SCOPE_JAVASCRIPT_INTERFACE));
        assertFalse(whitelist.isWhitelisted("https://www.urbanairship.com", Whitelist.SCOPE_OPEN_URL));
        assertFalse(whitelist.isWhitelisted("http://www.urbanairship.com/what", Whitelist.SCOPE_JAVASCRIPT_INTERFACE));
        assertFalse(whitelist.isWhitelisted("file:///*", Whitelist.SCOPE_OPEN_URL));
    }
@ Test public void testEmptyWhiteList ( ) { assertFalse ( whitelist . isWhitelisted ( null , Whitelist . SCOPE_JAVASCRIPT_INTERFACE ) ) ; assertFalse ( whitelist . isWhitelisted ( "" , Whitelist . SCOPE_OPEN_URL ) ) ; assertFalse ( whitelist . isWhitelisted ( "urbanairship.com" , Whitelist . SCOPE_JAVASCRIPT_INTERFACE ) ) ; assertFalse ( whitelist . isWhitelisted ( "www.urbanairship.com" , Whitelist . SCOPE_OPEN_URL ) ) ; assertFalse ( whitelist . isWhitelisted ( "http://www.urbanairship.com" , Whitelist . SCOPE_JAVASCRIPT_INTERFACE ) ) ; assertFalse ( whitelist . isWhitelisted ( "https://www.urbanairship.com" , Whitelist . SCOPE_OPEN_URL ) ) ; assertFalse ( whitelist . isWhitelisted ( "http://www.urbanairship.com/what" , Whitelist . SCOPE_JAVASCRIPT_INTERFACE ) ) ; assertFalse ( whitelist . isWhitelisted ( "file:///*" , Whitelist . SCOPE_OPEN_URL ) ) ; }
Test an empty white list rejects all URLs.
Test an empty white list rejects all URLs .