Commit 93a39f2b authored by sergeyu's avatar sergeyu Committed by Commit bot

Fix crash in protocol perf test.

CursorShapeStub is being called in perf tests and the test was
returning NULL for the cursor stub which causes it to crash.

Review URL: https://codereview.chromium.org/586943002

Cr-Commit-Position: refs/heads/master@{#295858}
parent 5f2dd387
...@@ -61,6 +61,16 @@ struct NetworkPerformanceParams { ...@@ -61,6 +61,16 @@ struct NetworkPerformanceParams {
double out_of_order_rate; double out_of_order_rate;
}; };
class FakeCursorShapeStub : public protocol::CursorShapeStub {
public:
FakeCursorShapeStub() {}
virtual ~FakeCursorShapeStub() {}
// protocol::CursorShapeStub interface.
virtual void SetCursorShape(
const protocol::CursorShapeInfo& cursor_shape) OVERRIDE {};
};
class ProtocolPerfTest class ProtocolPerfTest
: public testing::Test, : public testing::Test,
public testing::WithParamInterface<NetworkPerformanceParams>, public testing::WithParamInterface<NetworkPerformanceParams>,
...@@ -108,7 +118,7 @@ class ProtocolPerfTest ...@@ -108,7 +118,7 @@ class ProtocolPerfTest
return NULL; return NULL;
} }
virtual protocol::CursorShapeStub* GetCursorShapeStub() OVERRIDE { virtual protocol::CursorShapeStub* GetCursorShapeStub() OVERRIDE {
return NULL; return &cursor_shape_stub_;
} }
// VideoRenderer interface. // VideoRenderer interface.
...@@ -335,6 +345,8 @@ class ProtocolPerfTest ...@@ -335,6 +345,8 @@ class ProtocolPerfTest
base::Thread encode_thread_; base::Thread encode_thread_;
FakeDesktopEnvironmentFactory desktop_environment_factory_; FakeDesktopEnvironmentFactory desktop_environment_factory_;
FakeCursorShapeStub cursor_shape_stub_;
scoped_ptr<protocol::CandidateSessionConfig> protocol_config_; scoped_ptr<protocol::CandidateSessionConfig> protocol_config_;
scoped_ptr<FakeSignalStrategy> host_signaling_; scoped_ptr<FakeSignalStrategy> host_signaling_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment