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

Unified Diff: Source/web/tests/FrameTestHelpers.h

Issue 543913002: Hook up postMessages to WebRemoteFrameClient (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix webkit_unit_tests compile Created 6 years, 3 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
« no previous file with comments | « Source/web/WebRemoteFrameImpl.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/FrameTestHelpers.h
diff --git a/Source/web/tests/FrameTestHelpers.h b/Source/web/tests/FrameTestHelpers.h
index ff7ff6b77fceb17917c2453532d5874e9ad8ed96..843d2b95786bfba8080b3ad4142512a9fef40856 100644
--- a/Source/web/tests/FrameTestHelpers.h
+++ b/Source/web/tests/FrameTestHelpers.h
@@ -34,6 +34,7 @@
#include "public/platform/WebURLRequest.h"
#include "public/web/WebFrameClient.h"
#include "public/web/WebHistoryItem.h"
+#include "public/web/WebRemoteFrameClient.h"
#include "public/web/WebViewClient.h"
#include "web/WebViewImpl.h"
#include "wtf/PassOwnPtr.h"
@@ -108,6 +109,18 @@ private:
int m_loadsInProgress;
};
+// Minimal implementation of WebRemoteFrameClient needed for unit tests that load remote frames. Tests that load
+// frames and need further specialization of WebFrameClient behavior should subclass this.
+class TestWebRemoteFrameClient : public WebRemoteFrameClient {
+public:
+ // Notifies the embedder that a postMessage was issued to a remote frame.
+ virtual void postMessageEvent(
+ WebLocalFrame* sourceFrame,
+ WebRemoteFrame* targetFrame,
+ WebSecurityOrigin targetOrigin,
+ WebDOMMessageEvent) { }
+};
+
class TestWebViewClient : public WebViewClient {
public:
virtual ~TestWebViewClient() { }
« no previous file with comments | « Source/web/WebRemoteFrameImpl.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698