[sync] Update Sync integration tests to auto-open first tab [chromium/src : main]

0 views
Skip to first unread message

Mikel Astiz (Gerrit)

unread,
Mar 23, 2026, 1:16:47 PM (yesterday) Mar 23
to Ankush Singh, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, shgar+aut...@google.com, armalhotra+a...@google.com, vinnypersky+...@google.com, osaul+aut...@google.com, siyua+aut...@chromium.org, siashah+au...@chromium.org, andysjl...@chromium.org, druber...@chromium.org, nwoked...@chromium.org, vakh+safe_br...@chromium.org, xinghui...@chromium.org, zackha...@chromium.org
Attention needed from Ankush Singh

Mikel Astiz voted and added 1 comment

Votes added by Mikel Astiz

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Mikel Astiz . resolved

I believe tests are passing now.

Open in Gerrit

Related details

Attention is currently required from:
  • Ankush Singh
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: Ie48fe611fcf194a080096dfe44c349c9a8fe99b3
Gerrit-Change-Number: 7692096
Gerrit-PatchSet: 4
Gerrit-Owner: Mikel Astiz <mas...@chromium.org>
Gerrit-Reviewer: Ankush Singh <ankus...@google.com>
Gerrit-Reviewer: Mikel Astiz <mas...@chromium.org>
Gerrit-Attention: Ankush Singh <ankus...@google.com>
Gerrit-Comment-Date: Mon, 23 Mar 2026 17:16:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Ankush Singh (Gerrit)

unread,
6:32 AM (15 hours ago) 6:32 AM
to Mikel Astiz, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, shgar+aut...@google.com, armalhotra+a...@google.com, vinnypersky+...@google.com, osaul+aut...@google.com, siyua+aut...@chromium.org, siashah+au...@chromium.org, andysjl...@chromium.org, druber...@chromium.org, nwoked...@chromium.org, vakh+safe_br...@chromium.org, xinghui...@chromium.org, zackha...@chromium.org
Attention needed from Mikel Astiz

Ankush Singh added 8 comments

Patchset-level comments
File-level comment, Patchset 5 (Latest):
Ankush Singh . resolved

Thanks!

Commit Message
Line 9, Patchset 4:This behavior ressembles more closely what regular browser tests too,
Ankush Singh . unresolved

do?

Line 33, Patchset 4: to their expectations, as they could the number of tabs. With an
Ankush Singh . unresolved

typo?

File chrome/browser/sync/test/integration/single_client_bookmarks_sync_test.cc
Line 2232, Patchset 5 (Parent): EXPECT_THAT(GetFakeServer()->GetSyncEntitiesByDataType(syncer::BOOKMARKS),
Contains(Not(HasUniquePosition())).Times(2));
Ankush Singh . unresolved

Why does this expectation not hold true?

File chrome/browser/sync/test/integration/single_client_themes_sync_test.cc
Line 253, Patchset 5 (Latest): // TODO(crbug.com/356148174): Change the production logic to not uninstall
Ankush Singh . unresolved

This links to an already-closed bug. Maybe create a new one?
Also I'm unclear as to what's actually happening: When a new extension theme is installed we show an infobar to undo the applied theme. Are we closing that?

Line 255, Patchset 5 (Latest): CloseAllInfoBars(GetProfile(0));
Ankush Singh . unresolved

Can we instead move this to UseCustomTheme() instead?

File chrome/browser/sync/test/integration/sync_test.cc
Line 654, Patchset 4: browsers_.push_back(Browser::Create(Browser::CreateParams(profile, true)));
DCHECK_EQ(static_cast<size_t>(index), browsers_.size() - 1);

Browser* browser = browsers_.back();
chrome::AddSelectedTabWithURL(browser, GetInitialURL(),
ui::PAGE_TRANSITION_AUTO_TOPLEVEL);

// Show the browser window. Otherwise, the rendering pipeline might not
// initialize or produce frames (e.g., on Wayland headless bots), which
// can cause tests relying on hit test data or visual state to time out.
browser->window()->Show();
Ankush Singh . unresolved

optional: this code is almost the same as in AddBrowser() except the latter also adds the profile? Maybe we can dedup some of the code?

File chrome/browser/ui/views/autofill/payments/save_card_bubble_views_browsertest.cc
Line 1121, Patchset 5 (Latest): tab_count = 2;
Ankush Singh . unresolved

nit: maybe add a comment here to explain why it's 2 and not 1?

Open in Gerrit

Related details

Attention is currently required from:
  • Mikel Astiz
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: Ie48fe611fcf194a080096dfe44c349c9a8fe99b3
    Gerrit-Change-Number: 7692096
    Gerrit-PatchSet: 5
    Gerrit-Owner: Mikel Astiz <mas...@chromium.org>
    Gerrit-Reviewer: Ankush Singh <ankus...@google.com>
    Gerrit-Reviewer: Mikel Astiz <mas...@chromium.org>
    Gerrit-Attention: Mikel Astiz <mas...@chromium.org>
    Gerrit-Comment-Date: Tue, 24 Mar 2026 10:32:22 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Mikel Astiz (Gerrit)

    unread,
    10:01 AM (12 hours ago) 10:01 AM
    to Ankush Singh, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, shgar+aut...@google.com, armalhotra+a...@google.com, vinnypersky+...@google.com, osaul+aut...@google.com, siyua+aut...@chromium.org, siashah+au...@chromium.org, andysjl...@chromium.org, druber...@chromium.org, nwoked...@chromium.org, vakh+safe_br...@chromium.org, xinghui...@chromium.org, zackha...@chromium.org
    Attention needed from Ankush Singh

    Mikel Astiz added 8 comments

    Patchset-level comments
    File-level comment, Patchset 7 (Latest):
    Mikel Astiz . resolved

    Thanks, PTAL!

    Commit Message
    Line 9, Patchset 4:This behavior ressembles more closely what regular browser tests too,
    Ankush Singh . resolved

    do?

    Mikel Astiz

    Done

    Line 33, Patchset 4: to their expectations, as they could the number of tabs. With an
    Ankush Singh . resolved

    typo?

    Mikel Astiz

    Done

    File chrome/browser/sync/test/integration/single_client_bookmarks_sync_test.cc
    Line 2232, Patchset 5 (Parent): EXPECT_THAT(GetFakeServer()->GetSyncEntitiesByDataType(syncer::BOOKMARKS),
    Contains(Not(HasUniquePosition())).Times(2));
    Ankush Singh . unresolved

    Why does this expectation not hold true?

    Mikel Astiz

    As mentioned in the CL description, these tests expectations are fragile in the sense that they make assumptions about how other datatypes behave, including sessions. If sessions trigger a commit, the unique position is uploaded slightly earlier.

    File chrome/browser/sync/test/integration/single_client_themes_sync_test.cc
    Line 253, Patchset 5: // TODO(crbug.com/356148174): Change the production logic to not uninstall
    Ankush Singh . unresolved

    This links to an already-closed bug. Maybe create a new one?
    Also I'm unclear as to what's actually happening: When a new extension theme is installed we show an infobar to undo the applied theme. Are we closing that?

    Mikel Astiz

    This links to an already-closed bug. Maybe create a new one?

    Done.

    Also I'm unclear as to what's actually happening: When a new extension theme is installed we show an infobar to undo the applied theme. Are we closing that?

    It's also not very clear to me. But from what I can see, there is a pre-existing issue in tests, which is surfaced now because the notification UI influences the timing for `ThemeService::RemoveUnusedThemes()`, and the constraint that themes cannot be reinstalled automatically in tests (update URL is empty).

    Line 255, Patchset 5: CloseAllInfoBars(GetProfile(0));
    Ankush Singh . unresolved

    Can we instead move this to UseCustomTheme() instead?

    Mikel Astiz

    I believe that would also require moving the waiting logic, which seems undesirable. It would become something like `UseCustomThemeAndWait()`. Is this what you would prefer?

    Besides, if we do this for custom themes, we should for consistency also do it for other kinds of themes, e.g. `UseSystemTheme`. WDYT?

    File chrome/browser/sync/test/integration/sync_test.cc
    Line 654, Patchset 4: browsers_.push_back(Browser::Create(Browser::CreateParams(profile, true)));
    DCHECK_EQ(static_cast<size_t>(index), browsers_.size() - 1);

    Browser* browser = browsers_.back();
    chrome::AddSelectedTabWithURL(browser, GetInitialURL(),
    ui::PAGE_TRANSITION_AUTO_TOPLEVEL);

    // Show the browser window. Otherwise, the rendering pipeline might not
    // initialize or produce frames (e.g., on Wayland headless bots), which
    // can cause tests relying on hit test data or visual state to time out.
    browser->window()->Show();
    Ankush Singh . resolved

    optional: this code is almost the same as in AddBrowser() except the latter also adds the profile? Maybe we can dedup some of the code?

    Mikel Astiz

    This code will change in the next patch, so we can continue the discussion there.

    File chrome/browser/ui/views/autofill/payments/save_card_bubble_views_browsertest.cc
    Line 1121, Patchset 5: tab_count = 2;
    Ankush Singh . unresolved

    nit: maybe add a comment here to explain why it's 2 and not 1?

    Mikel Astiz

    I don't actually know how these numbers can be justified, except the fact that they need to increase by one with this patch. I will ask owners for their input and guidance.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Ankush Singh
    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: Ie48fe611fcf194a080096dfe44c349c9a8fe99b3
    Gerrit-Change-Number: 7692096
    Gerrit-PatchSet: 7
    Gerrit-Owner: Mikel Astiz <mas...@chromium.org>
    Gerrit-Reviewer: Ankush Singh <ankus...@google.com>
    Gerrit-Reviewer: Mikel Astiz <mas...@chromium.org>
    Gerrit-Attention: Ankush Singh <ankus...@google.com>
    Gerrit-Comment-Date: Tue, 24 Mar 2026 14:01:14 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Ankush Singh <ankus...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Ankush Singh (Gerrit)

    unread,
    11:22 AM (10 hours ago) 11:22 AM
    to Mikel Astiz, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, shgar+aut...@google.com, armalhotra+a...@google.com, vinnypersky+...@google.com, osaul+aut...@google.com, siyua+aut...@chromium.org, siashah+au...@chromium.org, andysjl...@chromium.org, druber...@chromium.org, nwoked...@chromium.org, vakh+safe_br...@chromium.org, xinghui...@chromium.org, zackha...@chromium.org
    Attention needed from Mikel Astiz

    Ankush Singh voted and added 3 comments

    Votes added by Ankush Singh

    Code-Review+1

    3 comments

    Patchset-level comments
    Ankush Singh . resolved

    Thanks! LGTM % open comments.

    File chrome/browser/sync/test/integration/single_client_bookmarks_sync_test.cc
    Line 2232, Patchset 5 (Parent): EXPECT_THAT(GetFakeServer()->GetSyncEntitiesByDataType(syncer::BOOKMARKS),
    Contains(Not(HasUniquePosition())).Times(2));
    Ankush Singh . resolved

    Why does this expectation not hold true?

    Mikel Astiz

    As mentioned in the CL description, these tests expectations are fragile in the sense that they make assumptions about how other datatypes behave, including sessions. If sessions trigger a commit, the unique position is uploaded slightly earlier.

    Ankush Singh

    Acknowledged

    File chrome/browser/sync/test/integration/single_client_themes_sync_test.cc
    Line 255, Patchset 5: CloseAllInfoBars(GetProfile(0));
    Ankush Singh . unresolved

    Can we instead move this to UseCustomTheme() instead?

    Mikel Astiz

    I believe that would also require moving the waiting logic, which seems undesirable. It would become something like `UseCustomThemeAndWait()`. Is this what you would prefer?

    Besides, if we do this for custom themes, we should for consistency also do it for other kinds of themes, e.g. `UseSystemTheme`. WDYT?

    Ankush Singh

    I think a `UseCustomThemeAndWaitForApply()` would be good. But we should wait for the theme to be applied rather that this wait with ServerThemeMatchChecker(). That is, `CustomThemeChecker(GetProfile(0)).Wait()`.

    Besides, if we do this for custom themes, we should for consistency also do it for other kinds of themes, e.g. UseSystemTheme. WDYT?

    Hmm, I don't think that's really necessary. IIRC all the other themes get applied instantaneously except for extension themes.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Mikel Astiz
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement 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: Ie48fe611fcf194a080096dfe44c349c9a8fe99b3
      Gerrit-Change-Number: 7692096
      Gerrit-PatchSet: 7
      Gerrit-Owner: Mikel Astiz <mas...@chromium.org>
      Gerrit-Reviewer: Ankush Singh <ankus...@google.com>
      Gerrit-Reviewer: Mikel Astiz <mas...@chromium.org>
      Gerrit-Attention: Mikel Astiz <mas...@chromium.org>
      Gerrit-Comment-Date: Tue, 24 Mar 2026 15:22:44 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Ankush Singh <ankus...@google.com>
      Comment-In-Reply-To: Mikel Astiz <mas...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Mikel Astiz (Gerrit)

      unread,
      2:34 PM (7 hours ago) 2:34 PM
      to Varun Khaneja, Vinny Persky, Ankush Singh, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, shgar+aut...@google.com, armalhotra+a...@google.com, vinnypersky+...@google.com, osaul+aut...@google.com, siyua+aut...@chromium.org, siashah+au...@chromium.org, andysjl...@chromium.org, druber...@chromium.org, nwoked...@chromium.org, vakh+safe_br...@chromium.org, xinghui...@chromium.org, zackha...@chromium.org
      Attention needed from Ankush Singh, Varun Khaneja and Vinny Persky

      Mikel Astiz added 1 comment

      File chrome/browser/ui/views/autofill/payments/save_card_bubble_views_browsertest.cc
      Line 1121, Patchset 5: tab_count = 2;
      Ankush Singh . unresolved

      nit: maybe add a comment here to explain why it's 2 and not 1?

      Mikel Astiz

      I don't actually know how these numbers can be justified, except the fact that they need to increase by one with this patch. I will ask owners for their input and guidance.

      Mikel Astiz

      vinny...@google.com can you help me understand (and perhaps document in code) where these numbers are coming from?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ankush Singh
      • Varun Khaneja
      • Vinny Persky
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement 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: Ie48fe611fcf194a080096dfe44c349c9a8fe99b3
      Gerrit-Change-Number: 7692096
      Gerrit-PatchSet: 7
      Gerrit-Owner: Mikel Astiz <mas...@chromium.org>
      Gerrit-Reviewer: Ankush Singh <ankus...@google.com>
      Gerrit-Reviewer: Mikel Astiz <mas...@chromium.org>
      Gerrit-Reviewer: Varun Khaneja <va...@chromium.org>
      Gerrit-Reviewer: Vinny Persky <vinny...@google.com>
      Gerrit-Attention: Ankush Singh <ankus...@google.com>
      Gerrit-Attention: Vinny Persky <vinny...@google.com>
      Gerrit-Attention: Varun Khaneja <va...@chromium.org>
      Gerrit-Comment-Date: Tue, 24 Mar 2026 18:34:21 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages