OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/js-test.js"></script> |
| 3 <script> |
| 4 description("This tests the handling of the script.crossOrigin attribute"); |
| 5 var script = document.createElement("script"); |
| 6 shouldBeTrue("'crossOrigin' in script"); |
| 7 shouldBeEqualToString("script.crossOrigin", ""); |
| 8 shouldBeEqualToString("script.setAttribute('crossorigin', ''); script.crossOrigi
n", "anonymous"); |
| 9 shouldBeEqualToString("script.removeAttribute('crossorigin'); script.crossOrigin
", ""); |
| 10 shouldBeEqualToString("script.setAttribute('crossorigin', 'foo'); script.crossOr
igin", "anonymous"); |
| 11 shouldBeEqualToString("script.setAttribute('crossorigin', 'ANONYMOUS'); script.c
rossOrigin", "anonymous"); |
| 12 shouldBeEqualToString("script.setAttribute('crossorigin', 'use-credentials'); sc
ript.crossOrigin", "use-credentials"); |
| 13 shouldBeEqualToString("script.crossOrigin = ''; script.getAttribute('crossorigin
')", ""); |
| 14 shouldBeEqualToString("script.crossOrigin = 'foo'; script.getAttribute('crossori
gin')", "foo"); |
| 15 shouldBeEqualToString("script.crossOrigin = null; script.getAttribute('crossorig
in')", "null"); |
| 16 shouldBeEqualToString("script.crossOrigin = 'ANONYMOUS'; script.getAttribute('cr
ossorigin')", "ANONYMOUS"); |
| 17 shouldBeEqualToString("script.crossOrigin = 'use-credentials'; script.getAttribu
te('crossorigin')", "use-credentials"); |
| 18 </script> |
OLD | NEW |