From 3b00cdc6a742a88a3e1a29b222a4272d830ca8b9 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 | 2 ++ .../network_request_inspector_test.dart | 24 +++++++++++++++++++ 3 files changed, 28 insertions(+), 2 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 1aadb2c50a5..adea0df7c3e 100644 --- a/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md +++ b/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md @@ -68,6 +68,8 @@ TODO: Remove this section if there are not any updates. video tutorial link and the embedded DevTools actions moved into the More actions menu in the footer. [#10004](https://github.com/flutter/devtools/issues/10004) +* 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 10c2fede91f4eeb465d01357f78c1509d0b60eae 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 adea0df7c3e..632b6c2ff5b 100644 --- a/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md +++ b/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md @@ -70,6 +70,7 @@ TODO: Remove this section if there are not any updates. [#10004](https://github.com/flutter/devtools/issues/10004) * 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