add location set hash tests

This commit is contained in:
Muki Kiboigo
2025-11-03 07:01:50 -08:00
parent c009669ec8
commit 3cc53b579b
2 changed files with 11 additions and 1 deletions

View File

@@ -13,3 +13,13 @@
testing.expectEqual("9582", location.port);
testing.expectEqual("", location.search);
</script>
<script id=location_hash>
location.hash = "#abcdef";
testing.expectEqual("#abcdef", location.hash);
testing.expectEqual('http://localhost:9582/src/tests/html/location.html#abcdef', location.href);
location.hash = "xyzxyz";
testing.expectEqual("#xyzxyz", location.hash);
testing.expectEqual('http://localhost:9582/src/tests/html/location.html#xyzxyz', location.href);
</script>