This value is now set with the help of `BrowserCreatedObserver`.
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/5202ab57139b9c0d8a6be73af944eb5601a09d74
commit 5202ab57139b9c0d8a6be73af944eb5601a09d74
Author: Thomas Lukaszewicz <tluk@chromium.org>
Date: Wed Oct 8 18:22:18 2025 -0700
[bedrock] Remove InProcessBrowserTest::SelectLastActive()
There are no intended behavioral changes in this CL, this is purely
a test refactor.
This CL replaces all remaining uses of SelectFirstBrowser() with
SetBrowser(), forcing tests to be explicit which Browser instance
is being set to default - eliminating the dependency on
BrowserList ordering.
During setup the last-active Browser is now set as the default
Browser instance. In the vast majority of cases (barring possibly
session-restore browser tests) this is the only Browser instance in
the environment.
Bug: 431672609
Change-Id: I0c0eb6e0a7a5b8a7d194c6b27ee3f90ac2972c1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7019129
Commit-Queue: Tom Lukaszewicz <tluk@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1527272}
This test is flaky.
On Windows it occasionally crashes in
safe_browsing::IncidentReportingService::Receiver::AddIncidentForProfile [0x00007FF7331FCD50+336]
(C:\ws\src\chrome\browser\safe_browsing\incident_reporting\incident_reporting_service.cc:227)
safe_browsing::PreferenceValidationDelegate::OnSplitPreferenceValidation [0x00007FF735421392+274]
(C:\ws\src\chrome\browser\safe_browsing\incident_reporting\preference_validation_delegate.cc:125)
prefs::mojom::TrackedPreferenceValidationDelegateStubDispatch::Accept
On MacOS it times out and gets killed.
In both cases the test seems to run to the end and encounters problems
on shutting down.
The timeout was likely due to executing Add new profile command which would
block on the profile name dialog and all consequent commands would be
attempted to be executed on that browser. Added code to select the first
browser each time before executing the command.
Also, on Windows and Linux, the test was likely exiting early because
IDC_CLOSE_TAB and IDC_CLOSE_WINDOW would exit the browser if they were
the only tab/window present.
IDC_SHOW_MANAGEMENT_PAGE ends up calling CHECK(ShouldDisplayManagedUi(profile)),
so we need to exclude that command.
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/0511fd204a68cd4a457cc008a13ad540c6de1a4a
commit 0511fd204a68cd4a457cc008a13ad540c6de1a4a
Author: James Lee <ljjlee@google.com>
Date: Fri May 26 08:57:24 2023 +0000
Link app menu managed UI to Family Link page
For supervised users on a device which is not enterprise-managed, link
to the Family Link web page (instead of chrome://management) in the
app menu item.
Sending for early review ahead of adding test coverage.
Bug: b/281641773