5 if (window
.testRunner
) {
6 testRunner
.dumpAsText();
7 testRunner
.waitUntilDone();
11 var div
= document
.createElement('div');
12 div
.appendChild(document
.createTextNode(msg
));
13 document
.getElementById('console').appendChild(div
);
16 window
.addEventListener('message', function (e
) {
19 // Call the function stored from the old iframe content.
20 setTimeout(ready_callback
, 0);
23 if (window
.testRunner
)
24 testRunner
.notifyDone();
32 var stored_function = function() {
33 log('FAIL: Original function called.');
36 function set_function(f
) {
37 // Store function in old_function.
39 // Change the source of the iframe.
41 "http://localhost:8000/security/resources/object-literals-cross-origin.html";
44 function ready_callback() {
46 frames
[0].postMessage('go', '*');
50 <iframe src=
"resources/object-literals-same-origin.html"></iframe>