In Progress
Status Update
Comments
ma...@microsoft.com <ma...@microsoft.com>
ap...@google.com <ap...@google.com> #2
Project: chromium/src
Branch: main
Author: Manu Singh <
Link:
Fix for ChromeUpdatesEventsApiTest.ChromeUpdates flaky browser test
Expand for full commit details
Fix for ChromeUpdatesEventsApiTest.ChromeUpdates flaky browser test
This test is flaky because we add extension names to the
observed_extension_names_ set in SetUpOnMainThread() based on frames created.
Extension frames take time to create, so sometimes they aren't ready when
SetUpOnMainThread() runs. To fix this, we should check for extension hosts
created to add the extension names to the observed_extension_names_ set.
This will fix the issue because extension hosts are created before frames.
Bug: 399819876
Change-Id: I0d84a7bc15e0d17894403fa30fc18630e8ab4e1f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6317785
Reviewed-by: David Bertoni <dbertoni@chromium.org>
Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
Commit-Queue: Manu Singh <manusingh@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1428718}
Files:
- M
chrome/browser/extensions/events_apitest.cc
Hash: d892b28bb7e0eec7d454cdad7bcbe1f4c9926db2
Date: Wed Mar 05 20:47:38 2025
Description
Here are the failure logs-
[ RUN ] ChromeUpdatesEventsApiTest.ChromeUpdates
[9828:9640:0227/234330.448:WARNING:viz_main_impl.cc(85)] VizNullHypothesis is disabled (not a warning)
..\..\chrome\browser\extensions\events_apitest.cc(623): error: Value of: observed_extension_names().count("chrome updates listener")
Actual: false
Expected: true
Stack trace:
extensions::`anonymous namespace'::ChromeUpdatesEventsApiTest_ChromeUpdates_Test::RunTestOnMainThread [0x00007FF7334D3BBC+620] (o:\chrome\browser\extensions\events_apitest.cc:623)
content::BrowserTestBase::ProxyRunTestOnMainThreadLoop [0x00007FF73AF0AAE8+968] (o:\content\public\test\browser_test_base.cc:890)
content::BrowserMainLoop::RunMainMessageLoop [0x00007FF737B6C60B+123] (o:\content\browser\browser_main_loop.cc:1073)
content::BrowserMainRunnerImpl::Run [0x00007FF737B6E721+17] (o:\content\browser\browser_main_runner_impl.cc:157)
content::BrowserMain [0x00007FF737B69235+181] (o:\content\browser\browser_main.cc:32)
content::RunBrowserProcessMain [0x00007FF7395B13B9+281] (o:\content\app\content_main_runner_impl.cc:716)
content::ContentMainRunnerImpl::RunBrowser [0x00007FF7395B27CC+636] (o:\content\app\content_main_runner_impl.cc:1296)
content::ContentMainRunnerImpl::Run [0x00007FF7395B24F4+692] (o:\content\app\content_main_runner_impl.cc:1155)
content::RunContentProcess [0x00007FF7395AD462+850] (o:\content\app\content_main.cc:360)
content::ContentMain [0x00007FF7395AD898+136] (o:\content\app\content_main.cc:373)
content::BrowserTestBase::SetUp [0x00007FF73AF09DE2+2626] (o:\content\public\test\browser_test_base.cc:558)
InProcessBrowserTest::SetUp [0x00007FF73A0AA4AB+363] (o:\chrome\test\base\in_process_browser_test.cc:554)
[ FAILED ] ChromeUpdatesEventsApiTest.ChromeUpdates, where TypeParam = and GetParam() = (7967 ms)
Link-
This issue is we are using frames created to determine which all extensions are being awaked.
Frames takes time to get created so in some cases the frames are not created by the time the extension names are pushed in the set.