Reland "Reland "[content] Standardize "message loop starts" signal across Desktop, Android, and browser tests""

This reverts commit 572ed6584aa927d5744fc3e3929de9212ae2d9f1.

Reason for reland: Fixed FontUniqueNameBrowserTest. This CL
enables all of BrowserMainLoop::PreMainMessageLoopRun() to complete
before running the test hook. The test was flaking because
BrowserMainLoop::PreMainMessageLoopRun() initializes
DWriteFontLookupTableBuilder already and the browser test fixture
was built like a unit test (invoking ResetStateForTesting) which
raced with the BrowserMainLoop's live init request. It is no longer
necessary to explicitly init before the test and never was to
reset after the test (browser tests don't reuse procs).

Original change's description:
> Revert "Reland "[content] Standardize "message loop starts" signal across Desktop, Android, and browser tests""
>
> This reverts commit eea969e4bed54b8e9ba593cc5a05d7acbd5e9516.
>
> Reason for revert: lines up as culprit for a second time for
> crbug.com/1269720... must be it even though I don't see why.
>
> Original change's description:
> > Reland "[content] Standardize "message loop starts" signal across Desktop, Android, and browser tests"
> >
> > This reverts commit 865c12f322f76fc35407775aff890da597737cb2.
> >
> > Reason for revert: attempting reland.
> >
> > Original change's description:
> > > Revert "[content] Standardize "message loop starts" signal across Desktop, Android, and browser tests"
> > >
> > > This reverts commit 67bcc9c2d16d1b50fc85450528be2163cdd7d3b4.
> > >
> > > Reason for revert: suspect for crbug.com/1269720 though I can't
> > > explain why it would cause that failure (and that one alone)
> > >
> > > Original change's description:
> > > > [content] Standardize "message loop starts" signal across Desktop, Android, and browser tests
> > > >
> > > > And make content (BrowserMainLoop) responsible for running the
> > > > integration test hook (`MainFunctionParams::ui_task`) instead of each
> > > > BrowserMainParts impl doing so slightly differently.
> > > >
> > > > This is mostly a no-op but for some BrowserMainParts which did more work
> > > > after running `ui_task`, that work will now happen before `ui_task`
> > > > runs.
> > > >
> > > > Metrics recording in //chrome is centralized at the end of
> > > > PreMainMessageLoopRun on all platforms.
> > > >
> > > > Standardizing cross-platform ordering avoids forcing 4 awkward ordering
> > > > requirements in
> > > > https://chromium-review.googlesource.com/c/chromium/src/+/2892251 (see
> > > > diff of TODOs no longer needed after rebasing on this CL :
> > > > https://chromium-review.googlesource.com/c/chromium/src/+/2892251/44..47)
> > > >
> > > > This also allows getting rid of a force function in
> > > > startup_metrics_browsertest.cc to pretend some metrics were logged
> > > > (they now actually are without interfering with the product code).
> > > >
> > > > Part of the uncovered portion of BrowserMainLoop::PreMainMessageLoopRun
> > > > in browser tests was the part setting disallowance to do Blocking/Wait
> > > > operations on main thread. Unfortunately adding this ban breaks many
> > > > tests, browser_test_base.cc explicitly inverts those new thread
> > > > restrictions in this CL with a TODO to bring them in-line with the
> > > > product restrictions.
> > > >
> > > > BrowserMainParts overrides can get also rid of their |run_message_loop_|
> > > > variable when moving handling of the browser test hook (`ui_task`) in
> > > > WillRunMainMessageLoop(). And in a follow-up they will be updated to
> > > > only receive a `bool is_integration_test` from CreateBrowserMainParts
> > > > instead of the full MainFunctionParams which none use beyond that bool.
> > > >
> > > > ContentBrowserTestSanityTests verify that browser test bodies still run
> > > > as expected with this change.
> > > >
> > > > Bug: 1175074, 1253634
> > > > Change-Id: Ib757a02bbd982ef2b1132e2791e8ec1ce0305038
> > > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3187153
> > > > Reviewed-by: Alexander Timin <altimin@chromium.org>
> > > > Reviewed-by: Sean Topping <seantopping@chromium.org>
> > > > Reviewed-by: Scott Violet <sky@chromium.org>
> > > > Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
> > > > Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
> > > > Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
> > > > Reviewed-by: Bo <boliu@chromium.org>
> > > > Commit-Queue: Gabriel Charette <gab@chromium.org>
> > > > Cr-Commit-Position: refs/heads/main@{#940917}
> > >
> > > TBR=sky@chromium.org,gab@chromium.org,boliu@chromium.org,rdevlin.cronin@chromium.org,sergeyu@chromium.org,skyostil@chromium.org,altimin@chromium.org,seantopping@chromium.org,chromium-scoped@luci-project-accounts.iam.gserviceaccount.com
> > >
> > > Change-Id: I5ebcb181286d31e3a0bfb293c394da00e7970da4
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: 1175074, 1253634, 1269720
> > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3276956
> > > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> > > Reviewed-by: Gabriel Charette <gab@chromium.org>
> > > Reviewed-by: anthonyvd <anthonyvd@chromium.org>
> > > Auto-Submit: Gabriel Charette <gab@chromium.org>
> > > Owners-Override: anthonyvd <anthonyvd@chromium.org>
> > > Cr-Commit-Position: refs/heads/main@{#941225}
> >
> > # Not skipping CQ checks because this is a reland.
> >
> > Bug: 1175074, 1253634, 1269720
> > Change-Id: Ib0a6a93300425b62458206e2650735850fd68aec
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3279623
> > Reviewed-by: Gabriel Charette <gab@chromium.org>
> > Reviewed-by: anthonyvd <anthonyvd@chromium.org>
> > Reviewed-by: Sean Topping <seantopping@chromium.org>
> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> > Auto-Submit: Gabriel Charette <gab@chromium.org>
> > Commit-Queue: anthonyvd <anthonyvd@chromium.org>
> > Commit-Queue: Sean Topping <seantopping@chromium.org>
> > Owners-Override: anthonyvd <anthonyvd@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#941336}
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: 1175074, 1253634, 1269720
> Change-Id: I8744b1abc5d68e5cc3462e6513ff3b466b3232c6
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3278582
> Reviewed-by: Gabriel Charette <gab@chromium.org>
> Reviewed-by: Sébastien Marchand <sebmarchand@chromium.org>
> Reviewed-by: Scott Violet <sky@chromium.org>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Owners-Override: Gabriel Charette <gab@chromium.org>
> Commit-Queue: Gabriel Charette <gab@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#941764}

Test: Explicitly ran win7-rel
Bug: 1175074, 1253634, 1269720
Change-Id: Ie75d87045e6e756ef85799afc79519d1fbbe8c9a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3306906
Commit-Queue: Alexander Timin <altimin@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Owners-Override: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#946449}
24 files changed
tree: 5d86b9f01bd189fb1dbdf84c4a5402126dfe3d97
  1. android_webview/
  2. apps/
  3. ash/
  4. base/
  5. build/
  6. build_overrides/
  7. buildtools/
  8. cc/
  9. chrome/
  10. chromecast/
  11. chromeos/
  12. cloud_print/
  13. codelabs/
  14. components/
  15. content/
  16. courgette/
  17. crypto/
  18. dbus/
  19. device/
  20. docs/
  21. extensions/
  22. fuchsia/
  23. gin/
  24. google_apis/
  25. google_update/
  26. gpu/
  27. headless/
  28. infra/
  29. ios/
  30. ipc/
  31. jingle/
  32. media/
  33. mojo/
  34. native_client_sdk/
  35. net/
  36. pdf/
  37. ppapi/
  38. printing/
  39. remoting/
  40. rlz/
  41. sandbox/
  42. services/
  43. skia/
  44. sql/
  45. storage/
  46. styleguide/
  47. testing/
  48. third_party/
  49. tools/
  50. ui/
  51. url/
  52. weblayer/
  53. .clang-format
  54. .clang-tidy
  55. .eslintrc.js
  56. .git-blame-ignore-revs
  57. .gitattributes
  58. .gitignore
  59. .gn
  60. .mailmap
  61. .rustfmt.toml
  62. .vpython
  63. .vpython3
  64. .yapfignore
  65. AUTHORS
  66. BUILD.gn
  67. CODE_OF_CONDUCT.md
  68. codereview.settings
  69. DEPS
  70. DIR_METADATA
  71. ENG_REVIEW_OWNERS
  72. LICENSE
  73. LICENSE.chromium_os
  74. OWNERS
  75. PRESUBMIT.py
  76. PRESUBMIT_test.py
  77. PRESUBMIT_test_mocks.py
  78. README.md
  79. WATCHLISTS
README.md

Logo Chromium

Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.

The project's web site is https://www.chromium.org.

To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.

Documentation in the source is rooted in docs/README.md.

Learn how to Get Around the Chromium Source Code Directory Structure .

For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.

If you found a bug, please file it at https://crbug.com/new.