Let the tiles scenario allow the page's web fonts

The check for requests to Google and Cesium ion caught the Google Fonts
stylesheet the page loads on every run, which the map policy allows; it
now looks only for tiles, credits and ion.
This commit is contained in:
German Khokhlov committed 2026-11-10 22:28:15 +04:00
1 parent ee87482f07
commit ed47de6a2c
1 file changed
+6 -2
+6 -2
View File
@@ -309,9 +309,13 @@ await strict.run({}, async (browser) => {
}
if (report) console.log(`REPORT browser errors ${JSON.stringify(errors)}`);
else assert.deepEqual(errors, []);
// No Google tiles, credits or Cesium ion; the page's web fonts (allowed by
// the map policy) come from Google's font hosts on every run.
assert.deepEqual(
Object.keys(strict.ledger.external).filter((host) =>
/google|gstatic|cesium\.com/i.test(host),
Object.keys(strict.ledger.external).filter(
(host) =>
/google|gstatic|cesium\.com/i.test(host) &&
!/^fonts\.(googleapis|gstatic)\.com$/i.test(host),
),
[],
);