Index: LayoutTests/fast/dom/HTMLScriptElement/script-crossOrigin.html |
diff --git a/LayoutTests/fast/dom/HTMLScriptElement/script-crossOrigin.html b/LayoutTests/fast/dom/HTMLScriptElement/script-crossOrigin.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..daaf085b83d995e1a047e33603ecde00c5925dc7 |
--- /dev/null |
+++ b/LayoutTests/fast/dom/HTMLScriptElement/script-crossOrigin.html |
@@ -0,0 +1,18 @@ |
+<!DOCTYPE html> |
+<script src="../../../resources/js-test.js"></script> |
+<script> |
+description("This tests the handling of the script.crossOrigin attribute"); |
+var script = document.createElement("script"); |
+shouldBeTrue("'crossOrigin' in script"); |
+shouldBeEqualToString("script.crossOrigin", ""); |
+shouldBeEqualToString("script.setAttribute('crossorigin', ''); script.crossOrigin", "anonymous"); |
+shouldBeEqualToString("script.removeAttribute('crossorigin'); script.crossOrigin", ""); |
+shouldBeEqualToString("script.setAttribute('crossorigin', 'foo'); script.crossOrigin", "anonymous"); |
+shouldBeEqualToString("script.setAttribute('crossorigin', 'ANONYMOUS'); script.crossOrigin", "anonymous"); |
+shouldBeEqualToString("script.setAttribute('crossorigin', 'use-credentials'); script.crossOrigin", "use-credentials"); |
+shouldBeEqualToString("script.crossOrigin = ''; script.getAttribute('crossorigin')", ""); |
+shouldBeEqualToString("script.crossOrigin = 'foo'; script.getAttribute('crossorigin')", "foo"); |
+shouldBeEqualToString("script.crossOrigin = null; script.getAttribute('crossorigin')", "null"); |
+shouldBeEqualToString("script.crossOrigin = 'ANONYMOUS'; script.getAttribute('crossorigin')", "ANONYMOUS"); |
+shouldBeEqualToString("script.crossOrigin = 'use-credentials'; script.getAttribute('crossorigin')", "use-credentials"); |
+</script> |