Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / intercept-postmessage.html
blob6b3b00040576c3cd914f1affd605797626986fc3
1 <!DOCTYPE html>
2 <html>
3 <body><pre id="console"></pre></body>
4 <script>
5 function write(str) {
6 pre = document.getElementById('console');
7 text = document.createTextNode(str + '\n');
8 pre.appendChild(text);
11 function recvMsg1(e) {
12 write("RECV1");
13 window.removeEventListener("message", recvMsg1, false);
15 if (window.testRunner)
16 testRunner.interceptPostMessage = true;
18 window.addEventListener("message", recvMsg2, false);
19 window.postMessage("Message 2", "*");
21 // Ensure that we're intercepting postMessages before the origin check
22 window.postMessage("Message 3", "http://example.org");
24 if (window.testRunner) {
25 // We need to call setTimeout here because we intercept the next event.
26 window.setTimeout(function() { testRunner.notifyDone(); });
30 function recvMsg2(e) {
31 write("RECV2");
34 window.addEventListener("message", recvMsg1, false);
36 if (window.testRunner) {
37 window.testRunner.dumpAsText();
38 window.testRunner.waitUntilDone();
41 window.postMessage("Message 1", "*");
42 </script>
43 </html>