Commit 4fc27325 authored by Emilio Cobos Álvarez's avatar Emilio Cobos Álvarez
Browse files

Bug 1766619 - Fix mochitest to not fail when the link comes from the stylesheet cache.

In which case it applies synchronously. This fixes a TV failure (which
wasn't really caused by my patch).

Differential Revision: https://phabricator.services.mozilla.com/D144977
parent 5b228e4c
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -53,11 +53,9 @@ const tests = [
      let link = doc.createElement("link");
      link.rel = "stylesheet";
      link.href = "getCSSStyleRules-2.css";
      let load = new Promise(resolve => { link.onload = resolve; });
      doc.head.appendChild(link);
      // Check the rules synchronously when the stylesheet has not been
      // loaded, there should still be no rule matches.
      checkRules(doc, [1]);
      await new Promise(resolve => { link.onload = resolve; });
      await load;
      checkRules(doc, [1, 2]);
    },
  },