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

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

Issue 529933002: Make 'crossOrigin' IDL attributes nullable (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 6 years, 3 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 unified diff | Download patch
OLDNEW
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 script.crossOrigin attribute"); 4 description("This tests the handling of the script.crossOrigin attribute");
5 var script = document.createElement("script"); 5 var script = document.createElement("script");
6 shouldBeTrue("'crossOrigin' in script"); 6 shouldBeTrue("'crossOrigin' in script");
7 shouldBeEqualToString("script.crossOrigin", ""); 7 shouldBeNull("script.crossOrigin");
8 shouldBeEqualToString("script.setAttribute('crossorigin', ''); script.crossOrigi n", "anonymous"); 8 shouldBeEqualToString("script.setAttribute('crossorigin', ''); script.crossOrigi n", "anonymous");
9 shouldBeEqualToString("script.removeAttribute('crossorigin'); script.crossOrigin ", ""); 9 shouldBeNull("script.removeAttribute('crossorigin'); script.crossOrigin");
10 shouldBeEqualToString("script.setAttribute('crossorigin', 'foo'); script.crossOr igin", "anonymous"); 10 shouldBeEqualToString("script.setAttribute('crossorigin', 'foo'); script.crossOr igin", "anonymous");
11 shouldBeEqualToString("script.setAttribute('crossorigin', 'ANONYMOUS'); script.c rossOrigin", "anonymous"); 11 shouldBeEqualToString("script.setAttribute('crossorigin', 'ANONYMOUS'); script.c rossOrigin", "anonymous");
12 shouldBeEqualToString("script.setAttribute('crossorigin', 'use-credentials'); sc ript.crossOrigin", "use-credentials"); 12 shouldBeEqualToString("script.setAttribute('crossorigin', 'use-credentials'); sc ript.crossOrigin", "use-credentials");
13 shouldBeEqualToString("script.crossOrigin = ''; script.getAttribute('crossorigin ')", ""); 13 shouldBeEqualToString("script.crossOrigin = ''; script.getAttribute('crossorigin ')", "");
14 shouldBeEqualToString("script.crossOrigin = 'foo'; script.getAttribute('crossori gin')", "foo"); 14 shouldBeEqualToString("script.crossOrigin = 'foo'; script.getAttribute('crossori gin')", "foo");
15 shouldBeEqualToString("script.crossOrigin = null; script.getAttribute('crossorig in')", "null"); 15 shouldBeFalse("script.crossOrigin = null; script.hasAttribute('crossorigin')");
16 shouldBeEqualToString("script.crossOrigin = 'ANONYMOUS'; script.getAttribute('cr ossorigin')", "ANONYMOUS"); 16 shouldBeEqualToString("script.crossOrigin = 'ANONYMOUS'; script.getAttribute('cr ossorigin')", "ANONYMOUS");
17 shouldBeEqualToString("script.crossOrigin = 'use-credentials'; script.getAttribu te('crossorigin')", "use-credentials"); 17 shouldBeEqualToString("script.crossOrigin = 'use-credentials'; script.getAttribu te('crossorigin')", "use-credentials");
18 </script> 18 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698