summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2013-10-15 05:06:26 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-10-15 05:06:26 -0700
commitb2399f3f64d18b0369d5f7629a0b82b7a0731f1b (patch)
tree18b89dd3944473834a3587abc4188734e0659379 /tests
parenta88be57087a77e8180c767a8b1dc91e4a7b1d4fd (diff)
parent2101df58f975b352a289505351a029ed9fa4edbd (diff)
downloadframeworks_base-b2399f3f64d18b0369d5f7629a0b82b7a0731f1b.zip
frameworks_base-b2399f3f64d18b0369d5f7629a0b82b7a0731f1b.tar.gz
frameworks_base-b2399f3f64d18b0369d5f7629a0b82b7a0731f1b.tar.bz2
am 2101df58: am 496fd28f: am d394355d: Delete HttpHeaderTest.testCacheControlMultipleArguments.
* commit '2101df58f975b352a289505351a029ed9fa4edbd': Delete HttpHeaderTest.testCacheControlMultipleArguments.
Diffstat (limited to 'tests')
-rw-r--r--tests/CoreTests/android/core/HttpHeaderTest.java38
1 files changed, 0 insertions, 38 deletions
diff --git a/tests/CoreTests/android/core/HttpHeaderTest.java b/tests/CoreTests/android/core/HttpHeaderTest.java
index eedbc3f..cc7c34c 100644
--- a/tests/CoreTests/android/core/HttpHeaderTest.java
+++ b/tests/CoreTests/android/core/HttpHeaderTest.java
@@ -20,10 +20,6 @@ import org.apache.http.util.CharArrayBuffer;
import android.net.http.Headers;
import android.util.Log;
-import android.webkit.CacheManager;
-import android.webkit.CacheManager.CacheResult;
-
-import java.lang.reflect.Method;
public class HttpHeaderTest extends AndroidTestCase {
@@ -67,38 +63,4 @@ public class HttpHeaderTest extends AndroidTestCase {
assertEquals("max-age=15,private", h.getCacheControl());
}
- // Test that cache behaves correctly when receiving a compund
- // cache-control statement containing no-cache and max-age argument.
- //
- // If a cache control header contains both a max-age arument and
- // a no-cache argument the max-age argument should be ignored.
- // The resource can be cached, but a validity check must be done on
- // every request. Test case checks that the expiry time is 0 for
- // this item, so item will be validated on subsequent requests.
- public void testCacheControlMultipleArguments() throws Exception {
- // get private method CacheManager.parseHeaders()
- Method m = CacheManager.class.getDeclaredMethod("parseHeaders",
- new Class[] {int.class, Headers.class, String.class});
- m.setAccessible(true);
-
- // create indata
- Headers h = new Headers();
- CharArrayBuffer buffer = new CharArrayBuffer(64);
- buffer.append(CACHE_CONTROL_COMPOUND);
- h.parseHeader(buffer);
-
- CacheResult c = (CacheResult)m.invoke(null, 200, h, "text/html");
-
- // Check that expires is set to 0, to ensure that no-cache has overridden
- // the max-age argument
- assertEquals(0, c.getExpires());
-
- // check reverse order
- buffer.clear();
- buffer.append(CACHE_CONTROL_COMPOUND2);
- h.parseHeader(buffer);
-
- c = (CacheResult)m.invoke(null, 200, h, "text/html");
- assertEquals(0, c.getExpires());
- }
}