126 {
127 Bundle bundle = new Bundle();
128 String networkPolicyXml =
129 "<network-security-config>"
130 + "<domain-config cleartextTrafficPermitted=\"true\">"
131 + "<domain includeSubdomains=\"true\">example.com</domain>"
132 + "<domain-config>"
133 + "<domain includeSubdomains=\"true\">insecure.example.com</domain>"
134 + "</domain-config>"
135 + "<domain-config cleartextTrafficPermitted=\"false\">"
136 + "<domain includeSubdomains=\"true\">secure.example.com</domain>"
137 + "</domain-config>"
138 + "</domain-config>"
139 + "</network-security-config>";
140 Context context = generateMockContext(bundle, networkPolicyXml);
141 FlutterApplicationInfo
info = ApplicationInfoLoader.load(context);
143 assertEquals(
144 "[[\"example.com\",true,true],[\"insecure.example.com\",true,true],[\"secure.example.com\",true,false]]",
145 info.domainNetworkPolicy);
146 }