Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: LayoutTests/inspector/sources/debugger/resources/post-message-listener.html

Issue 404953003: DevTools: Async call stacks for window.postMessage() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>
« no previous file with comments | « LayoutTests/inspector/sources/debugger/async-callstack-post-message-expected.txt ('k') | Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698