diff --git a/tests/support/browser/strict-browser-test.ts b/tests/support/browser/strict-browser-test.ts index edde745..3a2d408 100644 --- a/tests/support/browser/strict-browser-test.ts +++ b/tests/support/browser/strict-browser-test.ts @@ -16,11 +16,22 @@ import { const FIREFOX_PRETENDARD_NAME_ORDER = /^\[JavaScript Warning: "downloadable font: name: name records are not sorted\. \(font-family: "Pretendard Variable" style:normal weight:45\.\.920 stretch:100 src index:0\) source: http:\/\/127\.0\.0\.1:\d+\/[\w./@-]*PretendardVariable(?:-[\w-]+)?\.woff2"\]$/u; +/** + * Template 1103/11-09. WebKit's guess, three seconds after the load event, + * that a preload went unused. It fires for chunks the page runs a moment + * later, which on the desktop host is often (WebKit takes about 4 s to open a + * page there). The template replaces it with a check of its own that every + * preloaded script ran (preload-use.ts); that check is not ported yet. + */ +const WEBKIT_UNUSED_PRELOAD_GUESS = + /^The resource \S+ was preloaded using link preload but not used within a few seconds from the window's load event\. Please make sure it wasn't preloaded for nothing\.$/u; + function ignoredConsole(message: ConsoleMessage) { return ( message.type() === "warning" && (message.text().includes("NO_COLOR") || - FIREFOX_PRETENDARD_NAME_ORDER.test(message.text())) + FIREFOX_PRETENDARD_NAME_ORDER.test(message.text()) || + WEBKIT_UNUSED_PRELOAD_GUESS.test(message.text())) ); }