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

Unified Diff: mojo/public/cpp/bindings/interface_ptr.h

Issue 2280483002: Add FlushForTesting to InterfacePtr and Binding. (Closed)
Patch Set: Created 4 years, 4 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: mojo/public/cpp/bindings/interface_ptr.h
diff --git a/mojo/public/cpp/bindings/interface_ptr.h b/mojo/public/cpp/bindings/interface_ptr.h
index edcb9bf2baf656ee80e10d585729409d4a16c1df..1a133fa3d833d6cd5aa5ddae4763c9c9033f877d 100644
--- a/mojo/public/cpp/bindings/interface_ptr.h
+++ b/mojo/public/cpp/bindings/interface_ptr.h
@@ -114,6 +114,12 @@ class InterfacePtr {
internal_state_.RequireVersion(version);
}
+ // Sends a no-op message on the underlying message pipe and runs the current
+ // message loop until its response is received. This can be used in tests to
+ // verify that no message was sent on a message pipe in response to some
+ // stimulus.
+ void FlushForTesting() { internal_state_.FlushForTesting(); }
+
// Closes the bound message pipe (if any) and returns the pointer to the
// unbound state.
void reset() {
« no previous file with comments | « mojo/public/cpp/bindings/interface_endpoint_client.h ('k') | mojo/public/cpp/bindings/lib/associated_interface_ptr_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698