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

Side by Side Diff: LayoutTests/media/track/opera/interfaces/HTMLElement/HTMLMediaElement/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 <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, null);
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, 'anonymous'); 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, 'anonymous'); 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'), '');
39 }, document.title+', setting to empty string'); 39 }, document.title+', setting to empty string');
40 test(function(){ 40 test(function(){
41 var video = document.createElement('video'); 41 var video = document.createElement('video');
42 video.crossOrigin = null; 42 video.crossOrigin = null;
43 assert_equals(video.getAttribute('crossorigin'), 'null'); 43 assert_false(video.hasAttribute('crossorigin'));
44 }, document.title+', setting to null'); 44 }, document.title+', setting to null');
45 test(function(){ 45 test(function(){
46 var video = document.createElement('video'); 46 var video = document.createElement('video');
47 video.crossOrigin = 'foo'; 47 video.crossOrigin = 'foo';
48 assert_equals(video.getAttribute('crossorigin'), 'foo'); 48 assert_equals(video.getAttribute('crossorigin'), 'foo');
49 }, document.title+', setting to invalid value'); 49 }, document.title+', setting to invalid value');
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>
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/element-attribute-js-null-expected.txt ('k') | Source/core/html/HTMLImageElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698