blob: 07cb4a801966006065adca4a5635d798c5c8ef94 [file] [log] [blame]
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script>
<body>
<script>
test(t => {
var url = TrustedURL.create(location.href + "#xxx");
location.assign(url);
assert_equals("" + url, location.href, "location href");
}, "Basic processing: safe URL, safe construction.");
test(t => {
var url = TrustedURL.unsafelyCreate(location.href + "#xxx");
location.assign(url);
assert_equals("" + url, location.href, "location href");
}, "Basic processing: safe URL, unsafe construction.");
</script>