OLD | NEW |
(Empty) | |
| 1 if (window.testRunner) { |
| 2 testRunner.dumpAsText(); |
| 3 testRunner.waitUntilDone(); |
| 4 } |
| 5 |
| 6 function appendObjectElement(type) { |
| 7 window.onload = function () { |
| 8 var o = document.createElement('object'); |
| 9 o.setAttribute('type', 'application/x-webkit-test-netscape'); |
| 10 o.addEventListener('load', function () { |
| 11 console.log('FAIL: The object should have been blocked.'); |
| 12 if (window.testRunner) |
| 13 testRunner.notifyDone(); |
| 14 }); |
| 15 o.addEventListener('error', function () { |
| 16 console.log('PASS: Error occurred, so load was correctly blocked.'); |
| 17 if (window.testRunner) |
| 18 testRunner.notifyDone(); |
| 19 }); |
| 20 |
| 21 var p = document.createElement('param'); |
| 22 p.setAttribute('value', 'http://127.0.0.1:8080/plugins/resources/mock-pl
ugin.pl?' + type); |
| 23 p.setAttribute('name', type); |
| 24 |
| 25 o.appendChild(p); |
| 26 |
| 27 document.body.appendChild(o); |
| 28 }; |
| 29 } |
OLD | NEW |