From 92c911da012708dbc7790cd69470887a35fcc543 Mon Sep 17 00:00:00 2001 From: Paul Hu Date: Wed, 21 Jul 2021 07:29:01 +0000 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 Original-Change: https://android-review.googlesource.com/1771008 Merged-In: I992c3240f0e133f5b00468cbe85d1545bcf786b0 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)));