diff options
author | bptato <nincsnevem662@gmail.com> | 2024-05-04 19:43:42 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-05-04 20:06:58 +0200 |
commit | 63442e5f8be17631a91cee352e441f59daa2df0a (patch) | |
tree | d546f8c0bf6884464ace32f2a083ce5098e064b1 /test/js/reflect.html | |
parent | 970378356d0d7239b332baa37470455391b5e6e4 (diff) | |
download | chawan-63442e5f8be17631a91cee352e441f59daa2df0a.tar.gz |
client: make quit() actually quit, misc fixes
* unwind the QJS stack with an uncatchable exception when quit is called * clean up JS references in JSRuntime free even when the Nim counterparts are still alive * simplify some tests
Diffstat (limited to 'test/js/reflect.html')
-rw-r--r-- | test/js/reflect.html | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/test/js/reflect.html b/test/js/reflect.html index 45debe39..9b2ed4cb 100644 --- a/test/js/reflect.html +++ b/test/js/reflect.html @@ -1,18 +1,17 @@ <!doctype html> <div id=abc>Fail</div> <a class=claz target="abcd">test test</a> +<script src=asserts.js></script> <script> -(function() { - let x = document.getElementById("abc") - let a = document.getElementsByTagName("a")[0]; - if (a.target != "abcd") return; - a.target = "defg"; - if (a.target != "defg") return; - if (a.relList != "") return; - a.relList = "..."; - if (a.relList != "...") return; - if (a.className != "claz") return; - x.textContent = "Success"; - a.remove(); /* ignore target... */ -})() +const x = document.getElementById("abc") +const a = document.getElementsByTagName("a")[0]; +assert_equals(a.target, "abcd"); +a.target = "defg"; +assert_equals(a.target, "defg"); +assert_equals(a.relList + "", ""); +a.relList = "..."; +assert_equals(a.relList + "", "..."); +assert_equals(a.className, "claz"); +x.textContent = "Success"; +a.remove(); /* ignore target... */ </script> |