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

Unified Diff: components/arc/test/fake_arc_bridge_instance.h

Issue 1548833002: arc-bridge: Restart ARC instance on crash (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Addressed more feedback Created 4 years, 11 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 | « components/arc/arc_bridge_service_unittest.cc ('k') | components/arc/test/fake_arc_bridge_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/test/fake_arc_bridge_instance.h
diff --git a/components/arc/test/fake_arc_bridge_instance.h b/components/arc/test/fake_arc_bridge_instance.h
index 88ac24d745e5d042eab3279865c33738fa8f50af..a121560c2cc3a2814157b7d8e6fe3b5931fd2841 100644
--- a/components/arc/test/fake_arc_bridge_instance.h
+++ b/components/arc/test/fake_arc_bridge_instance.h
@@ -21,13 +21,23 @@ class FakeArcBridgeInstance : public ArcBridgeInstance {
// the host that the boot sequence has finished.
void Bind(mojo::InterfaceRequest<ArcBridgeInstance> interface_request);
+ // Resets the binding. Useful to simulate a restart.
+ void Unbind();
+
// ArcBridgeInstance:
void Init(ArcBridgeHostPtr host) override;
+ // Ensures the call to Init() has been dispatched.
+ void WaitForInitCall();
+
+ // The number of times Init() has been called.
+ int init_calls() const { return init_calls_; }
+
private:
// Mojo endpoints.
mojo::Binding<ArcBridgeInstance> binding_;
ArcBridgeHostPtr host_ptr_;
+ int init_calls_ = 0;
DISALLOW_COPY_AND_ASSIGN(FakeArcBridgeInstance);
};
« no previous file with comments | « components/arc/arc_bridge_service_unittest.cc ('k') | components/arc/test/fake_arc_bridge_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698