Fix intermittent SpeedReaderBrowserTest.ShowOriginalPage failure (#35718)
WaitDistilled() was called without checking its return value. If distillation times out or fails, the state doesn't reach Distilled, but the test proceeds to look for a DOM element that only exists in distilled HTML, resulting in a misleading timeout error. All other calls to WaitDistilled() in this file use ASSERT_TRUE(WaitDistilled()), which catches the failure early with a clear error message. Resolves brave/brave-browser#54582
This commit is contained in:
@@ -652,8 +652,7 @@ IN_PROC_BROWSER_TEST_F(SpeedReaderBrowserTest, ReloadContent) {
|
||||
IN_PROC_BROWSER_TEST_F(SpeedReaderBrowserTest, ShowOriginalPage) {
|
||||
EnableSpeedreaderAllowedForAllSites();
|
||||
NavigateToPageSynchronously(kTestPageReadable);
|
||||
// Wait for distillation to complete before interacting with distilled content
|
||||
WaitDistilled();
|
||||
ASSERT_TRUE(WaitDistilled());
|
||||
auto* web_contents = ActiveWebContents();
|
||||
|
||||
static constexpr char kCheckNoApiInMainWorld[] =
|
||||
|
||||
Reference in New Issue
Block a user