From dd84df996c12d8aea99131c1b84d0ec6cf699a08 Mon Sep 17 00:00:00 2001 From: hkarmoush Date: Wed, 21 Oct 2026 22:57:44 +0300 Subject: [PATCH 1/2] Fix inverted HttpOnly and Secure icons in the network Cookies tab The HttpOnly and Secure columns showed a check mark when the flag was not set, and a cross when it was. --- .../network_request_inspector_views.dart | 4 ++-- .../release_notes/NEXT_RELEASE_NOTES.md | 3 ++- .../network_request_inspector_test.dart | 24 +++++++++++++++++++ 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/packages/devtools_app/lib/src/screens/network/network_request_inspector_views.dart b/packages/devtools_app/lib/src/screens/network/network_request_inspector_views.dart index 46d35a92151..0b92841b590 100644 --- a/packages/devtools_app/lib/src/screens/network/network_request_inspector_views.dart +++ b/packages/devtools_app/lib/src/screens/network/network_request_inspector_views.dart @@ -483,8 +483,8 @@ class HttpRequestCookiesView extends StatelessWidget { _buildCell(cookie.path), _buildCell(cookie.expires?.toString()), _buildCell(cookie.value!.length.toString()), - _buildIconCell(!cookie.httpOnly ? Icons.check : Icons.close), - _buildIconCell(!cookie.secure ? Icons.check : Icons.close), + _buildIconCell(cookie.httpOnly ? Icons.check : Icons.close), + _buildIconCell(cookie.secure ? Icons.check : Icons.close), ], ], ); diff --git a/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md b/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md index 7d47c6b982a..21f93701fc3 100644 --- a/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md +++ b/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md @@ -42,7 +42,8 @@ TODO: Remove this section if there are not any updates. ## Network profiler updates -TODO: Remove this section if there are not any updates. +* Fixed the HttpOnly and Secure columns of the Cookies tab, which showed a + check mark for cookies that did not have those flags set. ## Logging updates diff --git a/packages/devtools_app/test/screens/network/network_request_inspector_test.dart b/packages/devtools_app/test/screens/network/network_request_inspector_test.dart index 2373bb6c18f..08568e80445 100644 --- a/packages/devtools_app/test/screens/network/network_request_inspector_test.dart +++ b/packages/devtools_app/test/screens/network/network_request_inspector_test.dart @@ -355,5 +355,29 @@ void main() { await tester.pumpAndSettle(const Duration(seconds: 1)); }, ); + + testWidgets('cookie HttpOnly and Secure columns match the cookie', ( + tester, + ) async { + final cookieJson = Map.of(httpGetJson) + ..['response'] = { + ...httpGetJson['response'] as Map, + 'cookies': ['sid=1; HttpOnly'], + }; + final cookieRequest = DartIOHttpRequestData( + HttpProfileRequest.parse(cookieJson)!, + requestFullDataFromVmService: false, + ); + + await tester.pumpWidget(wrap(HttpRequestCookiesView(cookieRequest))); + + // The cookie is HttpOnly but not Secure. + final cells = find.descendant( + of: find.byKey(HttpRequestCookiesView.responseCookiesKey), + matching: find.byType(Icon), + ); + final icons = tester.widgetList(cells).map((icon) => icon.icon); + expect(icons, [Icons.check, Icons.close]); + }); }); } From d28dfa985812c5e229a374db7cd6519a3581d864 Mon Sep 17 00:00:00 2001 From: hkarmoush Date: Wed, 21 Oct 2026 22:58:08 +0300 Subject: [PATCH 2/2] Add PR link to release note --- packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md b/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md index 21f93701fc3..7722a5ec1a8 100644 --- a/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md +++ b/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md @@ -44,6 +44,7 @@ TODO: Remove this section if there are not any updates. * Fixed the HttpOnly and Secure columns of the Cookies tab, which showed a check mark for cookies that did not have those flags set. + [#10053](https://github.com/flutter/devtools/pull/10053) ## Logging updates