diff options
author | sergeyu <sergeyu@chromium.org> | 2014-09-20 06:12:56 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-20 13:13:29 +0000 |
commit | 93a39f2bcde1d6309f9fcf5ae0d0402cdc32b8af (patch) | |
tree | eb4ffb6498e8033cedc187b4468e007bd253b5c4 | |
parent | 5f2dd387974082aad17a8603308d1a6acc2bce8d (diff) | |
download | chromium_src-93a39f2bcde1d6309f9fcf5ae0d0402cdc32b8af.zip chromium_src-93a39f2bcde1d6309f9fcf5ae0d0402cdc32b8af.tar.gz chromium_src-93a39f2bcde1d6309f9fcf5ae0d0402cdc32b8af.tar.bz2 |
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}
-rw-r--r-- | remoting/test/protocol_perftest.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/remoting/test/protocol_perftest.cc b/remoting/test/protocol_perftest.cc index 6e216b00..25c36c6 100644 --- a/remoting/test/protocol_perftest.cc +++ b/remoting/test/protocol_perftest.cc @@ -61,6 +61,16 @@ struct NetworkPerformanceParams { 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 : public testing::Test, public testing::WithParamInterface<NetworkPerformanceParams>, @@ -108,7 +118,7 @@ class ProtocolPerfTest return NULL; } virtual protocol::CursorShapeStub* GetCursorShapeStub() OVERRIDE { - return NULL; + return &cursor_shape_stub_; } // VideoRenderer interface. @@ -335,6 +345,8 @@ class ProtocolPerfTest base::Thread encode_thread_; FakeDesktopEnvironmentFactory desktop_environment_factory_; + FakeCursorShapeStub cursor_shape_stub_; + scoped_ptr<protocol::CandidateSessionConfig> protocol_config_; scoped_ptr<FakeSignalStrategy> host_signaling_; |