From d90cb9b61cd2e033b46f4780ad1340c5f35b7751 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 16 Jul 2017 17:26:58 -0700 Subject: Add image viewing and downloading (#63) * Commence aggressive image caching * Add glide toggle and css url parsing * Add image hook and refractor activities * Update version analytics * Implemented imageactivity but glide will not load * Create working image loader * Finalize image view * Finalize image view logic * Remove custom cache experiment --- .../kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'app/src/test/kotlin/com/pitchedapps/frost/facebook') diff --git a/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt index d7ec4b46..080132bd 100644 --- a/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt +++ b/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt @@ -1,5 +1,6 @@ package com.pitchedapps.frost.facebook +import okhttp3.HttpUrl import org.junit.Test import kotlin.test.assertEquals @@ -9,6 +10,11 @@ import kotlin.test.assertEquals */ class FbUrlTest { + fun assertFbFormat(expected: String, url: String) { + val fbUrl = FbUrlFormatter(url) + assertEquals(expected, fbUrl.toString(), "FbUrl Mismatch:\n${fbUrl.toLogList().joinToString("\n\t")}") + } + @Test fun base() { val url = "https://touch.facebook.com/relative/?asdf=1234&hjkl=7890" @@ -32,8 +38,10 @@ class FbUrlTest { assertFbFormat("$prefix$suffix", "$prefix&ref=hello$suffix") } - fun assertFbFormat(expected: String, url: String) { - val fbUrl = FbUrlFormatter(url) - assertEquals(expected, fbUrl.toString(), "FbUrl Mismatch:\n${fbUrl.toLogList().joinToString("\n\t")}") + @Test fun css() { + val expected = "https://test.com?efg=hi&oh=bye&oe=apple" + val orig = "https\\3a //test.com?efg\\3d hi\\26 oh\\3d bye\\26 oe\\3d apple" + assertFbFormat(expected, orig) } + } \ No newline at end of file -- cgit v1.2.3