OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../../resources/js-test.js"></script> | 2 <script src="../../../resources/js-test.js"></script> |
3 <script> | 3 <script> |
4 description("This tests the handling of the link.crossOrigin attribute"); | 4 description("This tests the handling of the link.crossOrigin attribute"); |
5 var link = document.createElement("link"); | 5 var link = document.createElement("link"); |
6 shouldBeTrue("'crossOrigin' in link"); | 6 shouldBeTrue("'crossOrigin' in link"); |
7 shouldBeEqualToString("link.crossOrigin", ""); | 7 shouldBeNull("link.crossOrigin"); |
8 shouldBeEqualToString("link.setAttribute('crossorigin', ''); link.crossOrigin",
"anonymous"); | 8 shouldBeEqualToString("link.setAttribute('crossorigin', ''); link.crossOrigin",
"anonymous"); |
9 shouldBeEqualToString("link.removeAttribute('crossorigin'); link.crossOrigin", "
"); | 9 shouldBeNull("link.removeAttribute('crossorigin'); link.crossOrigin"); |
10 shouldBeEqualToString("link.setAttribute('crossorigin', 'foo'); link.crossOrigin
", "anonymous"); | 10 shouldBeEqualToString("link.setAttribute('crossorigin', 'foo'); link.crossOrigin
", "anonymous"); |
11 shouldBeEqualToString("link.setAttribute('crossorigin', 'ANONYMOUS'); link.cross
Origin", "anonymous"); | 11 shouldBeEqualToString("link.setAttribute('crossorigin', 'ANONYMOUS'); link.cross
Origin", "anonymous"); |
12 shouldBeEqualToString("link.setAttribute('crossorigin', 'use-credentials'); link
.crossOrigin", "use-credentials"); | 12 shouldBeEqualToString("link.setAttribute('crossorigin', 'use-credentials'); link
.crossOrigin", "use-credentials"); |
13 shouldBeEqualToString("link.crossOrigin = ''; link.getAttribute('crossorigin')",
""); | 13 shouldBeEqualToString("link.crossOrigin = ''; link.getAttribute('crossorigin')",
""); |
14 shouldBeEqualToString("link.crossOrigin = 'foo'; link.getAttribute('crossorigin'
)", "foo"); | 14 shouldBeEqualToString("link.crossOrigin = 'foo'; link.getAttribute('crossorigin'
)", "foo"); |
15 shouldBeEqualToString("link.crossOrigin = null; link.getAttribute('crossorigin')
", "null"); | 15 shouldBeFalse("link.crossOrigin = null; link.hasAttribute('crossorigin')"); |
16 shouldBeEqualToString("link.crossOrigin = 'ANONYMOUS'; link.getAttribute('crosso
rigin')", "ANONYMOUS"); | 16 shouldBeEqualToString("link.crossOrigin = 'ANONYMOUS'; link.getAttribute('crosso
rigin')", "ANONYMOUS"); |
17 shouldBeEqualToString("link.crossOrigin = 'use-credentials'; link.getAttribute('
crossorigin')", "use-credentials"); | 17 shouldBeEqualToString("link.crossOrigin = 'use-credentials'; link.getAttribute('
crossorigin')", "use-credentials"); |
18 </script> | 18 </script> |
OLD | NEW |