chromium/third_party/blink/web_tests/fast/dom/HTMLLinkElement/link-crossOrigin.html

<!DOCTYPE html>
<script src="../../../resources/js-test.js"></script>
<script>
description("This tests the handling of the link.crossOrigin attribute");
var link = document.createElement("link");
shouldBeTrue("'crossOrigin' in link");
shouldBeNull("link.crossOrigin");
shouldBeEqualToString("link.setAttribute('crossorigin', ''); link.crossOrigin", "anonymous");
shouldBeNull("link.removeAttribute('crossorigin'); link.crossOrigin");
shouldBeEqualToString("link.setAttribute('crossorigin', 'foo'); link.crossOrigin", "anonymous");
shouldBeEqualToString("link.setAttribute('crossorigin', 'ANONYMOUS'); link.crossOrigin", "anonymous");
shouldBeEqualToString("link.setAttribute('crossorigin', 'use-credentials'); link.crossOrigin", "use-credentials");
shouldBeEqualToString("link.crossOrigin = ''; link.getAttribute('crossorigin')", "");
shouldBeEqualToString("link.crossOrigin = 'foo'; link.getAttribute('crossorigin')", "foo");
shouldBeFalse("link.crossOrigin = null; link.hasAttribute('crossorigin')");
shouldBeEqualToString("link.crossOrigin = 'ANONYMOUS'; link.getAttribute('crossorigin')", "ANONYMOUS");
shouldBeEqualToString("link.crossOrigin = 'use-credentials'; link.getAttribute('crossorigin')", "use-credentials");
</script>