diff --git a/test/freenet/client/filter/ContentFilterTest.java b/test/freenet/client/filter/ContentFilterTest.java index 774cf191fa..cb8b08624c 100644 --- a/test/freenet/client/filter/ContentFilterTest.java +++ b/test/freenet/client/filter/ContentFilterTest.java @@ -214,36 +214,36 @@ public void testHTMLFilter() throws Exception { public void testMetaRefresh() throws Exception { HTMLFilter.metaRefreshSamePageMinInterval = 5; HTMLFilter.metaRefreshRedirectMinInterval = 30; - assertEquals(META_TIME_ONLY + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_TIME_ONLY)); - assertEquals(META_TIME_ONLY + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_TIME_ONLY_WRONG_CASE)); - assertEquals(META_TIME_ONLY + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_TIME_ONLY_TOO_SHORT)); - assertEquals("" + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_TIME_ONLY_NEGATIVE)); - assertEquals(META_TIME_ONLY_BADNUM_OUT + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_TIME_ONLY_BADNUM1)); - assertEquals(META_TIME_ONLY_BADNUM_OUT + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_TIME_ONLY_BADNUM2)); - assertEquals(META_VALID_REDIRECT + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_VALID_REDIRECT)); - assertEquals(META_VALID_REDIRECT + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_VALID_REDIRECT_NOSPACE)); - assertEquals(META_BOGUS_REDIRECT1_OUT + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_BOGUS_REDIRECT1)); - assertEquals(META_BOGUS_REDIRECT1_OUT + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_BOGUS_REDIRECT2)); - assertEquals(META_BOGUS_REDIRECT3_OUT + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_BOGUS_REDIRECT3)); - assertEquals(META_BOGUS_REDIRECT4_OUT + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_BOGUS_REDIRECT4)); - assertEquals(META_BOGUS_REDIRECT1_OUT + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_BOGUS_REDIRECT5)); - assertEquals(META_BOGUS_REDIRECT_NO_URL + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_BOGUS_REDIRECT6)); + assertEquals(META_TIME_ONLY, headFilter(META_TIME_ONLY)); + assertEquals(META_TIME_ONLY, headFilter(META_TIME_ONLY_WRONG_CASE)); + assertEquals(META_TIME_ONLY, headFilter(META_TIME_ONLY_TOO_SHORT)); + assertEquals("", headFilter(META_TIME_ONLY_NEGATIVE)); + assertEquals(META_TIME_ONLY_BADNUM_OUT, headFilter(META_TIME_ONLY_BADNUM1)); + assertEquals(META_TIME_ONLY_BADNUM_OUT, headFilter(META_TIME_ONLY_BADNUM2)); + assertEquals(META_VALID_REDIRECT, headFilter(META_VALID_REDIRECT)); + assertEquals(META_VALID_REDIRECT, headFilter(META_VALID_REDIRECT_NOSPACE)); + assertEquals(META_BOGUS_REDIRECT1_OUT, headFilter(META_BOGUS_REDIRECT1)); + assertEquals(META_BOGUS_REDIRECT1_OUT, headFilter(META_BOGUS_REDIRECT2)); + assertEquals(META_BOGUS_REDIRECT3_OUT, headFilter(META_BOGUS_REDIRECT3)); + assertEquals(META_BOGUS_REDIRECT4_OUT, headFilter(META_BOGUS_REDIRECT4)); + assertEquals(META_BOGUS_REDIRECT1_OUT, headFilter(META_BOGUS_REDIRECT5)); + assertEquals(META_BOGUS_REDIRECT_NO_URL, headFilter(META_BOGUS_REDIRECT6)); HTMLFilter.metaRefreshSamePageMinInterval = -1; HTMLFilter.metaRefreshRedirectMinInterval = -1; - assertEquals("" + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_TIME_ONLY)); - assertEquals("" + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_TIME_ONLY_WRONG_CASE)); - assertEquals("" + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_TIME_ONLY_TOO_SHORT)); - assertEquals("" + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_TIME_ONLY_NEGATIVE)); - assertEquals("" + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_TIME_ONLY_BADNUM1)); - assertEquals("" + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_TIME_ONLY_BADNUM2)); - assertEquals("" + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_VALID_REDIRECT)); - assertEquals("" + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_VALID_REDIRECT_NOSPACE)); - assertEquals("" + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_BOGUS_REDIRECT1)); - assertEquals("" + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_BOGUS_REDIRECT2)); - assertEquals("" + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_BOGUS_REDIRECT3)); - assertEquals("" + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_BOGUS_REDIRECT4)); - assertEquals("" + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_BOGUS_REDIRECT5)); - assertEquals("" + HTMLFilter.m3uPlayerScriptTagContent(), headFilter(META_BOGUS_REDIRECT6)); + assertEquals("", headFilter(META_TIME_ONLY)); + assertEquals("", headFilter(META_TIME_ONLY_WRONG_CASE)); + assertEquals("", headFilter(META_TIME_ONLY_TOO_SHORT)); + assertEquals("", headFilter(META_TIME_ONLY_NEGATIVE)); + assertEquals("", headFilter(META_TIME_ONLY_BADNUM1)); + assertEquals("", headFilter(META_TIME_ONLY_BADNUM2)); + assertEquals("", headFilter(META_VALID_REDIRECT)); + assertEquals("", headFilter(META_VALID_REDIRECT_NOSPACE)); + assertEquals("", headFilter(META_BOGUS_REDIRECT1)); + assertEquals("", headFilter(META_BOGUS_REDIRECT2)); + assertEquals("", headFilter(META_BOGUS_REDIRECT3)); + assertEquals("", headFilter(META_BOGUS_REDIRECT4)); + assertEquals("", headFilter(META_BOGUS_REDIRECT5)); + assertEquals("", headFilter(META_BOGUS_REDIRECT6)); } private String headFilter(String data) throws Exception {