diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/scripting-1/the-script-element/import-attributes/empty-attributes-clause.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/scripting-1/the-script-element/import-attributes/empty-attributes-clause.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/import-attributes/empty-attributes-clause.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/import-attributes/empty-attributes-clause.html new file mode 100644 index 0000000000..0a8868b2f4 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/import-attributes/empty-attributes-clause.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<title>Handling of empty import attributes clause</title> + +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + window.log = []; + + window.addEventListener("error", ev => log.push(ev.error)); + + const test_load = async_test( + "Test that no error occurs when an empty import attributes clause is provided."); + window.addEventListener("load", test_load.step_func_done(ev => { + assert_array_equals(window.log, ["hello", "empty-attributes-clause"]); + })); + + function unreachable() { log.push("unexpected"); } +</script> +<script type="module" src="./empty-attributes-clause.js" onerror="unreachable()"></script> |