From 971c5fc0f82e4457571b3649414f93a9d2625edd Mon Sep 17 00:00:00 2001 From: paulhu Date: Tue, 20 Jul 2021 17:44:26 +0800 Subject: [PATCH] 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 --- .../hostside/app/src/com/android/cts/net/hostside/VpnTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/cts/hostside/app/src/com/android/cts/net/hostside/VpnTest.java b/tests/cts/hostside/app/src/com/android/cts/net/hostside/VpnTest.java index 62aa493c6f..215f129172 100755 --- a/tests/cts/hostside/app/src/com/android/cts/net/hostside/VpnTest.java +++ b/tests/cts/hostside/app/src/com/android/cts/net/hostside/VpnTest.java @@ -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)));