Commit fc8d726c authored by Richard Townsend's avatar Richard Townsend Committed by Chromium LUCI CQ

fix: relax performance API checks for prefetch test

This test was flaky because occasionally one or more paint events
were included in the Performance API data. The check's been
relaxed to remove the intermittent failure.

Bug: 901056, 1164166, 1160655
Change-Id: I1fc89ad1cd60bd326b1516ae6b93814f10922b30
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2618483
Commit-Queue: Richard Townsend <richard.townsend@arm.com>
Reviewed-by: default avatarMason Freed <masonfreed@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841696}
parent de8dad51
......@@ -5939,8 +5939,6 @@ crbug.com/1161352 [ Mac10.14 ] external/wpt/webxr/xrSession_requestReferenceSpac
# Failing on Webkit Linux Leak only:
crbug.com/1046784 http/tests/devtools/tracing/timeline-receive-response-event.js [ Pass Failure ]
# Sheriff 2021-01-21
crbug.com/1164166 [ Linux ] virtual/synchronous_html_parser/external/wpt/preload/avoid-prefetching-on-text-plain.html [ Pass Failure ]
# Sheriff 2021-01-08
crbug.com/1164459 [ Mac ] virtual/synchronous_html_parser/external/wpt/preload/download-resources.html [ Pass Timeout ]
......
......@@ -23,8 +23,16 @@
urls.push(entry.name);
}
// If preloading is working correctly, should only see the text document
// represented in the performance information.
assert_array_equals(resource_types, ['navigation']);
// represented in the performance information. A 'resource' type indicates
// that we've prefetched something.
let resource_found = false;
for (const t of resource_types) {
if (t == "resource") {
resource_found = true;
break;
}
}
assert_false(resource_found, "no resources should be present");
assert_equals(urls.length, 1);
assert_equals(urls[0].endsWith("avoid-prefetching-on-text-plain-inner.html"), true);
done();
......
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