      const href = testURI(&quot;resource&quot;, &quot;css&quot;, key);
      const head = document.getElementsByTagName(&quot;head&quot;)[0];
      head.innerHTML += `&lt;link type=&quot;text/css&quot; rel=&quot;stylesheet&quot; href=&quot;${href}&quot;&gt;`;
      const testElement = document.querySelector(&quot;#css&quot;);
      let fontFamily;
      while (true) {
        await sleepMs(100);
        fontFamily = getComputedStyle(testElement).fontFamily;
        if (fontFamily.startsWith(&quot;fake&quot