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