Commit 2fa20960 authored by Mario Bianucci's avatar Mario Bianucci Committed by Commit Bot

Change flaky browser test to fail with more/better information

RenderWidgetHostDelegatedInkMetadataTest.
FlagGetsSetFromRenderFrameMetadata is mildly flaky on various release
builds, but I have not been able to repro it once across several
thousand runs on win10 and linux chromeos. In an effort to try to get
to the bottom of the issue, this CL slightly changes the test. The goal
here is to make the test fail in a more obvious way if the issue is that
the presenter promise did not resolve in time. With this change, if the
promise hasn't been resolved, then updateInkTrailStartPoint will be
called on a null presenter, so the error will be much more obvious.

Bug: 1096994
Change-Id: I45dd80bb22cbcd874c5c7412e9a91f8bf55b1399
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2527823Reviewed-by: default avatarDaniel Libby <dlibby@microsoft.com>
Reviewed-by: default avatarKen Buchanan <kenrb@chromium.org>
Commit-Queue: Mario Bianucci <mabian@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#826451}
parent 5b52a628
......@@ -872,12 +872,14 @@ class RenderWidgetHostDelegatedInkMetadataTest
IN_PROC_BROWSER_TEST_F(RenderWidgetHostDelegatedInkMetadataTest,
FlagGetsSetFromRenderFrameMetadata) {
ASSERT_TRUE(ExecJs(shell()->web_contents(), R"(
let presenter = navigator.ink.requestPresenter('delegated-ink-trail');
let presenter = null;
navigator.ink.requestPresenter('delegated-ink-trail').then(e => {
presenter = e;
});
let style = { color: 'green', diameter: 21 };
window.addEventListener('pointermove' , evt => {
presenter.then( function(v) {
v.updateInkTrailStartPoint(evt, style);
});
presenter.updateInkTrailStartPoint(evt, style);
});
)"));
SimulateRoutedMouseEvent(blink::WebInputEvent::Type::kMouseMove, 10, 10, 0,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment