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_true('csp' in i); | |
| 13 assert_equals('string', typeof (i.csp)); | |
|
Mike West
2016/09/27 07:54:21
Nit: I don't think you need `()` here.
| |
| 14 }, "<iframe> has a 'csp' attibute which is an empty string if undefined.") ; | |
| 15 | |
| 16 test(t => { | |
| 17 var i = document.createElement('iframe'); | |
| 18 i.setAttribute('csp', 123456); | |
| 19 assert_equals('123456', i.csp); | |
| 20 }, "<iframe>'s csp attribute is always a string."); | |
| 21 | |
| 22 test(t => { | |
| 23 var i = document.createElement('iframe'); | |
| 24 i.csp = 'value'; | |
| 25 assert_equals('value', i.getAttribute('csp')); | |
| 26 }, "<iframe>'s 'csp' content attribute reflects the IDL attribute."); | |
| 27 | |
| 28 test(t => { | |
| 29 var i = document.createElement('iframe'); | |
| 30 | |
|
Mike West
2016/09/27 07:54:22
Nit: You don't have this newline in any other test
| |
| 31 i.setAttribute('csp', 'value'); | |
| 32 assert_equals('value', i.csp); | |
| 33 }, "<iframe>'s IDL attribute reflects the DOM attribute."); | |
| 34 </script> | |
| 35 </body> | |
| 36 </html> | |
| OLD | NEW |