Index: LayoutTests/inspector/sources/debugger/resources/post-message-listener.html |
diff --git a/LayoutTests/inspector/sources/debugger/resources/post-message-listener.html b/LayoutTests/inspector/sources/debugger/resources/post-message-listener.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ba5c7134250cf9158fb91e7ff5af611100b9b945 |
--- /dev/null |
+++ b/LayoutTests/inspector/sources/debugger/resources/post-message-listener.html |
@@ -0,0 +1,19 @@ |
+<!DOCTYPE html> |
+<html> |
+<body> |
+<script> |
+function onMessageReceivedInFrame(e) { |
+ var msg = 'Received message: data="' + e.data + '" origin="' + e.origin + '"'; |
+ debugger; |
+ postMessageToParent(msg); |
+} |
+ |
+function postMessageToParent(msg) |
+{ |
+ top.postMessage(msg, "*"); |
+} |
+ |
+window.addEventListener("message", onMessageReceivedInFrame, false); |
+</script> |
+</body> |
+</html> |