OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.chrome.browser.download; | 5 package org.chromium.chrome.browser.download; |
6 | 6 |
7 import android.content.pm.PackageManager; | 7 import android.content.pm.PackageManager; |
| 8 import android.support.test.filters.SmallTest; |
8 import android.test.InstrumentationTestCase; | 9 import android.test.InstrumentationTestCase; |
9 import android.test.MoreAsserts; | 10 import android.test.MoreAsserts; |
10 import android.test.suitebuilder.annotation.SmallTest; | |
11 | 11 |
12 import org.chromium.base.test.util.Feature; | 12 import org.chromium.base.test.util.Feature; |
13 | 13 |
14 import java.io.ByteArrayInputStream; | 14 import java.io.ByteArrayInputStream; |
15 import java.util.List; | 15 import java.util.List; |
16 | 16 |
17 /** | 17 /** |
18 * Tests for OMADownloadHandler class. | 18 * Tests for OMADownloadHandler class. |
19 */ | 19 */ |
20 public class OMADownloadHandlerTest extends InstrumentationTestCase { | 20 public class OMADownloadHandlerTest extends InstrumentationTestCase { |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 downloadDescriptor = | 149 downloadDescriptor = |
150 "garbage" | 150 "garbage" |
151 + "<media xmlns=\"http://www.openmobilealliance.org/xmlns/dd\">\
r\n" | 151 + "<media xmlns=\"http://www.openmobilealliance.org/xmlns/dd\">\
r\n" |
152 + "<DDVersion>1.0</DDVersion>\r\n" | 152 + "<DDVersion>1.0</DDVersion>\r\n" |
153 + "</media>"; | 153 + "</media>"; |
154 info = OMADownloadHandler.parseDownloadDescriptor( | 154 info = OMADownloadHandler.parseDownloadDescriptor( |
155 new ByteArrayInputStream(downloadDescriptor.getBytes())); | 155 new ByteArrayInputStream(downloadDescriptor.getBytes())); |
156 assertNull(info); | 156 assertNull(info); |
157 } | 157 } |
158 } | 158 } |
OLD | NEW |