[iOS][PRDBD] Adds unit tests for the removal of the password option [chromium/src : main]

0 views
Skip to first unread message

Angela Novakovic (Gerrit)

unread,
Jan 13, 2026, 2:32:11 PM (8 days ago) Jan 13
to Noémie St-Onge, Chromium LUCI CQ, chromium...@chromium.org, dullweb...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, msrame...@chromium.org
Attention needed from Noémie St-Onge

Angela Novakovic voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Noémie St-Onge
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ibbc32f30c4e3c3563ea82cc012d6dc92a3c018ad
Gerrit-Change-Number: 7398648
Gerrit-PatchSet: 7
Gerrit-Owner: Angela Novakovic <novak...@google.com>
Gerrit-Reviewer: Angela Novakovic <novak...@google.com>
Gerrit-Reviewer: Noémie St-Onge <noe...@google.com>
Gerrit-Attention: Noémie St-Onge <noe...@google.com>
Gerrit-Comment-Date: Tue, 13 Jan 2026 19:32:04 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Noémie St-Onge (Gerrit)

unread,
Jan 13, 2026, 5:39:20 PM (8 days ago) Jan 13
to Angela Novakovic, Chromium LUCI CQ, chromium...@chromium.org, dullweb...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, msrame...@chromium.org
Attention needed from Angela Novakovic

Noémie St-Onge added 17 comments

File ios/chrome/browser/settings/ui_bundled/clear_browsing_data/coordinator/quick_delete_mediator.mm
Line 495, Patchset 7 (Latest): selected && !IsPasswordRemovalFromDeleteBrowsingDataEnabled()
Noémie St-Onge . unresolved

No need for this as we would have crashed on line 486 already

File ios/chrome/browser/settings/ui_bundled/clear_browsing_data/coordinator/quick_delete_mediator_unittest.mm
Line 223, Patchset 7 (Latest): base::test::ScopedFeatureList feature_list_;
Noémie St-Onge . unresolved

Since a lot of the test cases don't need the ScopedFeatureList, we can instead define it at the test case level when needed. Doing so will also lower the chances of forgetting to remove this variable after the feature launched. The resulting number of lines should also be pretty similar

To enable the flag:
```
base::test::ScopedFeatureList feature_list(kPasswordRemovalFromDeleteBrowsingData);
```

To disable the flag:
```
base::test::ScopedFeatureList feature_list;
feature_list.InitAndDisableFeature(kPasswordRemovalFromDeleteBrowsingData);
```

Line 353, Patchset 7 (Latest): if (IsPasswordRemovalFromDeleteBrowsingDataEnabled()) {
GTEST_SKIP() << "The test is skipped as the feature flag "
"`kPasswordRemovalFromDeleteBrowsingData` is enabled, thus "
"the password summary is not available.";
return;
}
Noémie St-Onge . unresolved

We should prefer forcing the flag off using the `ScopedFeatureList` as it will ensure a full coverage. Given the simplicity and lightness of unit tests, we should aim at running every test case and not depend on the current state of the feature flag

Also applies to the other skipped test cases

Line 617, Patchset 7 (Latest):// teh feature flag `kPasswordRemovalFromDeleteBrowsingData` is disabled.
Noémie St-Onge . unresolved

typo: `teh -> the`

Line 621, Patchset 7 (Latest): GTEST_SKIP()
<< "The test is skipped as the feature flag "
"`kPasswordRemovalFromDeleteBrowsingData` is enabled, thus the test "
"cannot be done using passwords as a type of data.";
Noémie St-Onge . unresolved

I think this test also applies when the feature is enabled. I understand that it will fail if it stays as is because we are using the password data type, but I think we could simply work around that by replacing the passwords-related stuff with another data type. The goal of this test is to verify the summary with multiple data types, not to test passwords specifically

Line 664, Patchset 7 (Latest):// teh feature flag `kPasswordRemovalFromDeleteBrowsingData` is enabled.
Noémie St-Onge . unresolved

typo: `teh -> the`

Line 665, Patchset 7 (Latest):TEST_F(QuickDeleteMediatorTest,
TestSummaryWithSeveralTypesWithThePasswordRemovalFeatureEnabled) {
Noémie St-Onge . unresolved

See my comment for the test above. I don't think we need both

Line 705, Patchset 7 (Latest):// Tests that setPasswordsSelection is not called when the feature
Noémie St-Onge . unresolved

`` `setPasswordsSelection` ``

Line 712, Patchset 7 (Latest): // Regardless of the pref value, setPasswordsSelection will not be called by
Noémie St-Onge . unresolved

`` `setPasswordsSelection` ``

Line 733, Patchset 7 (Latest): // The pref value of `kDeletePasswords` will not be updated when the feature
// flag `kPasswordRemovalFromDeleteBrowsingData` is enabled.
prefs()->SetBoolean(browsing_data::prefs::kDeletePasswords, true);
prefs()->SetBoolean(browsing_data::prefs::kCloseTabs, true);

OCMReject([consumer_ setPasswordsSelection:YES]);
OCMExpect([consumer_ setTabsSelection:YES]);
Noémie St-Onge . unresolved

Is this relevant to this specific test case? If not, I don't think we need to test it again

Line 747, Patchset 7 (Latest): NSString* expectedSummary = [NSString
Noémie St-Onge . unresolved

should be in snake_case since this is C++

Line 752, Patchset 7 (Latest): NSString* notExpectedSummary = [NSString
Noémie St-Onge . unresolved

should be in snake_case since this is C++, would also rename it to `unexpected_summary` or `wrong_summary`

Line 761, Patchset 7 (Latest): OCMExpect([consumer_ setBrowsingDataSummary:expectedSummary]);
OCMReject([consumer_ setBrowsingDataSummary:notExpectedSummary]);
Noémie St-Onge . unresolved
FYI: If your goal is just to verify that the passed summary doesn't contain the string for passwords, you can use `OCMArg` to verify the argument:
```
OCMExpect([consumer_
setBrowsingDataSummary:[OCMArg checkWithBlock:^(NSString* summary) {
return ![summary
containsString:l10n_util::GetPluralNSStringF(
IDS_IOS_DELETE_BROWSING_DATA_SUMMARY_PASSWORDS,
1)];
}]]);
```
Line 776, Patchset 7 (Latest): // Setting the consumers calls the createCounters method.
Noémie St-Onge . unresolved

`` `createCounters` ``

Line 786, Patchset 7 (Latest):// TODO(crbug.com/463402932): Remove the below unit test after clean up.
Noémie St-Onge . unresolved

We don't really need a TODO here as we'll know that the entire test case should be removed when we'll clean up the flag disablement

Line 794, Patchset 7 (Latest): // Setting the consumer calls the createCounters method.
Noémie St-Onge . unresolved

``` `createCounters` ``

File ios/chrome/browser/settings/ui_bundled/clear_browsing_data/model/fake_browsing_data_counter_wrapper_producer.h
Line 14, Patchset 7 (Latest):- (NSUInteger)CounterCount;
Noémie St-Onge . unresolved

Should start with a lowercase letter as this is Objective-C -> `counterCount`

Open in Gerrit

Related details

Attention is currently required from:
  • Angela Novakovic
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ibbc32f30c4e3c3563ea82cc012d6dc92a3c018ad
    Gerrit-Change-Number: 7398648
    Gerrit-PatchSet: 7
    Gerrit-Owner: Angela Novakovic <novak...@google.com>
    Gerrit-Reviewer: Angela Novakovic <novak...@google.com>
    Gerrit-Reviewer: Noémie St-Onge <noe...@google.com>
    Gerrit-Attention: Angela Novakovic <novak...@google.com>
    Gerrit-Comment-Date: Tue, 13 Jan 2026 22:39:14 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Angela Novakovic (Gerrit)

    unread,
    Jan 14, 2026, 4:06:54 PM (7 days ago) Jan 14
    to Noémie St-Onge, Chromium LUCI CQ, chromium...@chromium.org, dullweb...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, msrame...@chromium.org
    Attention needed from Noémie St-Onge

    Angela Novakovic added 17 comments

    File ios/chrome/browser/settings/ui_bundled/clear_browsing_data/coordinator/quick_delete_mediator.mm
    Line 495, Patchset 7: selected && !IsPasswordRemovalFromDeleteBrowsingDataEnabled()
    Noémie St-Onge . resolved

    No need for this as we would have crashed on line 486 already

    Angela Novakovic

    Done

    File ios/chrome/browser/settings/ui_bundled/clear_browsing_data/coordinator/quick_delete_mediator_unittest.mm
    Line 223, Patchset 7: base::test::ScopedFeatureList feature_list_;
    Noémie St-Onge . resolved

    Since a lot of the test cases don't need the ScopedFeatureList, we can instead define it at the test case level when needed. Doing so will also lower the chances of forgetting to remove this variable after the feature launched. The resulting number of lines should also be pretty similar

    To enable the flag:
    ```
    base::test::ScopedFeatureList feature_list(kPasswordRemovalFromDeleteBrowsingData);
    ```

    To disable the flag:
    ```
    base::test::ScopedFeatureList feature_list;
    feature_list.InitAndDisableFeature(kPasswordRemovalFromDeleteBrowsingData);
    ```

    Angela Novakovic

    Done

    Line 353, Patchset 7: if (IsPasswordRemovalFromDeleteBrowsingDataEnabled()) {

    GTEST_SKIP() << "The test is skipped as the feature flag "
    "`kPasswordRemovalFromDeleteBrowsingData` is enabled, thus "
    "the password summary is not available.";
    return;
    }
    Noémie St-Onge . resolved

    We should prefer forcing the flag off using the `ScopedFeatureList` as it will ensure a full coverage. Given the simplicity and lightness of unit tests, we should aim at running every test case and not depend on the current state of the feature flag

    Also applies to the other skipped test cases

    Angela Novakovic

    Done

    Line 617, Patchset 7:// teh feature flag `kPasswordRemovalFromDeleteBrowsingData` is disabled.
    Noémie St-Onge . resolved

    typo: `teh -> the`

    Angela Novakovic

    Done


    << "The test is skipped as the feature flag "
    "`kPasswordRemovalFromDeleteBrowsingData` is enabled, thus the test "
    "cannot be done using passwords as a type of data.";
    Noémie St-Onge . resolved

    I think this test also applies when the feature is enabled. I understand that it will fail if it stays as is because we are using the password data type, but I think we could simply work around that by replacing the passwords-related stuff with another data type. The goal of this test is to verify the summary with multiple data types, not to test passwords specifically

    Angela Novakovic

    Done

    Line 664, Patchset 7:// teh feature flag `kPasswordRemovalFromDeleteBrowsingData` is enabled.
    Noémie St-Onge . resolved

    typo: `teh -> the`

    Angela Novakovic

    Done

    Line 665, Patchset 7:TEST_F(QuickDeleteMediatorTest,
    TestSummaryWithSeveralTypesWithThePasswordRemovalFeatureEnabled) {
    Noémie St-Onge . resolved

    See my comment for the test above. I don't think we need both

    Angela Novakovic

    Done

    Line 705, Patchset 7:// Tests that setPasswordsSelection is not called when the feature
    Noémie St-Onge . resolved

    `` `setPasswordsSelection` ``

    Angela Novakovic

    Done

    Line 712, Patchset 7: // Regardless of the pref value, setPasswordsSelection will not be called by
    Noémie St-Onge . resolved

    `` `setPasswordsSelection` ``

    Angela Novakovic

    Done

    Line 733, Patchset 7: // The pref value of `kDeletePasswords` will not be updated when the feature

    // flag `kPasswordRemovalFromDeleteBrowsingData` is enabled.
    prefs()->SetBoolean(browsing_data::prefs::kDeletePasswords, true);
    prefs()->SetBoolean(browsing_data::prefs::kCloseTabs, true);

    OCMReject([consumer_ setPasswordsSelection:YES]);
    OCMExpect([consumer_ setTabsSelection:YES]);
    Noémie St-Onge . unresolved

    Is this relevant to this specific test case? If not, I don't think we need to test it again

    Angela Novakovic

    After looking at this test again, I think it's not possible to do it properly. The triggerUpdateUICallbackForPasswordsResults would have to be called and still result in a summary without passwords, but as it is using the FakeBrowsingDataCounterWrapperProducer, it is not disabled for passwords. I think we can skip this test. What do you think?

    Line 747, Patchset 7: NSString* expectedSummary = [NSString
    Noémie St-Onge . resolved

    should be in snake_case since this is C++

    Angela Novakovic

    Done

    Line 752, Patchset 7: NSString* notExpectedSummary = [NSString
    Noémie St-Onge . resolved

    should be in snake_case since this is C++, would also rename it to `unexpected_summary` or `wrong_summary`

    Angela Novakovic

    Done

    Line 761, Patchset 7: OCMExpect([consumer_ setBrowsingDataSummary:expectedSummary]);

    OCMReject([consumer_ setBrowsingDataSummary:notExpectedSummary]);
    Noémie St-Onge . resolved
    FYI: If your goal is just to verify that the passed summary doesn't contain the string for passwords, you can use `OCMArg` to verify the argument:
    ```
    OCMExpect([consumer_
    setBrowsingDataSummary:[OCMArg checkWithBlock:^(NSString* summary) {
    return ![summary
    containsString:l10n_util::GetPluralNSStringF(
    IDS_IOS_DELETE_BROWSING_DATA_SUMMARY_PASSWORDS,
    1)];
    }]]);
    ```
    Angela Novakovic

    Done

    Line 776, Patchset 7: // Setting the consumers calls the createCounters method.
    Noémie St-Onge . resolved

    `` `createCounters` ``

    Angela Novakovic

    Done

    Line 786, Patchset 7:// TODO(crbug.com/463402932): Remove the below unit test after clean up.
    Noémie St-Onge . resolved

    We don't really need a TODO here as we'll know that the entire test case should be removed when we'll clean up the flag disablement

    Angela Novakovic

    Done

    Line 794, Patchset 7: // Setting the consumer calls the createCounters method.
    Noémie St-Onge . resolved

    ``` `createCounters` ``

    Angela Novakovic

    Done

    File ios/chrome/browser/settings/ui_bundled/clear_browsing_data/model/fake_browsing_data_counter_wrapper_producer.h
    Line 14, Patchset 7:- (NSUInteger)CounterCount;
    Noémie St-Onge . resolved

    Should start with a lowercase letter as this is Objective-C -> `counterCount`

    Angela Novakovic

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Noémie St-Onge
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ibbc32f30c4e3c3563ea82cc012d6dc92a3c018ad
    Gerrit-Change-Number: 7398648
    Gerrit-PatchSet: 10
    Gerrit-Owner: Angela Novakovic <novak...@google.com>
    Gerrit-Reviewer: Angela Novakovic <novak...@google.com>
    Gerrit-Reviewer: Noémie St-Onge <noe...@google.com>
    Gerrit-Attention: Noémie St-Onge <noe...@google.com>
    Gerrit-Comment-Date: Wed, 14 Jan 2026 21:06:48 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Noémie St-Onge <noe...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Angela Novakovic (Gerrit)

    unread,
    Jan 15, 2026, 9:29:04 AM (6 days ago) Jan 15
    to Noémie St-Onge, Chromium LUCI CQ, chromium...@chromium.org, dullweb...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, msrame...@chromium.org
    Attention needed from Angela Novakovic

    Angela Novakovic voted Commit-Queue+1

    Commit-Queue+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Angela Novakovic
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ibbc32f30c4e3c3563ea82cc012d6dc92a3c018ad
    Gerrit-Change-Number: 7398648
    Gerrit-PatchSet: 11
    Gerrit-Owner: Angela Novakovic <novak...@google.com>
    Gerrit-Reviewer: Angela Novakovic <novak...@google.com>
    Gerrit-Reviewer: Noémie St-Onge <noe...@google.com>
    Gerrit-Attention: Angela Novakovic <novak...@google.com>
    Gerrit-Comment-Date: Thu, 15 Jan 2026 14:28:59 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Noémie St-Onge (Gerrit)

    unread,
    Jan 16, 2026, 3:02:43 PM (5 days ago) Jan 16
    to Angela Novakovic, Chromium LUCI CQ, chromium...@chromium.org, dullweb...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, msrame...@chromium.org
    Attention needed from Angela Novakovic

    Noémie St-Onge added 5 comments

    File ios/chrome/browser/settings/ui_bundled/clear_browsing_data/coordinator/quick_delete_mediator_unittest.mm
    Line 613, Patchset 13 (Latest):TEST_F(QuickDeleteMediatorTest,
    Noémie St-Onge . unresolved

    This test is also valid when the feature is disabled, it just needs to be adapted, see comments below

    Line 630, Patchset 13 (Latest): // dispatches if all counters have returned.
    Noémie St-Onge . unresolved
    ```suggestion
    // dispatched if all counters have returned.
    ```
    Line 631, Patchset 13 (Latest): triggerUpdateUICallbackForAutofillResults(0, 0, 0);
    Noémie St-Onge . unresolved
    ```suggestion
    triggerUpdateUICallbackForAutofillResults(0, 0, 0);
    if (!IsPasswordRemovalFromDeleteBrowsingDataEnabled()) {
    triggerUpdateUICallbackForPasswordsResults(0);
    }
    ```
    Line 657, Patchset 13 (Latest): SetConsumerWithThePasswordRemovalFeatureEnabled) {
    Noémie St-Onge . unresolved

    This test name doesn't really describe what's being tested here and could apply to the other tests below

    Line 689, Patchset 13 (Latest): EXPECT_EQ(4U, [fake_browsing_data_counter_wrapper_producer_ counterCount]);
    Noémie St-Onge . unresolved

    Would it be possible to instead have the `fake_browsing_data_counter_wrapper_producer_` return all the callbacks so that we can check the pref name associated with them and confirm that it is indeed the passwords one that's not present?

    We could also return a vector with the pref names only

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Angela Novakovic
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ibbc32f30c4e3c3563ea82cc012d6dc92a3c018ad
    Gerrit-Change-Number: 7398648
    Gerrit-PatchSet: 13
    Gerrit-Owner: Angela Novakovic <novak...@google.com>
    Gerrit-Reviewer: Angela Novakovic <novak...@google.com>
    Gerrit-Reviewer: Noémie St-Onge <noe...@google.com>
    Gerrit-Attention: Angela Novakovic <novak...@google.com>
    Gerrit-Comment-Date: Fri, 16 Jan 2026 20:02:38 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Angela Novakovic (Gerrit)

    unread,
    Jan 19, 2026, 9:19:54 AM (2 days ago) Jan 19
    to Noémie St-Onge, Chromium LUCI CQ, chromium...@chromium.org, dullweb...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, msrame...@chromium.org
    Attention needed from Noémie St-Onge

    Angela Novakovic added 6 comments

    File ios/chrome/browser/settings/ui_bundled/clear_browsing_data/coordinator/quick_delete_mediator_unittest.mm
    Line 613, Patchset 13:TEST_F(QuickDeleteMediatorTest,
    Noémie St-Onge . resolved

    This test is also valid when the feature is disabled, it just needs to be adapted, see comments below

    Angela Novakovic

    Done

    Line 630, Patchset 13: // dispatches if all counters have returned.
    Noémie St-Onge . resolved
    ```suggestion
    // dispatched if all counters have returned.
    ```
    Angela Novakovic

    Done

    Line 631, Patchset 13: triggerUpdateUICallbackForAutofillResults(0, 0, 0);
    Noémie St-Onge . resolved
    ```suggestion
    triggerUpdateUICallbackForAutofillResults(0, 0, 0);
    if (!IsPasswordRemovalFromDeleteBrowsingDataEnabled()) {
    triggerUpdateUICallbackForPasswordsResults(0);
    }
    ```
    Angela Novakovic

    Done

    Line 657, Patchset 13: SetConsumerWithThePasswordRemovalFeatureEnabled) {
    Noémie St-Onge . resolved

    This test name doesn't really describe what's being tested here and could apply to the other tests below

    Angela Novakovic

    Done

    Line 689, Patchset 13: EXPECT_EQ(4U, [fake_browsing_data_counter_wrapper_producer_ counterCount]);
    Noémie St-Onge . resolved

    Would it be possible to instead have the `fake_browsing_data_counter_wrapper_producer_` return all the callbacks so that we can check the pref name associated with them and confirm that it is indeed the passwords one that's not present?

    We could also return a vector with the pref names only

    Angela Novakovic

    Done

    Line 733, Patchset 7: // The pref value of `kDeletePasswords` will not be updated when the feature
    // flag `kPasswordRemovalFromDeleteBrowsingData` is enabled.
    prefs()->SetBoolean(browsing_data::prefs::kDeletePasswords, true);
    prefs()->SetBoolean(browsing_data::prefs::kCloseTabs, true);

    OCMReject([consumer_ setPasswordsSelection:YES]);
    OCMExpect([consumer_ setTabsSelection:YES]);
    Noémie St-Onge . resolved

    Is this relevant to this specific test case? If not, I don't think we need to test it again

    Angela Novakovic

    After looking at this test again, I think it's not possible to do it properly. The triggerUpdateUICallbackForPasswordsResults would have to be called and still result in a summary without passwords, but as it is using the FakeBrowsingDataCounterWrapperProducer, it is not disabled for passwords. I think we can skip this test. What do you think?

    Angela Novakovic

    Resolved offline.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Noémie St-Onge
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ibbc32f30c4e3c3563ea82cc012d6dc92a3c018ad
      Gerrit-Change-Number: 7398648
      Gerrit-PatchSet: 14
      Gerrit-Owner: Angela Novakovic <novak...@google.com>
      Gerrit-Reviewer: Angela Novakovic <novak...@google.com>
      Gerrit-Reviewer: Noémie St-Onge <noe...@google.com>
      Gerrit-Attention: Noémie St-Onge <noe...@google.com>
      Gerrit-Comment-Date: Mon, 19 Jan 2026 14:19:50 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Angela Novakovic <novak...@google.com>
      Comment-In-Reply-To: Noémie St-Onge <noe...@google.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Noémie St-Onge (Gerrit)

      unread,
      Jan 19, 2026, 2:49:17 PM (2 days ago) Jan 19
      to Angela Novakovic, Chromium LUCI CQ, chromium...@chromium.org, dullweb...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, msrame...@chromium.org
      Attention needed from Angela Novakovic

      Noémie St-Onge added 4 comments

      File ios/chrome/browser/settings/ui_bundled/clear_browsing_data/coordinator/quick_delete_mediator_unittest.mm
      Line 687, Patchset 16 (Latest): const std::set<std::string>& registeredPrefs =
      Noémie St-Onge . unresolved

      `registered_prefs` as this is C++

      Line 691, Patchset 16 (Latest): EXPECT_TRUE(
      registeredPrefs.count(browsing_data::prefs::kDeleteBrowsingHistory));
      EXPECT_TRUE(registeredPrefs.count(browsing_data::prefs::kCloseTabs));
      EXPECT_TRUE(registeredPrefs.count(browsing_data::prefs::kDeleteCache));
      EXPECT_TRUE(registeredPrefs.count(browsing_data::prefs::kDeleteFormData));

      // The counter for passwords should NOT be created.
      EXPECT_FALSE(registeredPrefs.count(browsing_data::prefs::kDeletePasswords));
      Noémie St-Onge . unresolved
      You can use `testing::UnorderedElementsAre` to validate the content of the set:
      ```suggestion
      EXPECT_THAT(registered_prefs, testing::UnorderedElementsAre(
      browsing_data::prefs::kDeleteBrowsingHistory,
      browsing_data::prefs::kCloseTabs,
      browsing_data::prefs::kDeleteCache,
      browsing_data::prefs::kDeleteFormData));
      ```

      Same for the test below

      Line 719, Patchset 16 (Latest): // Expect counters for history, tabs, cache and autofill.
      Noémie St-Onge . unresolved
      ```suggestion
      // Expect counters for history, tabs, cache, autofill and passwords.
      ```
      File ios/chrome/browser/settings/ui_bundled/clear_browsing_data/model/fake_browsing_data_counter_wrapper_producer.mm
      Line 40, Patchset 16 (Latest): return _registeredPrefNames;
      Noémie St-Onge . unresolved

      Why not just construct the set here by iterating over `_prefsCallback`? This would remove the need to call `clearRegisteredPrefs` to clear previous states. Also, do we need to clear `_prefsCallback`? A new `FakeBrowsingDataCounterWrapperProducer` should be created for every test case

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Angela Novakovic
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ibbc32f30c4e3c3563ea82cc012d6dc92a3c018ad
        Gerrit-Change-Number: 7398648
        Gerrit-PatchSet: 16
        Gerrit-Owner: Angela Novakovic <novak...@google.com>
        Gerrit-Reviewer: Angela Novakovic <novak...@google.com>
        Gerrit-Reviewer: Noémie St-Onge <noe...@google.com>
        Gerrit-Attention: Angela Novakovic <novak...@google.com>
        Gerrit-Comment-Date: Mon, 19 Jan 2026 19:49:12 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Angela Novakovic (Gerrit)

        unread,
        Jan 20, 2026, 2:44:09 PM (22 hours ago) Jan 20
        to Noémie St-Onge, Chromium LUCI CQ, chromium...@chromium.org, dullweb...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, msrame...@chromium.org
        Attention needed from Noémie St-Onge

        Angela Novakovic added 4 comments

        File ios/chrome/browser/settings/ui_bundled/clear_browsing_data/coordinator/quick_delete_mediator_unittest.mm
        Line 687, Patchset 16: const std::set<std::string>& registeredPrefs =
        Noémie St-Onge . resolved

        `registered_prefs` as this is C++

        Angela Novakovic

        Done


        registeredPrefs.count(browsing_data::prefs::kDeleteBrowsingHistory));
        EXPECT_TRUE(registeredPrefs.count(browsing_data::prefs::kCloseTabs));
        EXPECT_TRUE(registeredPrefs.count(browsing_data::prefs::kDeleteCache));
        EXPECT_TRUE(registeredPrefs.count(browsing_data::prefs::kDeleteFormData));

        // The counter for passwords should NOT be created.
        EXPECT_FALSE(registeredPrefs.count(browsing_data::prefs::kDeletePasswords));
        Noémie St-Onge . resolved
        You can use `testing::UnorderedElementsAre` to validate the content of the set:
        ```suggestion
        EXPECT_THAT(registered_prefs, testing::UnorderedElementsAre(
        browsing_data::prefs::kDeleteBrowsingHistory,
        browsing_data::prefs::kCloseTabs,
        browsing_data::prefs::kDeleteCache,
        browsing_data::prefs::kDeleteFormData));
        ```

        Same for the test below

        Angela Novakovic

        Done

        Line 719, Patchset 16: // Expect counters for history, tabs, cache and autofill.
        Noémie St-Onge . resolved
        ```suggestion
        // Expect counters for history, tabs, cache, autofill and passwords.
        ```
        Angela Novakovic

        Done

        File ios/chrome/browser/settings/ui_bundled/clear_browsing_data/model/fake_browsing_data_counter_wrapper_producer.mm
        Line 40, Patchset 16: return _registeredPrefNames;
        Noémie St-Onge . resolved

        Why not just construct the set here by iterating over `_prefsCallback`? This would remove the need to call `clearRegisteredPrefs` to clear previous states. Also, do we need to clear `_prefsCallback`? A new `FakeBrowsingDataCounterWrapperProducer` should be created for every test case

        Angela Novakovic

        Done

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Noémie St-Onge
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: Ibbc32f30c4e3c3563ea82cc012d6dc92a3c018ad
          Gerrit-Change-Number: 7398648
          Gerrit-PatchSet: 17
          Gerrit-Owner: Angela Novakovic <novak...@google.com>
          Gerrit-Reviewer: Angela Novakovic <novak...@google.com>
          Gerrit-Reviewer: Noémie St-Onge <noe...@google.com>
          Gerrit-Attention: Noémie St-Onge <noe...@google.com>
          Gerrit-Comment-Date: Tue, 20 Jan 2026 19:44:04 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Noémie St-Onge <noe...@google.com>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Noémie St-Onge (Gerrit)

          unread,
          Jan 20, 2026, 5:44:16 PM (19 hours ago) Jan 20
          to Angela Novakovic, Chromium LUCI CQ, chromium...@chromium.org, dullweb...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, msrame...@chromium.org
          Attention needed from Angela Novakovic

          Noémie St-Onge added 6 comments

          File ios/chrome/browser/settings/ui_bundled/clear_browsing_data/coordinator/quick_delete_mediator_unittest.mm
          Line 21, Patchset 17 (Latest):#import "ios/chrome/browser/browsing_data/model/browsing_data_remove_mask.h"
          #import "ios/chrome/browser/browsing_data/model/browsing_data_remover.h"
          Noémie St-Onge . unresolved

          Are these imports needed?

          Line 354, Patchset 17 (Latest): feature_list.InitAndDisableFeature(kPasswordRemovalFromDeleteBrowsingData);
          Noémie St-Onge . unresolved

          We can skip a line after enabling or disabling the feature. It makes the code easier to parse. Same for the other tests below

          Line 697, Patchset 17 (Latest): EXPECT_FALSE(registered_prefs.count(browsing_data::prefs::kDeletePasswords));
          Noémie St-Onge . unresolved

          No need to check this as the above check with `UnorderedElementsAre` would have failed if `kDeletePasswords` was part of the registered prefs. We can take the `The counter for passwords should NOT be created.` comment and append it to the `Expect counters for history, tabs, cache and autofill.` comment

          Line 702, Patchset 17 (Latest):// `kPasswordRemovalFromDeleteBrowsingData` is disabled.
          Noémie St-Onge . unresolved

          The start of the comment seems to have been removed

          Line 715, Patchset 17 (Latest): // Expect counters for history, tabs, cache and autofill.
          Noémie St-Onge . unresolved
          ```suggestion
          // Expect counters for history, tabs, cache, autofill and passwords.
          ```
          File ios/chrome/browser/settings/ui_bundled/clear_browsing_data/model/fake_browsing_data_counter_wrapper_producer.mm
          Line 15, Patchset 17 (Latest): std::set<std::string> _registeredPrefNames;
          Noémie St-Onge . unresolved

          I don't think we need to store this variable

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Angela Novakovic
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not satisfiedCode-Owners
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: Ibbc32f30c4e3c3563ea82cc012d6dc92a3c018ad
            Gerrit-Change-Number: 7398648
            Gerrit-PatchSet: 17
            Gerrit-Owner: Angela Novakovic <novak...@google.com>
            Gerrit-Reviewer: Angela Novakovic <novak...@google.com>
            Gerrit-Reviewer: Noémie St-Onge <noe...@google.com>
            Gerrit-Attention: Angela Novakovic <novak...@google.com>
            Gerrit-Comment-Date: Tue, 20 Jan 2026 22:44:12 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Angela Novakovic (Gerrit)

            unread,
            11:02 AM (2 hours ago) 11:02 AM
            to Noémie St-Onge, Chromium LUCI CQ, chromium...@chromium.org, dullweb...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, msrame...@chromium.org
            Attention needed from Noémie St-Onge

            Angela Novakovic added 6 comments

            File ios/chrome/browser/settings/ui_bundled/clear_browsing_data/coordinator/quick_delete_mediator_unittest.mm
            Line 21, Patchset 17:#import "ios/chrome/browser/browsing_data/model/browsing_data_remove_mask.h"
            #import "ios/chrome/browser/browsing_data/model/browsing_data_remover.h"
            Noémie St-Onge . resolved

            Are these imports needed?

            Angela Novakovic

            Done

            Line 354, Patchset 17: feature_list.InitAndDisableFeature(kPasswordRemovalFromDeleteBrowsingData);
            Noémie St-Onge . resolved

            We can skip a line after enabling or disabling the feature. It makes the code easier to parse. Same for the other tests below

            Angela Novakovic

            Done

            Line 697, Patchset 17: EXPECT_FALSE(registered_prefs.count(browsing_data::prefs::kDeletePasswords));
            Noémie St-Onge . resolved

            No need to check this as the above check with `UnorderedElementsAre` would have failed if `kDeletePasswords` was part of the registered prefs. We can take the `The counter for passwords should NOT be created.` comment and append it to the `Expect counters for history, tabs, cache and autofill.` comment

            Angela Novakovic

            Done

            Line 702, Patchset 17:// `kPasswordRemovalFromDeleteBrowsingData` is disabled.
            Noémie St-Onge . resolved

            The start of the comment seems to have been removed

            Angela Novakovic

            Done

            Line 715, Patchset 17: // Expect counters for history, tabs, cache and autofill.
            Noémie St-Onge . resolved
            ```suggestion
            // Expect counters for history, tabs, cache, autofill and passwords.
            ```
            Angela Novakovic

            Done

            File ios/chrome/browser/settings/ui_bundled/clear_browsing_data/model/fake_browsing_data_counter_wrapper_producer.mm
            Line 15, Patchset 17: std::set<std::string> _registeredPrefNames;
            Noémie St-Onge . resolved

            I don't think we need to store this variable

            Angela Novakovic

            Done

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Noémie St-Onge
            Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement is not satisfiedCode-Owners
              • requirement is not satisfiedCode-Review
              • requirement is not satisfiedReview-Enforcement
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: Ibbc32f30c4e3c3563ea82cc012d6dc92a3c018ad
              Gerrit-Change-Number: 7398648
              Gerrit-PatchSet: 18
              Gerrit-Owner: Angela Novakovic <novak...@google.com>
              Gerrit-Reviewer: Angela Novakovic <novak...@google.com>
              Gerrit-Reviewer: Noémie St-Onge <noe...@google.com>
              Gerrit-Attention: Noémie St-Onge <noe...@google.com>
              Gerrit-Comment-Date: Wed, 21 Jan 2026 16:01:47 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              Comment-In-Reply-To: Noémie St-Onge <noe...@google.com>
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy
              Reply all
              Reply to author
              Forward
              0 new messages