diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
commit | 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch) | |
tree | a4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /testing/web-platform/tests/svg/interact | |
parent | Adding debian version 124.0.1-1. (diff) | |
download | firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/svg/interact')
4 files changed, 125 insertions, 0 deletions
diff --git a/testing/web-platform/tests/svg/interact/scripted/async-02.html b/testing/web-platform/tests/svg/interact/scripted/async-02.html new file mode 100644 index 0000000000..c11fa9f33f --- /dev/null +++ b/testing/web-platform/tests/svg/interact/scripted/async-02.html @@ -0,0 +1,31 @@ +<html> + <head> + <title>Inline async module script without external deps onload blocking</title> + <link rel="help" href="https://svgwg.org/svg2-draft/interact.html#ScriptElement"/> + <meta name=timeout content=long> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <svg> + <script> + let loadFired = false; + let moduleRan = false + let test = async_test("Inline async module script vs. onload"); + window.addEventListener("load", test.step_func(function() { + loadFired = true; + assert_true(moduleRan, "Module should have run before the load event"); + test.step_timeout(function() { + test.done(); + }, 0); + })); + </script> + <script type="module" async> + moduleRan = true; + test.step_func(function() { + assert_false(loadFired, "onload should not have fired yet"); + }); + </script> + </svg> + </body> +</html> diff --git a/testing/web-platform/tests/svg/interact/scripted/async-03.html b/testing/web-platform/tests/svg/interact/scripted/async-03.html new file mode 100644 index 0000000000..fb8ee6d0de --- /dev/null +++ b/testing/web-platform/tests/svg/interact/scripted/async-03.html @@ -0,0 +1,31 @@ +<html> + <head> + <title>Inline async script without external deps onload blocking</title> + <link rel="help" href="https://svgwg.org/svg2-draft/interact.html#ScriptElement"/> + <meta name=timeout content=long> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <svg> + <script> + let loadFired = false; + let asyncRan = false + let test = async_test("Inline async script vs. onload"); + window.addEventListener("load", test.step_func(function() { + loadFired = true; + assert_true(asyncRan, "Async should have run before the load event"); + test.step_timeout(function() { + test.done(); + }, 0); + })); + </script> + <script async> + asyncRan = true; + test.step_func(function() { + assert_false(loadFired, "onload should not have fired yet"); + }); + </script> + </svg> + </body> +</html> diff --git a/testing/web-platform/tests/svg/interact/scripted/defer-02.html b/testing/web-platform/tests/svg/interact/scripted/defer-02.html new file mode 100644 index 0000000000..0fcebae0ae --- /dev/null +++ b/testing/web-platform/tests/svg/interact/scripted/defer-02.html @@ -0,0 +1,32 @@ +<html> + <head> + <title>Inline defer module script without external deps onload blocking</title> + <link rel="help" href="https://svgwg.org/svg2-draft/interact.html#ScriptElement"/> + <meta name=timeout content=long> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <svg> + <script> + let loadFired = false; + let moduleRan = false + let test = async_test("Inline defer module script vs. onload"); + window.addEventListener("load", test.step_func(function() { + loadFired = true; + assert_true(moduleRan, "Module should have run before the load event"); + test.step_timeout(function() { + test.done(); + }, 0); + })); + </script> + <!-- defer should be equivalent to neither defer nor async specified --> + <script type="module" defer> + moduleRan = true; + test.step_func(function() { + assert_false(loadFired, "onload should not have fired yet"); + }); + </script> + </svg> + </body> +</html> diff --git a/testing/web-platform/tests/svg/interact/scripted/module-02.html b/testing/web-platform/tests/svg/interact/scripted/module-02.html new file mode 100644 index 0000000000..8a6d6ac3f6 --- /dev/null +++ b/testing/web-platform/tests/svg/interact/scripted/module-02.html @@ -0,0 +1,31 @@ +<html> + <head> + <title>Inline module script without external deps onload blocking</title> + <link rel="help" href="https://svgwg.org/svg2-draft/interact.html#ScriptElement"/> + <meta name=timeout content=long> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <svg> + <script> + let loadFired = false; + let moduleRan = false + let test = async_test("Inline module script vs. onload"); + window.addEventListener("load", test.step_func(function() { + loadFired = true; + assert_true(moduleRan, "Module should have run before the load event"); + test.step_timeout(function() { + test.done(); + }, 0); + })); + </script> + <script type="module"> + moduleRan = true; + test.step_func(function() { + assert_false(loadFired, "onload should not have fired yet"); + }); + </script> + </svg> + </body> +</html> |