mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-10 05:08:36 +02:00
MozReview-Commit-ID: 3HXcvTYpAkA --HG-- rename : testing/web-platform/tests/fonts/matching/README.md => testing/web-platform/tests/css-fonts/matching/README.md rename : testing/web-platform/tests/fonts/matching/fixed-stretch-style-over-weight-ref.html => testing/web-platform/tests/css-fonts/matching/fixed-stretch-style-over-weight-ref.html rename : testing/web-platform/tests/fonts/matching/fixed-stretch-style-over-weight.html => testing/web-platform/tests/css-fonts/matching/fixed-stretch-style-over-weight.html rename : testing/web-platform/tests/fonts/matching/font-matching.css => testing/web-platform/tests/css-fonts/matching/font-matching.css rename : testing/web-platform/tests/fonts/matching/resources/variabletest_matching.ttf => testing/web-platform/tests/css-fonts/matching/resources/variabletest_matching.ttf rename : testing/web-platform/tests/fonts/matching/stretch-distance-over-weight-distance-ref.html => testing/web-platform/tests/css-fonts/matching/stretch-distance-over-weight-distance-ref.html rename : testing/web-platform/tests/fonts/matching/stretch-distance-over-weight-distance.html => testing/web-platform/tests/css-fonts/matching/stretch-distance-over-weight-distance.html rename : testing/web-platform/tests/fonts/matching/style-ranges-over-weight-direction-ref.html => testing/web-platform/tests/css-fonts/matching/style-ranges-over-weight-direction-ref.html rename : testing/web-platform/tests/fonts/matching/style-ranges-over-weight-direction.html => testing/web-platform/tests/css-fonts/matching/style-ranges-over-weight-direction.html rename : testing/web-platform/tests/payment-request/OWNERS => testing/web-platform/tests/payment-method-id/OWNERS rename : testing/web-platform/tests/storage/interfaces.worker.js => testing/web-platform/tests/storage/interfaces.https.worker.js rename : testing/web-platform/tests/tools/browserutils/requirements.txt => testing/web-platform/tests/tools/wpt/requirements.txt rename : testing/web-platform/tests/tools/browserutils/utils.py => testing/web-platform/tests/tools/wpt/utils.py rename : testing/web-platform/tests/tools/wptrunner/wptrunner/executors/reftest-wait.js => testing/web-platform/tests/tools/wptrunner/wptrunner/executors/reftest-wait_marionette.js rename : testing/web-platform/tests/uievents/keyboard/key-manual.css => testing/web-platform/tests/uievents/keyboard/key.css rename : testing/web-platform/tests/uievents/keyboard/key-manual.js => testing/web-platform/tests/uievents/keyboard/key.js
43 lines
1.4 KiB
HTML
43 lines
1.4 KiB
HTML
<!doctype html>
|
|
<meta charset="utf-8">
|
|
<title>Block mime type as script</title>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<div></div>
|
|
<script>
|
|
var noop = function() {};
|
|
|
|
["non-empty", "empty"].forEach(function(content) {
|
|
["text/csv",
|
|
"audio/aiff",
|
|
"audio/midi",
|
|
"audio/whatever",
|
|
"video/avi",
|
|
"video/fli",
|
|
"video/whatever",
|
|
"image/jpeg",
|
|
"image/gif",
|
|
"image/whatever"].forEach(function(test_case) {
|
|
async_test(function(t) {
|
|
var script = document.createElement("script");
|
|
script.onerror = t.step_func_done(noop);
|
|
script.onload = t.unreached_func("Unexpected load event");
|
|
script.src = "../resources/script-with-header.py?content=" + content +
|
|
"&mime=" + test_case;
|
|
document.body.appendChild(script);
|
|
}, "Should fail loading " + content + " script with " + test_case +
|
|
" MIME type");
|
|
});
|
|
});
|
|
|
|
["html", "plain"].forEach(function(test_case) {
|
|
async_test(function(t) {
|
|
var script = document.createElement("script");
|
|
script.onerror = t.unreached_func("Unexpected error event");
|
|
script.onload = t.step_func_done(noop);
|
|
script.src = "../resources/script-with-header.py?mime=text/" + test_case;
|
|
document.body.appendChild(script);
|
|
}, "Should load script with text/" + test_case + " MIME type");
|
|
});
|
|
|
|
</script>
|