OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <title>HTMLMediaElement.crossOrigin</title> | 2 <title>HTMLMediaElement.crossOrigin</title> |
3 <script src=../../../../../../resources/testharness.js></script> | 3 <script src=../../../../../../resources/testharness.js></script> |
4 <script src=../../../../../../resources/testharnessreport.js></script> | 4 <script src=../../../../../../resources/testharnessreport.js></script> |
5 <div id=log></div> | 5 <div id=log></div> |
6 <script> | 6 <script> |
7 test(function(){ | 7 test(function(){ |
8 var video = document.createElement('video'); | 8 var video = document.createElement('video'); |
9 assert_true('crossOrigin' in video); | 9 assert_true('crossOrigin' in video); |
10 }); | 10 }); |
11 test(function(){ | 11 test(function(){ |
12 var video = document.createElement('video'); | 12 var video = document.createElement('video'); |
13 assert_equals(video.crossOrigin, ''); | 13 assert_equals(video.crossOrigin, ''); |
14 }, document.title+', content attribute missing'); | 14 }, document.title+', content attribute missing'); |
15 test(function(){ | 15 test(function(){ |
16 var video = document.createElement('video'); | 16 var video = document.createElement('video'); |
17 video.setAttribute('crossorigin', 'foo'); | 17 video.setAttribute('crossorigin', 'foo'); |
18 assert_equals(video.crossOrigin, 'foo'); | 18 assert_equals(video.crossOrigin, 'anonymous'); |
19 }, document.title+', content attribute invalid value'); | 19 }, document.title+', content attribute invalid value'); |
20 test(function(){ | 20 test(function(){ |
21 var video = document.createElement('video'); | 21 var video = document.createElement('video'); |
22 video.setAttribute('crossorigin', ''); | 22 video.setAttribute('crossorigin', ''); |
23 assert_equals(video.crossOrigin, ''); | 23 assert_equals(video.crossOrigin, 'anonymous'); |
24 }, document.title+', content attribute empty string'); | 24 }, document.title+', content attribute empty string'); |
25 test(function(){ | 25 test(function(){ |
26 var video = document.createElement('video'); | 26 var video = document.createElement('video'); |
27 video.setAttribute('crossorigin', 'ANONYMOUS'); | 27 video.setAttribute('crossorigin', 'ANONYMOUS'); |
28 assert_equals(video.crossOrigin, 'ANONYMOUS'); | 28 assert_equals(video.crossOrigin, 'anonymous'); |
29 }, document.title+', content attribute uppercase ANONYMOUS'); | 29 }, document.title+', content attribute uppercase ANONYMOUS'); |
30 test(function(){ | 30 test(function(){ |
31 var video = document.createElement('video'); | 31 var video = document.createElement('video'); |
32 video.setAttribute('crossorigin', 'use-credentials'); | 32 video.setAttribute('crossorigin', 'use-credentials'); |
33 assert_equals(video.crossOrigin, 'use-credentials'); | 33 assert_equals(video.crossOrigin, 'use-credentials'); |
34 }, document.title+', content attribute use-credentials'); | 34 }, document.title+', content attribute use-credentials'); |
35 test(function(){ | 35 test(function(){ |
36 var video = document.createElement('video'); | 36 var video = document.createElement('video'); |
37 video.crossOrigin = ''; | 37 video.crossOrigin = ''; |
38 assert_equals(video.getAttribute('crossorigin'), ''); | 38 assert_equals(video.getAttribute('crossorigin'), ''); |
(...skipping 11 matching lines...) Expand all Loading... |
50 test(function(){ | 50 test(function(){ |
51 var video = document.createElement('video'); | 51 var video = document.createElement('video'); |
52 video.crossOrigin = 'ANONYMOUS'; | 52 video.crossOrigin = 'ANONYMOUS'; |
53 assert_equals(video.getAttribute('crossorigin'), 'ANONYMOUS'); | 53 assert_equals(video.getAttribute('crossorigin'), 'ANONYMOUS'); |
54 }, document.title+', setting to uppercase ANONYMOUS'); | 54 }, document.title+', setting to uppercase ANONYMOUS'); |
55 test(function(){ | 55 test(function(){ |
56 var video = document.createElement('video'); | 56 var video = document.createElement('video'); |
57 video.crossOrigin = 'use-credentials'; | 57 video.crossOrigin = 'use-credentials'; |
58 assert_equals(video.getAttribute('crossorigin'), 'use-credentials'); | 58 assert_equals(video.getAttribute('crossorigin'), 'use-credentials'); |
59 }, document.title+', setting to use-credentials'); | 59 }, document.title+', setting to use-credentials'); |
60 </script> | 60 </script> |
OLD | NEW |