| testRunner.waitUntilDone(); |
| var div = document.createElement("div"); |
| div.appendChild(document.createTextNode(msg)); |
| document.getElementById("result").appendChild(div); |
| window.onload = function () { |
| // The setTimeout handlers will get called after the |
| postMessage("Message1", "*"); |
| postMessage("Message2", "*"); |
| postMessage("Message3", "*"); |
| setTimeout("log('setTimeout1')", 0); |
| setTimeout("log('setTimeout2')", 0); |
| addEventListener("message", function (e) { |
| log("Capture phase: " + e.data); |
| addEventListener("message", function (e) { |
| log("Bubble phase: " + e.data); |
| document.addEventListener("message", function (e) { |
| log("FAIL: Capture phase (document): " + e.data); |
| document.addEventListener("message", function (e) { |
| log("FAIL: Bubble phase (document): " + e.data); |
| <div id="result">waiting...</div> |