summaryrefslogtreecommitdiff
path: root/chromium/net/http/http_transaction_test_util.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2022-09-07 13:12:05 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2022-11-09 10:02:59 +0000
commit33fc33aa94d4add0878ec30dc818e34e1dd3cc2a (patch)
treef6af110909c79b2759136554f1143d8b0572af0a /chromium/net/http/http_transaction_test_util.h
parent7d2c5d177e9813077a621df8d18c0deda73099b3 (diff)
downloadqtwebengine-chromium-33fc33aa94d4add0878ec30dc818e34e1dd3cc2a.tar.gz
BASELINE: Update Chromium to 104.0.5112.120
Change-Id: I5d2726c2ab018d75d055739b6ba64317904f05bb Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/438935 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/net/http/http_transaction_test_util.h')
-rw-r--r--chromium/net/http/http_transaction_test_util.h35
1 files changed, 18 insertions, 17 deletions
diff --git a/chromium/net/http/http_transaction_test_util.h b/chromium/net/http/http_transaction_test_util.h
index 18e015452d9..71541b55510 100644
--- a/chromium/net/http/http_transaction_test_util.h
+++ b/chromium/net/http/http_transaction_test_util.h
@@ -33,6 +33,7 @@
#include "net/http/http_request_info.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_response_info.h"
+#include "net/log/net_log_source.h"
#include "net/socket/connection_attempts.h"
namespace net {
@@ -170,11 +171,11 @@ class TestTransactionConsumer {
void OnIOComplete(int result);
- State state_;
+ State state_ = State::kIdle;
std::unique_ptr<HttpTransaction> trans_;
std::string content_;
scoped_refptr<IOBuffer> read_buf_;
- int error_;
+ int error_ = OK;
static int quit_counter_;
};
@@ -276,29 +277,29 @@ class MockNetworkTransaction
void CallbackLater(CompletionOnceCallback callback, int result);
void RunCallback(CompletionOnceCallback callback, int result);
- raw_ptr<const HttpRequestInfo> request_;
+ raw_ptr<const HttpRequestInfo> request_ = nullptr;
HttpResponseInfo response_;
std::string data_;
- int64_t data_cursor_;
- int64_t content_length_;
+ int64_t data_cursor_ = 0;
+ int64_t content_length_ = 0;
int test_mode_;
RequestPriority priority_;
- MockTransactionReadHandler read_handler_;
- raw_ptr<CreateHelper> websocket_handshake_stream_create_helper_;
+ MockTransactionReadHandler read_handler_ = nullptr;
+ raw_ptr<CreateHelper> websocket_handshake_stream_create_helper_ = nullptr;
BeforeNetworkStartCallback before_network_start_callback_;
ConnectedCallback connected_callback_;
base::WeakPtr<MockNetworkLayer> transaction_factory_;
- int64_t received_bytes_;
- int64_t sent_bytes_;
+ int64_t received_bytes_ = 0;
+ int64_t sent_bytes_ = 0;
// NetLog ID of the fake / non-existent underlying socket used by the
// connection. Requires Start() be passed a NetLogWithSource with a real
// NetLog to
// be initialized.
- unsigned int socket_log_id_;
+ unsigned int socket_log_id_ = NetLogSource::kInvalidId;
- bool done_reading_called_;
- bool reading_;
+ bool done_reading_called_ = false;
+ bool reading_ = false;
CompletionOnceCallback resume_start_callback_; // used for pause and restart.
@@ -356,14 +357,14 @@ class MockNetworkLayer : public HttpTransactionFactory,
base::Time Now();
private:
- int transaction_count_;
- bool done_reading_called_;
- bool stop_caching_called_;
- RequestPriority last_create_transaction_priority_;
+ int transaction_count_ = 0;
+ bool done_reading_called_ = false;
+ bool stop_caching_called_ = false;
+ RequestPriority last_create_transaction_priority_ = DEFAULT_PRIORITY;
// By default clock_ is NULL but it can be set to a custom clock by test
// frameworks using SetClock.
- raw_ptr<base::Clock> clock_;
+ raw_ptr<base::Clock> clock_ = nullptr;
base::WeakPtr<MockNetworkTransaction> last_transaction_;
};