https://github.com/web-platform-tests/wpt
Raw File
Tip revision: e327f70a174f7dfa7e60d8f78024eae7e15d17a7 authored by moz-wptsync-bot on 14 February 2018, 22:12:15 UTC
Fix detached-context.https.html to not timeout due to promise reaction callbacks not firing for detached globals.
Tip revision: e327f70
TrustedURL.tentative.html
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="./support/helper.js"></script>
<script>
  test(t => {
    var url = TrustedURL.create(URLS.safe);

    assert_equals(url.toString(), URLS.safe);
  }, "Basic processing: safe URL, safe construction.");

  test(t => {
    var url = TrustedURL.unsafelyCreate(URLS.safe);

    assert_equals(url.toString(), URLS.safe);
  }, "Basic processing: safe URL, unsafe construction.");

  test(t => {
    var url = TrustedURL.create(URLS.javascript);

    assert_equals(url.toString(), URLS.sanitized);
  }, "Basic processing: javascript URL, safe construction.");

  test(t => {
    var url = TrustedURL.unsafelyCreate(URLS.javascript);

    assert_equals(url.toString(), URLS.javascript);
  }, "Basic processing: javascript URL, unsafe construction.");

  test(t => {
    var url = TrustedURL.create(URLS.external);

    assert_equals(url.toString(), URLS.sanitized);
  }, "Basic processing: external protocol URL, safe construction.");

  test(t => {
    var url = TrustedURL.unsafelyCreate(URLS.external);

    assert_equals(url.toString(), URLS.external);
  }, "Basic processing: external protocol URL, unsafe construction.");
</script>
back to top