| testRunner.waitUntilDone(); |
| var div = document.createElement('div'); |
| div.appendChild(document.createTextNode(msg)); |
| document.getElementById('console').appendChild(div); |
| window.addEventListener('message', function (e) { |
| // Call the function stored from the old iframe content. |
| setTimeout(ready_callback, 0); |
| var stored_function = function() { |
| log('FAIL: Original function called.'); |
| function set_function(f) { |
| // Store function in old_function. |
| // Change the source of the iframe. |
| "http://localhost:8000/security/resources/object-literals-cross-origin.html"; |
| function ready_callback() { |
| frames[0].postMessage('go', '*'); |
| <iframe src="resources/object-literals-same-origin.html"></iframe> |