| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/websockets/websocket_throttle.h" | 5 #include "net/websockets/websocket_throttle.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "googleurl/src/gurl.h" | |
| 11 #include "net/base/address_list.h" | 10 #include "net/base/address_list.h" |
| 12 #include "net/base/test_completion_callback.h" | 11 #include "net/base/test_completion_callback.h" |
| 13 #include "net/socket_stream/socket_stream.h" | 12 #include "net/socket_stream/socket_stream.h" |
| 14 #include "net/url_request/url_request_test_util.h" | 13 #include "net/url_request/url_request_test_util.h" |
| 15 #include "net/websockets/websocket_job.h" | 14 #include "net/websockets/websocket_job.h" |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 17 #include "testing/platform_test.h" | 16 #include "testing/platform_test.h" |
| 17 #include "url/gurl.h" |
| 18 | 18 |
| 19 class DummySocketStreamDelegate : public net::SocketStream::Delegate { | 19 class DummySocketStreamDelegate : public net::SocketStream::Delegate { |
| 20 public: | 20 public: |
| 21 DummySocketStreamDelegate() {} | 21 DummySocketStreamDelegate() {} |
| 22 virtual ~DummySocketStreamDelegate() {} | 22 virtual ~DummySocketStreamDelegate() {} |
| 23 virtual void OnConnected( | 23 virtual void OnConnected( |
| 24 net::SocketStream* socket, int max_pending_send_allowed) OVERRIDE {} | 24 net::SocketStream* socket, int max_pending_send_allowed) OVERRIDE {} |
| 25 virtual void OnSentData(net::SocketStream* socket, | 25 virtual void OnSentData(net::SocketStream* socket, |
| 26 int amount_sent) OVERRIDE {} | 26 int amount_sent) OVERRIDE {} |
| 27 virtual void OnReceivedData(net::SocketStream* socket, | 27 virtual void OnReceivedData(net::SocketStream* socket, |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 s1->DetachDelegate(); | 348 s1->DetachDelegate(); |
| 349 | 349 |
| 350 DVLOG(1) << "closing socket2"; | 350 DVLOG(1) << "closing socket2"; |
| 351 w2->OnClose(s2.get()); | 351 w2->OnClose(s2.get()); |
| 352 s2->DetachDelegate(); | 352 s2->DetachDelegate(); |
| 353 DVLOG(1) << "Done"; | 353 DVLOG(1) << "Done"; |
| 354 base::MessageLoopForIO::current()->RunUntilIdle(); | 354 base::MessageLoopForIO::current()->RunUntilIdle(); |
| 355 } | 355 } |
| 356 | 356 |
| 357 } | 357 } |
| OLD | NEW |