is font cache partitioning failing?
https://privacytests.org/ the current issue 51 shows MB failing font caching
details
ISSUE 51 MB
write: async (key) => {
let style = document.createElement("style");
style.type='text/css';
let fontURI = testURI("resource", "font", key);
style.innerHTML = `@font-face {font-family: "myFont"; src: url("${fontURI}"); } body { font-family: "myFont" }`;
document.getElementsByTagName("head")[0].appendChild(style);
return key;
}
read: async (key) => {
let style = document.createElement("style");
style.type='text/css';
let fontURI = testURI("resource", "font", key);
style.innerHTML = `@font-face {font-family: "myFont"; src: url("${fontURI}"); } body { font-family: "myFont" }`;
document.getElementsByTagName("head")[0].appendChild(style);
await sleepMs(500);
let response = await fetch(
testURI("ctr", "font", key), {"cache": "reload"});
return (await response.text()).trim();
}
result, same first party: 1, 1, 1
result, different first party: 1, 1, 1
unsupported: false, false, false
passed: false, false, false
test failed: false, false, false
AFAICT sometimes these are false positives (I am not sure how Arthur tests this), for example in issue 47 TB also fails font caching
details
ISSUE 47 TB
write: async (key) => {
let style = document.createElement("style");
style.type='text/css';
let fontURI = testURI("resource", "font", key);
style.innerHTML = `@font-face {font-family: "myFont"; src: url("${fontURI}"); } body { font-family: "myFont" }`;
document.getElementsByTagName("head")[0].appendChild(style);
return key;
}
read: async (key) => {
let style = document.createElement("style");
style.type='text/css';
let fontURI = testURI("resource", "font", key);
style.innerHTML = `@font-face {font-family: "myFont"; src: url("${fontURI}"); } body { font-family: "myFont" }`;
document.getElementsByTagName("head")[0].appendChild(style);
await sleepMs(500);
let response = await fetch(
testURI("ctr", "font", key), {"cache": "reload"});
return (await response.text()).trim();
}
result, same first party: 1, 1, 1, 1, 1
result, different first party: 2, 1, 2, 2, 2
unsupported: false, false, false, false, false
passed: true, false, true, true, true
test failed: false, false, false, false, false
However the difference in the two results above might suggest something more is at play here - when TB fails it's one font, MB seems to be failing all of them. Maybe this is similar to how TZP 1.0 doesn't elegantly test MB's font protection because it doesn't use isTB - @pierov - also see https://github.com/privacytests/privacytests.org/issues/153 if anyone wants to check the issue with Arthur directly
Edited by Thorin