Commit Graph
10 Commits
Author SHA1 Message Date
Claudio DeSouza 7d54897d85 [cr143] InProcessBrowserTest::SelectFirstBrowser() removed
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}
2025-11-18 11:18:51 -05:00
cdesouza-chromium 821274796b [IWYU] Fixing logging inclusions pt.11 (#29531)
This change is one of many fixing inclusion for the following files:

    - `base/notimplemented.h`
    - `base/notreached.h`
    - `base/check.h`
    - `base/dcheck_is_on.h`
    - `base/check_deref.h`
    - `base/check_op.h`
    - `base/logging/log_severity.h`
    - `base/logging.h`

This change is a mechanical change done with the following script:
https://github.com/brave/brave-browser/issues/46707#issuecomment-2960116515

Resolves https://github.com/brave/brave-browser/issues/46707
2025-06-12 13:48:07 +01:00
cdesouza-chromium 4bb3cd6b1c [CodeHealth] Use cxx20's T::contains pt.1 (#26783)
In `cxx20`, there is a new function in associative containers called
`contains`, which should be used as a replacement to `base::Contains`.

Resolve https://github.com/brave/brave-browser/issues/42558
2024-11-28 07:53:45 +00:00
mkarolin 44cfd5bd7c Disables AllCommandsShouldBeExecutableWithoutCrash test. 2024-08-19 23:05:05 -04:00
mkarolin ff49ec8bfd Temporarily disable AllCommandsShouldBeExecutableWithoutCrash.
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.
2024-08-07 21:32:01 -04:00
mkarolin 6de633f4e9 Fixes CommandUtilsBrowserTest timing out.
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.
2024-08-07 21:31:21 -04:00
Emerick Rogul 66dbafb37a Add IDC_SHOW_AVATAR_MENU to browser commands exceptions list 2024-06-25 13:13:10 +01:00
Emerick Rogul 522c88e7e3 Add test exception for IDC_SHOW_MANAGEMENT_PAGE to avoid CHECK
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
2023-06-19 16:00:18 -04:00
Jay Harris 2e75abd0b9 [Command Palette]: Add more commands (#17920) 2023-04-06 04:25:16 +02:00
Jay Harris 48af20fdc0 Make it possible to view all commands in Brave, and their shortcuts (#16845)
Add a WebUI page where it's possible to view all commands and their
accelerators
2023-02-21 12:35:33 +13:00