diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-11 01:27:23 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-11 01:27:23 +0000 |
commit | a46bcef82b29d30836a0f26226e3d4aca4fa9612 (patch) | |
tree | 297ff3b78e05b2fb83971d3dee51e0d12ebcf181 /remoting/protocol/connection_to_client_unittest.cc | |
parent | e7cd8dc6e9199cade000dc48da230f9ada0ccf28 (diff) | |
download | chromium_src-a46bcef82b29d30836a0f26226e3d4aca4fa9612.zip chromium_src-a46bcef82b29d30836a0f26226e3d4aca4fa9612.tar.gz chromium_src-a46bcef82b29d30836a0f26226e3d4aca4fa9612.tar.bz2 |
Access ChromotingHost::clients_ only on network thread.
Previously ChromotingHost was doing some work on the main thread and
some on the network thread. |clients_| and some other members were
accessed without lock on both of these threads. Moved most of the
ChromotingHost activity to the network thread to avoid possible
race conditions.
BUG=96325
TEST=Chromoting works
Review URL: http://codereview.chromium.org/8495024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109556 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol/connection_to_client_unittest.cc')
-rw-r--r-- | remoting/protocol/connection_to_client_unittest.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/remoting/protocol/connection_to_client_unittest.cc b/remoting/protocol/connection_to_client_unittest.cc index d3d1aed..81ea1f0 100644 --- a/remoting/protocol/connection_to_client_unittest.cc +++ b/remoting/protocol/connection_to_client_unittest.cc @@ -43,6 +43,11 @@ class ConnectionToClientTest : public testing::Test { message_loop_.RunAllPending(); } + virtual void TearDown() OVERRIDE { + viewer_ = NULL; + message_loop_.RunAllPending(); + } + MessageLoop message_loop_; MockConnectionToClientEventHandler handler_; MockHostStub host_stub_; @@ -101,13 +106,5 @@ TEST_F(ConnectionToClientTest, StateChange) { message_loop_.RunAllPending(); } -// Test that we can close client connection more than once. -TEST_F(ConnectionToClientTest, Close) { - viewer_->Disconnect(); - message_loop_.RunAllPending(); - viewer_->Disconnect(); - message_loop_.RunAllPending(); -} - } // namespace protocol } // namespace remoting |