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

Unified Diff: net/quic/core/crypto/crypto_secret_boxer_test.cc

Issue 2740453006: Add QuicStringPiece which is actually StringPiece. (Closed)
Patch Set: fix compile error and rebase Created 3 years, 9 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/quic/core/crypto/crypto_secret_boxer.cc ('k') | net/quic/core/crypto/crypto_server_config_protobuf.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/crypto/crypto_secret_boxer_test.cc
diff --git a/net/quic/core/crypto/crypto_secret_boxer_test.cc b/net/quic/core/crypto/crypto_secret_boxer_test.cc
index 1e8c1d156cdfab006ac966d6e992698cf13bdc0d..12820179c16024696391013eb945f010cd834011 100644
--- a/net/quic/core/crypto/crypto_secret_boxer_test.cc
+++ b/net/quic/core/crypto/crypto_secret_boxer_test.cc
@@ -7,14 +7,13 @@
#include "net/quic/core/crypto/quic_random.h"
#include "testing/gtest/include/gtest/gtest.h"
-using base::StringPiece;
using std::string;
namespace net {
namespace test {
TEST(CryptoSecretBoxerTest, BoxAndUnbox) {
- StringPiece message("hello world");
+ QuicStringPiece message("hello world");
CryptoSecretBoxer boxer;
boxer.SetKeys({string(CryptoSecretBoxer::GetKeySize(), 0x11)});
@@ -22,7 +21,7 @@ TEST(CryptoSecretBoxerTest, BoxAndUnbox) {
const string box = boxer.Box(QuicRandom::GetInstance(), message);
string storage;
- StringPiece result;
+ QuicStringPiece result;
EXPECT_TRUE(boxer.Unbox(box, &storage, &result));
EXPECT_EQ(result, message);
@@ -37,10 +36,10 @@ TEST(CryptoSecretBoxerTest, BoxAndUnbox) {
// Helper function to test whether one boxer can decode the output of another.
static bool CanDecode(const CryptoSecretBoxer& decoder,
const CryptoSecretBoxer& encoder) {
- StringPiece message("hello world");
+ QuicStringPiece message("hello world");
const string boxed = encoder.Box(QuicRandom::GetInstance(), message);
string storage;
- StringPiece result;
+ QuicStringPiece result;
bool ok = decoder.Unbox(boxed, &storage, &result);
if (ok) {
EXPECT_EQ(result, message);
« no previous file with comments | « net/quic/core/crypto/crypto_secret_boxer.cc ('k') | net/quic/core/crypto/crypto_server_config_protobuf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698