mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-16 16:28:58 +00:00
handle empty hashes in Location
This commit is contained in:
@@ -15,6 +15,10 @@
|
||||
</script>
|
||||
|
||||
<script id=location_hash>
|
||||
location.hash = "";
|
||||
testing.expectEqual("", location.hash);
|
||||
testing.expectEqual('http://localhost:9582/src/tests/html/location.html', location.href);
|
||||
|
||||
location.hash = "#abcdef";
|
||||
testing.expectEqual("#abcdef", location.hash);
|
||||
testing.expectEqual('http://localhost:9582/src/tests/html/location.html#abcdef', location.href);
|
||||
@@ -22,4 +26,8 @@
|
||||
location.hash = "xyzxyz";
|
||||
testing.expectEqual("#xyzxyz", location.hash);
|
||||
testing.expectEqual('http://localhost:9582/src/tests/html/location.html#xyzxyz', location.href);
|
||||
|
||||
location.hash = "";
|
||||
testing.expectEqual("", location.hash);
|
||||
testing.expectEqual('http://localhost:9582/src/tests/html/location.html', location.href);
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user