Bug 1637703 [wpt PR 23573] - [ResourceTiming] Fix flaky test, a=testonly

Automatic update from web-platform-tests
[ResourceTiming] Fix flaky test

Looks like the recent change to status-codes-create-entry.html made it
flaky, so this CL undos that. It also removes the analogous check in the
new test cross-origin-status-codes.html.

TBR=yoavweiss@chromium.org

Bug: 1082046
Change-Id: I8efadeb117905c1e665ef010bca32dd49664b4ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2198606
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#768273}

--

wpt-commits: fa5c01c9b7f67eeb11e6b32453bec8968c8ceca8
wpt-pr: 23573
This commit is contained in:
Nicolás Peña Moreno 2020-05-21 09:57:11 +00:00 коммит произвёл moz-wptsync-bot
Родитель db49e80efe
Коммит d65cb76a39
2 изменённых файлов: 2 добавлений и 3 удалений

Просмотреть файл

@ -31,7 +31,6 @@ async_test(t => {
if (!entry.name.includes("status-code"))
return;
assert_equals(nameMap[entry.name], undefined, `Found duplicate entry for ${entry.name}`);
nameMap[entry.name] = true;
if (!firstEntry) {
firstEntry = entry;

Просмотреть файл

@ -18,13 +18,13 @@ async_test(t => {
window.addEventListener("load", t.step_func_done(() => {
const images = document.getElementsByTagName("img");
for (let img of images) {
assert_equals(performance.getEntriesByName(img.src).length, 1, img.src);
assert_greater_than(performance.getEntriesByName(img.src).length, 0, img.src);
}
const scripts = document.getElementsByTagName("script");
let noSrcScriptFound = false;
for (let script of scripts) {
if (script.src) {
assert_equals(performance.getEntriesByName(script.src).length, 1, script.src);
assert_greater_than(performance.getEntriesByName(script.src).length, 0, script.src);
} else {
// Ignore this script, which has no src value. There should only be one such script.
assert_false(noSrcScriptFound);