Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Unified Diff: net/spdy/spdy_test_utils.h

Issue 2832973003: Split net/spdy into core and chromium subdirectories. (Closed)
Patch Set: Fix some more build rules. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/spdy_test_util_common.cc ('k') | net/spdy/spdy_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_test_utils.h
diff --git a/net/spdy/spdy_test_utils.h b/net/spdy/spdy_test_utils.h
deleted file mode 100644
index a5ecd6af898431d1c0ace8fc34a913b66a0e10ca..0000000000000000000000000000000000000000
--- a/net/spdy/spdy_test_utils.h
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef NET_SPDY_SPDY_TEST_UTILS_H_
-#define NET_SPDY_SPDY_TEST_UTILS_H_
-
-#include <stddef.h>
-#include <stdint.h>
-
-#include <map>
-#include <memory>
-
-#include "net/spdy/platform/api/spdy_string.h"
-#include "net/spdy/platform/api/spdy_string_piece.h"
-#include "net/spdy/server_push_delegate.h"
-#include "net/spdy/spdy_bug_tracker.h"
-#include "net/spdy/spdy_header_block.h"
-#include "net/spdy/spdy_headers_handler_interface.h"
-#include "net/spdy/spdy_protocol.h"
-#include "net/test/gtest_util.h"
-
-#define EXPECT_SPDY_BUG EXPECT_DFATAL
-
-namespace net {
-
-class HashValue;
-class TransportSecurityState;
-
-inline bool operator==(SpdyStringPiece x,
- const SpdyHeaderBlock::ValueProxy& y) {
- return x == y.as_string();
-}
-
-namespace test {
-
-SpdyString HexDumpWithMarks(const unsigned char* data,
- int length,
- const bool* marks,
- int mark_length);
-
-void CompareCharArraysWithHexError(const SpdyString& description,
- const unsigned char* actual,
- const int actual_len,
- const unsigned char* expected,
- const int expected_len);
-
-void SetFrameFlags(SpdySerializedFrame* frame, uint8_t flags);
-
-void SetFrameLength(SpdySerializedFrame* frame, size_t length);
-
-SpdyString a2b_hex(const char* hex_data);
-
-// Returns a SHA1 HashValue in which each byte has the value |label|.
-HashValue GetTestHashValue(uint8_t label);
-
-// Returns SHA1 pinning header for the of the base64 encoding of
-// GetTestHashValue(|label|).
-SpdyString GetTestPin(uint8_t label);
-
-// Adds a pin for |host| to |state|.
-void AddPin(TransportSecurityState* state,
- const SpdyString& host,
- uint8_t primary_label,
- uint8_t backup_label);
-
-// A test implementation of SpdyHeadersHandlerInterface that correctly
-// reconstructs multiple header values for the same name.
-class TestHeadersHandler : public SpdyHeadersHandlerInterface {
- public:
- TestHeadersHandler() {}
-
- void OnHeaderBlockStart() override;
-
- void OnHeader(SpdyStringPiece name, SpdyStringPiece value) override;
-
- void OnHeaderBlockEnd(size_t header_bytes_parsed) override;
-
- void OnHeaderBlockEnd(size_t header_bytes_parsed,
- size_t compressed_header_bytes_parsed) override;
-
- const SpdyHeaderBlock& decoded_block() const { return block_; }
- size_t header_bytes_parsed() const { return header_bytes_parsed_; }
- size_t compressed_header_bytes_parsed() const {
- return compressed_header_bytes_parsed_;
- }
-
- private:
- SpdyHeaderBlock block_;
- size_t header_bytes_parsed_ = 0;
- size_t compressed_header_bytes_parsed_ = 0;
-
- DISALLOW_COPY_AND_ASSIGN(TestHeadersHandler);
-};
-
-// A test implementation of ServerPushDelegate that caches all the pushed
-// request and provides a interface to cancel the push given url.
-class TestServerPushDelegate : public ServerPushDelegate {
- public:
- TestServerPushDelegate();
- ~TestServerPushDelegate() override;
-
- void OnPush(std::unique_ptr<ServerPushHelper> push_helper,
- const NetLogWithSource& session_net_log) override;
-
- bool CancelPush(GURL url);
-
- private:
- std::map<GURL, std::unique_ptr<ServerPushHelper>> push_helpers;
-};
-
-} // namespace test
-} // namespace net
-
-#endif // NET_SPDY_SPDY_TEST_UTILS_H_
« no previous file with comments | « net/spdy/spdy_test_util_common.cc ('k') | net/spdy/spdy_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698