tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

browser_webconsole_mime_css_blocked.js (626B)


      1 /* Any copyright is dedicated to the Public Domain.
      2 * http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 // Tests that non-CSS parser errors get displayed by default.
      5 
      6 "use strict";
      7 
      8 const CSS_URI = "data:text/bogus,foo";
      9 const TEST_URI = `data:text/html,<!DOCTYPE html><link rel="stylesheet" href="${CSS_URI}">`;
     10 
     11 add_task(async function () {
     12  const hud = await openNewTabAndConsole(TEST_URI);
     13  const MSG = `The stylesheet ${CSS_URI} was not loaded because its MIME type, “text/bogus”, is not “text/css”`;
     14  await waitFor(() => findErrorMessage(hud, MSG), "", 100);
     15  ok(true, "MIME type error displayed");
     16 });