Commit fb6e201f authored by Nasko Oskov's avatar Nasko Oskov Committed by Commit Bot

Enable WebNavigationApiTest.Failures test.

This CL enables the WebNavigationApiTest.Failures, which was flaky on
various platforms. After tracing the source of flakiness, it boiled down
to internals of Blink and behavior difference when there is a
subresource that is still being loaded. If the JS "cancel()" method is
called and such a subresource is still in the process of loading, the
load is cancelled and the DidFailLoad callback for the document does
not get dispatched due to how internal state has changed. In the
success cases, the subresource is not in loading state, which allows
the expected dispatch of DidFailLoad callback for the document.

As such, a simple fix for the flakiness is to remove the image tag
from the document, allowing it to be deterministic in the cancellation
behavior.

Bug: 477840, 746407, 868880
Change-Id: I8a23575a9c31f0670315fd6ef55b65874e9f1700
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2128571Reviewed-by: default avatarAlex Moshchuk <alexmos@chromium.org>
Commit-Queue: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#754729}
parent f3e7d975
......@@ -315,14 +315,7 @@ IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, SimpleLoad) {
ASSERT_TRUE(RunExtensionTest("webnavigation/simpleLoad")) << message_;
}
// Flaky on Windows, Mac and Linux. See http://crbug.com/477480 (Windows) and
// https://crbug.com/746407 (Mac, Linux).
#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
#define MAYBE_Failures DISABLED_Failures
#else
#define MAYBE_Failures Failures
#endif
IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, MAYBE_Failures) {
IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, Failures) {
ASSERT_TRUE(RunExtensionTest("webnavigation/failures")) << message_;
}
......
<script src="e.js"></script>
<img src="nonexistent/img.gif">
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