Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test gets skipped with pattern: asan
- Manifest: devtools/client/webconsole/test/browser/_webconsole.toml
/* Any copyright is dedicated to the Public Domain.
// Tests that <script> loads with JSON MIME types produce a warning.
"use strict";
const TEST_URI =
"test/browser/" +
"test-json-mime.html";
const MIME_WARNING_MSG =
"The script from “https://example.com/browser/devtools/client/webconsole/test/browser/test-json-mime.json” was loaded even though its MIME type (“application/json”) is not a valid JavaScript MIME type.";
add_task(async function () {
const hud = await openNewTabAndConsole(TEST_URI);
await waitFor(() => findWarningMessage(hud, MIME_WARNING_MSG), "", 100);
ok(true, "JSON MIME type warning displayed");
});