Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: LayoutTests/fast/dom/HTMLScriptElement/script-crossOrigin.html

Issue 131483006: Correctly reflect the 'crossOrigin' attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove empty line Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698