Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="/resources/testharness.js"></script> | |
| 5 <script src="/resources/testharnessreport.js"></script> | |
| 6 </head> | |
| 7 <body> | |
| 8 <script> | |
| 9 test(t => { | |
| 10 var i = document.createElement('iframe'); | |
| 11 assert_equals('', i.csp); | |
| 12 assert_equals('string', typeof (i.csp)); | |
|
Mike West
2016/09/26 14:55:02
Nit: Can you add `assert_true('csp' in i)`?
| |
| 13 }, "<iframe> has a 'csp' attibute which is an empty string if undefined.") ; | |
| 14 | |
| 15 test(t => { | |
| 16 var i = document.createElement('iframe'); | |
| 17 i.setAttribute('csp', 123456); | |
| 18 assert_equals('123456', i.csp); | |
| 19 }, "<iframe>'s csp attribute is always a string."); | |
| 20 | |
| 21 test(t => { | |
| 22 var i = document.createElement('iframe'); | |
| 23 i.csp = 'value'; | |
| 24 assert_equals('value', i.getAttribute('csp')); | |
| 25 }, "<iframe> has a 'csp' attibute."); | |
|
Mike West
2016/09/26 14:55:02
Nit: Perhaps "<iframe>'s 'csp' content attribute r
| |
| 26 | |
| 27 test(t => { | |
| 28 var first_iframe = document.createElement('iframe'); | |
| 29 var second_iframe = document.createElement('iframe'); | |
| 30 | |
| 31 first_iframe.setAttribute('csp', 'value 1'); | |
| 32 assert_equals('value 1', first_iframe.csp); | |
| 33 | |
| 34 second_iframe.setAttribute('csp', 'value 2'); | |
| 35 assert_equals('value 2', second_iframe.csp); | |
| 36 }, "'csp' attribute of <iframe> has proper value."); | |
|
Mike West
2016/09/26 14:55:02
Nit: Perhaps "<iframe>'s IDL attribute reflects th
| |
| 37 </script> | |
| 38 </body> | |
| 39 </html> | |
| OLD | NEW |