Merge "Add xml config to allow cleartext traffic on some domains."
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
<application>
|
||||
<application android:networkSecurityConfig="@xml/network_security_config">
|
||||
<uses-library android:name="android.test.runner" />
|
||||
</application>
|
||||
<instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
34
Cronet/tests/mts/res/xml/network_security_config.xml
Normal file
34
Cronet/tests/mts/res/xml/network_security_config.xml
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright (C) 2022 The Android Open Source Project
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<network-security-config>
|
||||
<domain-config cleartextTrafficPermitted="true">
|
||||
<!-- Used as the base URL by native test server (net::EmbeddedTestServer) -->
|
||||
<domain includeSubdomains="true">127.0.0.1</domain>
|
||||
<!-- Used by CronetHttpURLConnectionTest#testIOExceptionInterruptRethrown -->
|
||||
<domain includeSubdomains="true">localhost</domain>
|
||||
<!-- Used by CronetHttpURLConnectionTest#testBadIP -->
|
||||
<domain includeSubdomains="true">0.0.0.0</domain>
|
||||
<!-- Used by CronetHttpURLConnectionTest#testSetUseCachesFalse -->
|
||||
<domain includeSubdomains="true">host-cache-test-host</domain>
|
||||
<!-- Used by CronetHttpURLConnectionTest#testBadHostname -->
|
||||
<domain includeSubdomains="true">this-weird-host-name-does-not-exist</domain>
|
||||
<!-- Used by CronetUrlRequestContextTest#testHostResolverRules -->
|
||||
<domain includeSubdomains="true">some-weird-hostname</domain>
|
||||
</domain-config>
|
||||
</network-security-config>
|
||||
Reference in New Issue
Block a user