Change the url in testDownloadWithDownloadManagerDisallowed
In China, "https://www.google.com" will redirect to url "http://www.google.cn" but cleartext traffic is default disabled for an app. So the testDownloadWithDownloadManagerDisallowed would failed by cleartext traffic is not permitted. Thus, change the url in the test which is reachable in China. Bug: 192978910 Test: atest HostsideVpnTests#testDownloadWithDownloadManagerDisallowed Change-Id: I992c3240f0e133f5b00468cbe85d1545bcf786b0
This commit is contained in:
@@ -1213,7 +1213,8 @@ public class VpnTest extends InstrumentationTestCase {
|
||||
new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
|
||||
|
||||
// Enqueue a request and check only one download.
|
||||
final long id = dm.enqueue(new Request(Uri.parse("https://www.google.com")));
|
||||
final long id = dm.enqueue(new Request(
|
||||
Uri.parse("https://google-ipv6test.appspot.com/ip.js?fmt=text")));
|
||||
assertEquals(1, getTotalNumberDownloads(dm, new Query()));
|
||||
assertEquals(1, getTotalNumberDownloads(dm, new Query().setFilterById(id)));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user