0

[blink] Update docs/threading_and_tasks_testing.md for blink::test::TaskEnvironment

Bug: 1315595
Change-Id: Ic1fbba8e6483a0a594e29a56643ce1d5db7016ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5122818
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1240184}
This commit is contained in:
Etienne Pierre-doray
2023-12-21 16:57:30 +00:00
committed by Chromium LUCI CQ
parent dd19278e21
commit c3c341b7e0

@ -158,13 +158,12 @@ trait for rare instances that desire distinct physical BrowserThreads.
This is the //ios equivalent of `content::BrowserTaskEnvironment` to simulate
`web::WebThread`.
### Blink ?
### blink::test::TaskEnvironment
We would like to have something like `blink::BlinkTaskEnvironment` to simulate
Blink's task posting infrastructure. We don't have it yet because Blink can be
initialized only once and some things have to be reused across multiple unit
tests which makes creating per-test task environment quite tricky. Contributions
welcome!
This is the same thing as base::test::TaskEnvironment with the addition of
blink::MainThreadScheduler and blink::MainThreadIsolate support. You need this
if-and-only-if the code under test is using blink::Thread::Current() or needs
v8::Isolate::GetCurrent() to be a blink Isolate.
## Task Environment Traits and Abilities