Revision df4bdf53c4e851fe1006f0fcc2943fc8cd7f3a92 authored by Florian Rivoal on 29 March 2018, 06:13:03 UTC, committed by Florian Rivoal on 29 March 2018, 06:13:03 UTC
1 parent 55846d5
location-href.tentative.html
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="./support/helper.js"></script>
<body>
<script>
promise_test(t => {
var url = TrustedURL.create(URLS.safe);
return createFrameAndHref(url);
}, "Basic processing: safe URL, safe construction.");
promise_test(t => {
var url = TrustedURL.unsafelyCreate(URLS.safe);
return createFrameAndHref(url);
}, "Basic processing: safe URL, unsafe construction.");
promise_test(t => {
var url = TrustedURL.create(URLS.javascript);
return createFrameAndHref(url).then(i => {
assert_equals(i.contentDocument.body.innerText, "");
});
}, "Basic processing: javascript URL, safe construction.");
promise_test(t => {
var url = TrustedURL.unsafelyCreate(URLS.javascript);
return createFrameAndHref(url).then(i => {
assert_equals(i.contentDocument.body.innerText, "scripted");
});
}, "Basic processing: javascript URL, unsafe construction.");
</script>
Computing file changes ...