OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_channel.h" | 5 #include "net/websockets/websocket_channel.h" |
6 | 6 |
7 #include <limits.h> | 7 #include <limits.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <string.h> | 9 #include <string.h> |
10 | 10 |
11 #include <iostream> | 11 #include <iostream> |
12 #include <iterator> | 12 #include <iterator> |
13 #include <memory> | 13 #include <memory> |
14 #include <string> | 14 #include <string> |
15 #include <utility> | 15 #include <utility> |
16 #include <vector> | 16 #include <vector> |
17 | 17 |
18 #include "base/bind.h" | 18 #include "base/bind.h" |
19 #include "base/bind_helpers.h" | 19 #include "base/bind_helpers.h" |
20 #include "base/callback.h" | 20 #include "base/callback.h" |
21 #include "base/location.h" | 21 #include "base/location.h" |
22 #include "base/macros.h" | 22 #include "base/macros.h" |
23 #include "base/memory/ptr_util.h" | 23 #include "base/memory/ptr_util.h" |
24 #include "base/memory/weak_ptr.h" | 24 #include "base/memory/weak_ptr.h" |
25 #include "base/message_loop/message_loop.h" | 25 #include "base/message_loop/message_loop.h" |
26 #include "base/single_thread_task_runner.h" | 26 #include "base/single_thread_task_runner.h" |
27 #include "base/strings/string_piece.h" | 27 #include "base/strings/string_piece.h" |
28 #include "base/thread_task_runner_handle.h" | 28 #include "base/threading/thread_task_runner_handle.h" |
29 #include "net/base/net_errors.h" | 29 #include "net/base/net_errors.h" |
30 #include "net/base/test_completion_callback.h" | 30 #include "net/base/test_completion_callback.h" |
31 #include "net/http/http_response_headers.h" | 31 #include "net/http/http_response_headers.h" |
32 #include "net/url_request/url_request_context.h" | 32 #include "net/url_request/url_request_context.h" |
33 #include "net/websockets/websocket_errors.h" | 33 #include "net/websockets/websocket_errors.h" |
34 #include "net/websockets/websocket_event_interface.h" | 34 #include "net/websockets/websocket_event_interface.h" |
35 #include "net/websockets/websocket_handshake_request_info.h" | 35 #include "net/websockets/websocket_handshake_request_info.h" |
36 #include "net/websockets/websocket_handshake_response_info.h" | 36 #include "net/websockets/websocket_handshake_response_info.h" |
37 #include "net/websockets/websocket_mux.h" | 37 #include "net/websockets/websocket_mux.h" |
38 #include "testing/gmock/include/gmock/gmock.h" | 38 #include "testing/gmock/include/gmock/gmock.h" |
(...skipping 3453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3492 | 3492 |
3493 channel_->SendFrame( | 3493 channel_->SendFrame( |
3494 true, WebSocketFrameHeader::kOpCodeText, | 3494 true, WebSocketFrameHeader::kOpCodeText, |
3495 std::vector<char>(static_cast<size_t>(kMessageSize), 'a')); | 3495 std::vector<char>(static_cast<size_t>(kMessageSize), 'a')); |
3496 int new_send_quota = channel_->current_send_quota(); | 3496 int new_send_quota = channel_->current_send_quota(); |
3497 EXPECT_EQ(kMessageSize, initial_send_quota - new_send_quota); | 3497 EXPECT_EQ(kMessageSize, initial_send_quota - new_send_quota); |
3498 } | 3498 } |
3499 | 3499 |
3500 } // namespace | 3500 } // namespace |
3501 } // namespace net | 3501 } // namespace net |
OLD | NEW |