Add a AllowSwiftShaderFallback finch feature as a killswitch. This
is currently *enabled by default* with a deprecation message.
Once AllowSwiftShaderFallback is disabled:
Disable falling back to SwiftShader as a result of multiple GPU crashes.
Instead, fall back to the display compositor.
Disable falling back to SwiftShader as a GL implementation unless it's
the only available implementation (current behaviour) AND
--allow-unsafe-swiftshader is passed to Chrome. This allows testing of
Chrome on systems without GPUs without exposing end users to
security issues in the SwANGLE stack.
Continue to allow SwiftShader to be used if it's explicitly requested
by command line with the --use-angle=swiftshader flag. This allows testing of Chrome's rasterization and WebGL using SwiftShader.
Bug: 40277080
Change-Id: I8b6f56acba1acb7a988232fb2f205a6be0da670f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5675974
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1350236}
Normally, this is automatically handled by BrowserTestBase::SetUp(), but
since this test uses its own logic to build the command line, replicate
the logic for using software GL here as well.
Without this, running this test under MSan actually triggers a failure,
since GL is not instrumented (and even if it were, hardware GL is
hostile to MSan). However, this was not previously detected, as the GPU
process would eventually fall back to software GL, and the MSan error
itself didn't actually cause the test to fatally fail.
Bug: 40267022
Cq-Include-Trybots: luci.chromium.try:linux-exp-msan-fyi-rel,linux-msan-chained-origins-rel,linux-msan-no-origins-rel,linux-webkit-msan-rel,linux_chromium_chromeos_msan_rel_ng,linux_chromium_msan_rel_ng
Change-Id: I2a3419f5cd402102ac2f9f6cbbb87aaca027d676
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5619855
Reviewed-by: Ken Rockot <rockot@google.com>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1313602}
The canonical bug format is TODO(crbug.com/<id>). TODOs of the
following forms will all be migrated to the new format:
- TODO(crbug.com/<old id>)
- TODO(https://crbug.com/<old id>)
- TODO(crbug/<old id>)
- TODO(crbug/monorail/<old id>)
- TODO(<old id>)
- TODO(issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/u/1/issues/<old id>)
- TODO(bugs.chromium.org/<old id>)
Bug id mapping is sourced from go/chrome-on-buganizer-prod-issues.
See go/crbug-todo-migration for details.
#crbug-todo-migration
Bug: b/321899722
Change-Id: Ieeb461e2d489e86fd50b87a2a0721a2be34520c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5467317
Owners-Override: Alison Gale <agale@chromium.org>
Commit-Queue: Darryl James <dljames@chromium.org>
Commit-Queue: Alison Gale <agale@chromium.org>
Reviewed-by: Darryl James <dljames@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1290198}
This is a reland of commit c37505129e,
which was reverted because of unit test failures in CI. These failures
did actually happen in CQ but were hidden there because later reruns
of the tests in isolation passed.
The only change is the weakening of a CHECK in
chromeos/startup/browser_init_params.cc that is necessary as long
as ViewTestsBase is used by both unit (crosapi disabled) and non-unit
(crosapi enabled) tests.
Original change's description:
> Reland "Lacros testing: Make browser init param overriding more robust"
>
> This is a reland of commit e5f6f1434e.
> The only difference is: disabling a test that conflicts with
> the new implementation (see b/323984075).
>
> Original change's description:
> > Lacros testing: Make browser init param overriding more robust
> >
> > See chromium:1508245 for context.
> >
> > - Decide whether crosapi is enabled based on the command line
> > switches. In particular, make it independent of when/whether
> > BrowserTestBase::SetUp gets called.
> > We still provide DisableCrosapiForTesting for legacy reasons,
> > as some tests need to ovrerride it.
> >
> > - This, plus some new checks, make it hard for tests
> > * to accidentally and silently override the Ash-provided init
> > params with mostly empty ones, or
> > * to accidentally and silently prevent the Ash-provided params
> > from even being read.
> >
> > - Address a TODO in InProcessBrowserTest thanks to these changes.
> >
> > - Call DisableCrosapiForTesting in ViewsTestBase-derived tests that
> > run with crosapi enabled but are not prepared to set it up (and thus
> > would fail one of the new checks) and in fact don't need crosapi.
> >
> > - Remove InProcessBrowserTest::IsCrosapiEnabled() in favor of
> > !chromeos::BrowserParamsProxy::IsCrosapiDisabledForTesting(). There
> > is no need to have the InProcessBrowserTest predicate and it's not
> > an InProcessBrowserTest level concept.
> >
> > - Remove ScopedDisableCrosapiForTesting class, as there is no need for
> > a scope. Tests should either not call DisableCrosapiForTesting at
> > all or should do it very early on (CHECK'd). Undoing it is not
> > supported and it's not neceesary because tests run in separate
> > processes.
> >
> > - Add documentation to startup/README.md.
> >
> > - Remove some uses of IsCrosapiDisabledForTesting from production code
> > that are no longer needed.
> >
> > Bug: chromium:1508245
> > Change-Id: Id6b68a25dae4c50132f957f4b80879fdcde2e7b2
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5076190
> > Reviewed-by: Avi Drissman <avi@chromium.org>
> > Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
> > Commit-Queue: Georg Neis <neis@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1255430}
>
> Bug: chromium:1508245, b/323984075
> Change-Id: I8cced0fe121b3edb757aacc07a706205566cbf24
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5267259
> Auto-Submit: Georg Neis <neis@chromium.org>
> Commit-Queue: Avi Drissman <avi@chromium.org>
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1257372}
Bug: chromium:1508245, b/323984075, b/324418102
Change-Id: I49c61ddc09d610962cae6c7bed88f7663d6a7ca5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5281235
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1259615}
This reverts commit c37505129e.
Reason for revert: suspect for crbug.com/324418102
Original change's description:
> Reland "Lacros testing: Make browser init param overriding more robust"
>
> This is a reland of commit e5f6f1434e.
> The only difference is: disabling a test that conflicts with
> the new implementation (see b/323984075).
>
> Original change's description:
> > Lacros testing: Make browser init param overriding more robust
> >
> > See chromium:1508245 for context.
> >
> > - Decide whether crosapi is enabled based on the command line
> > switches. In particular, make it independent of when/whether
> > BrowserTestBase::SetUp gets called.
> > We still provide DisableCrosapiForTesting for legacy reasons,
> > as some tests need to ovrerride it.
> >
> > - This, plus some new checks, make it hard for tests
> > * to accidentally and silently override the Ash-provided init
> > params with mostly empty ones, or
> > * to accidentally and silently prevent the Ash-provided params
> > from even being read.
> >
> > - Address a TODO in InProcessBrowserTest thanks to these changes.
> >
> > - Call DisableCrosapiForTesting in ViewsTestBase-derived tests that
> > run with crosapi enabled but are not prepared to set it up (and thus
> > would fail one of the new checks) and in fact don't need crosapi.
> >
> > - Remove InProcessBrowserTest::IsCrosapiEnabled() in favor of
> > !chromeos::BrowserParamsProxy::IsCrosapiDisabledForTesting(). There
> > is no need to have the InProcessBrowserTest predicate and it's not
> > an InProcessBrowserTest level concept.
> >
> > - Remove ScopedDisableCrosapiForTesting class, as there is no need for
> > a scope. Tests should either not call DisableCrosapiForTesting at
> > all or should do it very early on (CHECK'd). Undoing it is not
> > supported and it's not neceesary because tests run in separate
> > processes.
> >
> > - Add documentation to startup/README.md.
> >
> > - Remove some uses of IsCrosapiDisabledForTesting from production code
> > that are no longer needed.
> >
> > Bug: chromium:1508245
> > Change-Id: Id6b68a25dae4c50132f957f4b80879fdcde2e7b2
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5076190
> > Reviewed-by: Avi Drissman <avi@chromium.org>
> > Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
> > Commit-Queue: Georg Neis <neis@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1255430}
>
> Bug: chromium:1508245, b/323984075
> Change-Id: I8cced0fe121b3edb757aacc07a706205566cbf24
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5267259
> Auto-Submit: Georg Neis <neis@chromium.org>
> Commit-Queue: Avi Drissman <avi@chromium.org>
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1257372}
No-Try: true
Bug: chromium:1508245, b/323984075, 324418102
Change-Id: I31f73e8b39d0fb937d1d54816cda3e0b06874749
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5279657
Owners-Override: Francois Pierre Doray <fdoray@chromium.org>
Auto-Submit: Francois Pierre Doray <fdoray@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1257970}
This is a reland of commit e5f6f1434e.
The only difference is: disabling a test that conflicts with
the new implementation (see b/323984075).
Original change's description:
> Lacros testing: Make browser init param overriding more robust
>
> See chromium:1508245 for context.
>
> - Decide whether crosapi is enabled based on the command line
> switches. In particular, make it independent of when/whether
> BrowserTestBase::SetUp gets called.
> We still provide DisableCrosapiForTesting for legacy reasons,
> as some tests need to ovrerride it.
>
> - This, plus some new checks, make it hard for tests
> * to accidentally and silently override the Ash-provided init
> params with mostly empty ones, or
> * to accidentally and silently prevent the Ash-provided params
> from even being read.
>
> - Address a TODO in InProcessBrowserTest thanks to these changes.
>
> - Call DisableCrosapiForTesting in ViewsTestBase-derived tests that
> run with crosapi enabled but are not prepared to set it up (and thus
> would fail one of the new checks) and in fact don't need crosapi.
>
> - Remove InProcessBrowserTest::IsCrosapiEnabled() in favor of
> !chromeos::BrowserParamsProxy::IsCrosapiDisabledForTesting(). There
> is no need to have the InProcessBrowserTest predicate and it's not
> an InProcessBrowserTest level concept.
>
> - Remove ScopedDisableCrosapiForTesting class, as there is no need for
> a scope. Tests should either not call DisableCrosapiForTesting at
> all or should do it very early on (CHECK'd). Undoing it is not
> supported and it's not neceesary because tests run in separate
> processes.
>
> - Add documentation to startup/README.md.
>
> - Remove some uses of IsCrosapiDisabledForTesting from production code
> that are no longer needed.
>
> Bug: chromium:1508245
> Change-Id: Id6b68a25dae4c50132f957f4b80879fdcde2e7b2
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5076190
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1255430}
Bug: chromium:1508245, b/323984075
Change-Id: I8cced0fe121b3edb757aacc07a706205566cbf24
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5267259
Auto-Submit: Georg Neis <neis@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1257372}
Right now ozone platform usage is checked via #if defined(USE_OZONE).
This is error prone as a typo, eg. defined(USE_OZOEN), will compile but
the #if will always be false. BUILDFLAG(IS_OZONE) improves this by
making the typo into a compile error.
Update files in src/content to use the buildflag.
This CL was uploaded by git cl split.
Bug: 1377327
Change-Id: I4fcdf693b329478e874cbac3f525365d93cd006c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3995279
Auto-Submit: Kyle Charbonneau <kylechar@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Commit-Queue: Kyle Charbonneau <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1066513}
This makes it possible to experimentally replace the browser's
Mojo implementation at runtime.
The challenge here is that Mojo initialization needs to follow
FeatureList initialization, and FeatureList initialization is rather
variable across different process types and Content embedders.
After this CL:
- Mojo init logic is hoisted from ContentMainDelegate internals, into
its own public InitializeMojoCore() API in content/public/app/. This
includes shared memory allocation hooks and is suitable to call in
any Content process.
- Content by default still initializes Mojo, but now it always does so
immediately after FeatureList is initialized.
- Embedders can override Mojo initialization timing as they can override
FeatureList initialization timing; with the requirement that Mojo is
still initialized after FeatureList.
After this change, FeatureList will always be initialized by the time
mojo::core::Init() is called by any Content process, allowing the Mojo
implementation used by Content embedders to be configured by feature
flags.
LOW_COVERAGE_REASON=Much of the coverage here comes in the form of existing unit tests and browser tests which only provide coverage with
the MojoIpcz feature enabled. Low coverage will be remedied when
enabling the feature for tests.
Bug: 1299283
Change-Id: I7c37bcb6649d8c1e083639dd48b2170fbdc4f6df
Binary-Size: This is linking in a new library of code (ipcz) previously unused in production. The size increase is unavoidable but temporary, as this new library will eventually replace a library of similar code size which can be dropped from the build.
Fuchsia-Binary-Size: See above note.
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3846565
Reviewed-by: Bo Liu <boliu@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Yuchen Liu <yucliu@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1044520}
This is another CL that removes USE_X11 define and
gn arg usage from //content and also removes
IsUsingOzonePlatform condition as it's no longer
needed as it always resolves to true.
Bug: 1096425
Change-Id: Ibbf2e861b46ffd8156dfe6fd5c6df75c54b83ba9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3198073
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Cr-Commit-Position: refs/heads/main@{#937765}
This CL does a few things:
- It re-enables the HeadlessBrowserTest.WebGLSupported test
- It forces keeping SwANGLE as the chosen GL implementation,
even when SwiftShader for WebGL is selected
- It changes 2 switches in the code to proper constants,
rather than hardcoded strings
Bug: chromium:1196363
Bug: chromium:1195289
Change-Id: I1b8051d1bf4a6de066554fc3b8b40df0325bfdf4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2809658
Commit-Queue: Alexis Hetu <sugoi@google.com>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Peter Kvitek <kvitekp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#870485}
The change is mostly mechanical replacing defined(OS_CHROMEOS) with
BUILDFLAG(IS_CHROMEOS_ASH) and GN variable is_chromeos with
is_chromeos_ash with some special cases (For those cases please
refer to http://go/lacros-macros).
The patch is made in preparation to switching lacros build from
target_os=linux to target_os=chromeos. This will prevent lacros from
changing behaviour after the switch.
Bug: 1052397
Change-Id: Ieb265e116ff6ada5e2f99d609ff12fb9f92727e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2534271
Commit-Queue: Yuta Hijikata <ythjkt@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#829687}
These browser tests launch a separate browser process to communicate
with. The browser process starts its own GPU process, and MSAN can hit
uninitialized values in some GL drivers on Chrome OS.
This ensures that the launched browser always uses swiftshader for GL to
avoid any such memory issues.
Fixed: 1131586
Change-Id: I012853118d390c4893933279930a64bba42028bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2437017
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#811769}
Lacros used to use mojo_base::mojo::Binder to establish the
Mojo connection between Lacros and Ash chromes,
preferring the plataform independent way.
However, it is too late for passing initializing parameters,
which needs to be passed before starting the main message loop.
This CL directly binds the LacrosChromeService,
so that parameters can be available at earlier timing.
Bug: 1115092
Test: Ran Lacros locally.
Change-Id: I5345fa4bfe57b9a922e2d6c389c579266893d03b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2353976
Commit-Queue: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#801311}
There are some tests that create own cmdline that results in
missing kEnableFeatures and kOzonePlatform switches. As a consequence,
the browser parts start with a wrong config, which results in
failures and usage of the non-Ozone path for the use_x11 && use_ozone
config, and also in usage of the wrong OzonePlatform as it doesn't
know what platform the test has been launched with (linux-ozone-rel
testers pass headless/wayland/x11 to the cmdline, for example).
Solution is to copy all the previous switches.
Bug: 1115055
Change-Id: Ia7a1f2688b1d697073a96c6527145342deb13778
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2346355
Commit-Queue: Maksim Sisov (GMT+3) <msisov@igalia.com>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Reviewed-by: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799287}
This is a reland of 002e044483
No changes other than disabling the test under MSan where
it is broken and probably not worth fixing.
Original change's description:
> Support dynamic Mojo Core on Linux
>
> This introduces a new --mojo-core-library-path Content switch which
> instructs Content to initialize each process with an implementation
> of Mojo Core found in the referenced shared library rather than using
> the version linked into the main binary.
>
> This allows for IPC interoperability between a Content embedder and
> another application which provides its own copy of Mojo Core.
>
> Fixed: 1082473
> Change-Id: I1e50c505e91a53e60056a4b8c691d91728f7a5ea
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2229664
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Commit-Queue: Ken Rockot <rockot@google.com>
> Cr-Commit-Position: refs/heads/master@{#778002}
Tbr: avi@chromium.org
Change-Id: I6a2270c87c294455907fb369640b3be0819b2431
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2247166
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#780151}
This introduces a new --mojo-core-library-path Content switch which
instructs Content to initialize each process with an implementation
of Mojo Core found in the referenced shared library rather than using
the version linked into the main binary.
This allows for IPC interoperability between a Content embedder and
another application which provides its own copy of Mojo Core.
Fixed: 1082473
Change-Id: I1e50c505e91a53e60056a4b8c691d91728f7a5ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2229664
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#778002}
This adds support for launching the browser (for any Content
embedder) with a Mojo invitation on the command line, allowing
external clients to include the browser process in a pre-existing
Mojo process network and access a generic primordial Binder
interface akin to InterfaceProvider.
A simple browser test is added to verify that Content Shell can be
launched in this mode and the primordial Binder can be used by the
external launcher (in this case, content_browsertests) to bind a
new testing control interface (content.mojom.ShellController)
exposed by Content Shell.
See crbug.com/1082454 for motivating use cases.
Bug: 1082444, 1082454
Change-Id: I2cfc66d94aa9bdb5072e8ca63d95ae562b63b5b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2200004
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#773320}