diff --git a/pkgs/cronet_http/example/integration_test/client_test.dart b/pkgs/cronet_http/example/integration_test/client_test.dart index f126f84fc3..e2ea74912a 100644 --- a/pkgs/cronet_http/example/integration_test/client_test.dart +++ b/pkgs/cronet_http/example/integration_test/client_test.dart @@ -4,18 +4,41 @@ import 'package:cronet_http/cronet_http.dart'; import 'package:http_client_conformance_tests/http_client_conformance_tests.dart'; +import 'package:http_profile/http_profile.dart'; import 'package:integration_test/integration_test.dart'; import 'package:test/test.dart'; Future testConformance() async { - group( - 'default cronet engine', - () => testAll( - CronetClient.defaultCronetEngine, - canStreamRequestBody: false, - canReceiveSetCookieHeaders: true, - canSendCookieHeaders: true, - )); + group('default cronet engine', () { + group('profile enabled', () { + final profile = HttpClientRequestProfile.profilingEnabled; + HttpClientRequestProfile.profilingEnabled = true; + try { + testAll( + CronetClient.defaultCronetEngine, + canStreamRequestBody: false, + canReceiveSetCookieHeaders: true, + canSendCookieHeaders: true, + ); + } finally { + HttpClientRequestProfile.profilingEnabled = profile; + } + }); + group('profile disabled', () { + final profile = HttpClientRequestProfile.profilingEnabled; + HttpClientRequestProfile.profilingEnabled = false; + try { + testAll( + CronetClient.defaultCronetEngine, + canStreamRequestBody: false, + canReceiveSetCookieHeaders: true, + canSendCookieHeaders: true, + ); + } finally { + HttpClientRequestProfile.profilingEnabled = profile; + } + }); + }); group('from cronet engine', () { testAll(