| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.core; |
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
public class TestWebData { |
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
public final static byte[] test1 = { |
| 33 |
(byte)0x3c, (byte)0x68, (byte)0x74, (byte)0x6d, |
| 34 |
(byte)0x6c, (byte)0x3e, (byte)0x0a, (byte)0x3c, |
| 35 |
(byte)0x62, (byte)0x6f, (byte)0x64, (byte)0x79, |
| 36 |
(byte)0x3e, (byte)0x0a, (byte)0x3c, (byte)0x68, |
| 37 |
(byte)0x31, (byte)0x3e, (byte)0x48, (byte)0x65, |
| 38 |
(byte)0x6c, (byte)0x6c, (byte)0x6f, (byte)0x20, |
| 39 |
(byte)0x57, (byte)0x6f, (byte)0x72, (byte)0x6c, |
| 40 |
(byte)0x64, (byte)0x21, (byte)0x3c, (byte)0x2f, |
| 41 |
(byte)0x68, (byte)0x31, (byte)0x3e, (byte)0x0a, |
| 42 |
(byte)0x3c, (byte)0x2f, (byte)0x62, (byte)0x6f, |
| 43 |
(byte)0x64, (byte)0x79, (byte)0x3e, (byte)0x0a, |
| 44 |
(byte)0x3c, (byte)0x2f, (byte)0x68, (byte)0x74, |
| 45 |
(byte)0x6d, (byte)0x6c, (byte)0x3e, (byte)0x0a |
| 46 |
}; |
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
public final static byte[] test2 = { |
| 57 |
(byte)0x3c, (byte)0x68, (byte)0x74, (byte)0x6d, |
| 58 |
(byte)0x6c, (byte)0x3e, (byte)0x0a, (byte)0x3c, |
| 59 |
(byte)0x62, (byte)0x6f, (byte)0x64, (byte)0x79, |
| 60 |
(byte)0x3e, (byte)0x0a, (byte)0x3c, (byte)0x68, |
| 61 |
(byte)0x31, (byte)0x3e, (byte)0x48, (byte)0x65, |
| 62 |
(byte)0x6c, (byte)0x6c, (byte)0x6f, (byte)0x20, |
| 63 |
(byte)0x57, (byte)0x6f, (byte)0x72, (byte)0x6c, |
| 64 |
(byte)0x64, (byte)0x21, (byte)0x3c, (byte)0x2f, |
| 65 |
(byte)0x68, (byte)0x31, (byte)0x3e, (byte)0x0a, |
| 66 |
(byte)0x3c, (byte)0x2f, (byte)0x62, (byte)0x6f, |
| 67 |
(byte)0x64, (byte)0x79, (byte)0x3e, (byte)0x0a, |
| 68 |
(byte)0x3c, (byte)0x2f, (byte)0x68, (byte)0x74, |
| 69 |
(byte)0x6d, (byte)0x6c, (byte)0x3e, (byte)0x0a |
| 70 |
}; |
| 71 |
|
| 72 |
|
| 73 |
public final static String postContent = "user=111"; |
| 74 |
|
| 75 |
|
| 76 |
public final static byte[][] tests = { |
| 77 |
test1, |
| 78 |
test2 |
| 79 |
}; |
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
public static TestWebData[] testParams = { |
| 85 |
new TestWebData(52, 14000000, "test1", "text/html", false), |
| 86 |
new TestWebData(52, 14000002, "test2", "unknown/unknown", false) |
| 87 |
}; |
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
public static String[] testServerResponse = { |
| 93 |
"Redirecting 301", |
| 94 |
"Redirecting 302", |
| 95 |
"Redirecting 303", |
| 96 |
"Redirecting 307" |
| 97 |
}; |
| 98 |
|
| 99 |
|
| 100 |
public final static int REDIRECT_301 = 0; |
| 101 |
public final static int REDIRECT_302 = 1; |
| 102 |
public final static int REDIRECT_303 = 2; |
| 103 |
public final static int REDIRECT_307 = 3; |
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
TestWebData(int length, int lastModified, String name, String type, boolean isDir) { |
| 110 |
testLength = length; |
| 111 |
testLastModified = lastModified; |
| 112 |
testName = name; |
| 113 |
testType = type; |
| 114 |
testDir = isDir; |
| 115 |
} |
| 116 |
|
| 117 |
|
| 118 |
public int testLength; |
| 119 |
|
| 120 |
|
| 121 |
public int testLastModified; |
| 122 |
|
| 123 |
|
| 124 |
public String testName; |
| 125 |
|
| 126 |
|
| 127 |
public String testType; |
| 128 |
|
| 129 |
|
| 130 |
public boolean testDir; |
| 131 |
|
| 132 |
} |