| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script> | 4 <script> |
| 5 var req = new XMLHttpRequest(); | 5 var req = new XMLHttpRequest(); |
| 6 req.open('GET', location); | 6 req.open('GET', location); |
| 7 try { | 7 req.onerror = function() { |
| 8 req.send(); | 8 window.parent.postMessage('PASS', '*'); |
| 9 window.parent.postMessage('FAIL', '*'); | |
| 10 } catch (e) { | |
| 11 window.parent.postMessage(e.name, '*'); | |
| 12 } | 9 } |
| 10 req.send(); |
| 13 </script> | 11 </script> |
| 14 </head> | 12 </head> |
| 15 <body> | 13 <body> |
| 16 Documents loaded from file: shouldn't be able to access themselves via XHR. | 14 Documents loaded from file: shouldn't be able to access themselves via XHR. |
| 17 </body> | 15 </body> |
| 18 </html> | 16 </html> |
| OLD | NEW |