diff options
author | Dan Beam <dbeam@chromium.org> | 2015-05-04 15:28:25 -0700 |
---|---|---|
committer | Dan Beam <dbeam@chromium.org> | 2015-05-04 22:29:38 +0000 |
commit | 2b2149aa9dfc5fbbb4ef0df2b89b5f392383f41a (patch) | |
tree | 7753711dcbd807c5e889436727bddf30950857a0 /remoting | |
parent | 8e9e1b029b557bdbd1462c56e7f0f784922b185c (diff) | |
download | chromium_src-2b2149aa9dfc5fbbb4ef0df2b89b5f392383f41a.zip chromium_src-2b2149aa9dfc5fbbb4ef0df2b89b5f392383f41a.tar.gz chromium_src-2b2149aa9dfc5fbbb4ef0df2b89b5f392383f41a.tar.bz2 |
Re-instating r328154 because it's depended on to compile.
Add AllReadDataConsumed and AllWriteDataConsumed methods to SocketDataProvider so that all provider subclasses can have their state verified.
Review URL: https://codereview.chromium.org/1114383003
Cr-Commit-Position: refs/heads/master@{#328154}
TBR=rch@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1127623003
Cr-Commit-Position: refs/heads/master@{#328205}
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/base/buffered_socket_writer_unittest.cc | 8 | ||||
-rw-r--r-- | remoting/signaling/xmpp_signal_strategy_unittest.cc | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/remoting/base/buffered_socket_writer_unittest.cc b/remoting/base/buffered_socket_writer_unittest.cc index 0c74044..07bb2ec 100644 --- a/remoting/base/buffered_socket_writer_unittest.cc +++ b/remoting/base/buffered_socket_writer_unittest.cc @@ -45,6 +45,14 @@ class SocketDataProvider: public net::SocketDataProvider { size); } + bool AllReadDataConsumed() const override { + return true; + } + + bool AllWriteDataConsumed() const override { + return true; + } + void Reset() override {} std::string written_data() { return written_data_; } diff --git a/remoting/signaling/xmpp_signal_strategy_unittest.cc b/remoting/signaling/xmpp_signal_strategy_unittest.cc index b4c4a53..2193982 100644 --- a/remoting/signaling/xmpp_signal_strategy_unittest.cc +++ b/remoting/signaling/xmpp_signal_strategy_unittest.cc @@ -29,6 +29,14 @@ class XmppSocketDataProvider: public net::SocketDataProvider { void Reset() override {} + bool AllReadDataConsumed() const override { + return true; + } + + bool AllWriteDataConsumed() const override { + return true; + } + void ReceiveData(const std::string& text) { socket()->OnReadComplete( net::MockRead(net::ASYNC, text.data(), text.size())); |