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

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

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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/crypto/crypto_secret_boxer.cc ('k') | net/quic/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/crypto/crypto_secret_boxer_test.cc
diff --git a/net/quic/crypto/crypto_secret_boxer_test.cc b/net/quic/crypto/crypto_secret_boxer_test.cc
deleted file mode 100644
index 427d052d011cb8c84aba64937b4ac6af7418cf43..0000000000000000000000000000000000000000
--- a/net/quic/crypto/crypto_secret_boxer_test.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) 2013 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.
-
-#include "net/quic/crypto/crypto_secret_boxer.h"
-
-#include "base/memory/scoped_ptr.h"
-#include "net/quic/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");
- const size_t key_size = CryptoSecretBoxer::GetKeySize();
- scoped_ptr<uint8[]> key(new uint8[key_size]);
- memset(key.get(), 0x11, key_size);
-
- CryptoSecretBoxer boxer;
- boxer.SetKey(StringPiece(reinterpret_cast<char*>(key.get()), key_size));
-
- const string box = boxer.Box(QuicRandom::GetInstance(), message);
-
- string storage;
- StringPiece result;
- EXPECT_TRUE(boxer.Unbox(box, &storage, &result));
- EXPECT_EQ(result, message);
-
- EXPECT_FALSE(boxer.Unbox(string(1, 'X') + box, &storage, &result));
- EXPECT_FALSE(boxer.Unbox(box.substr(1, string::npos), &storage, &result));
- EXPECT_FALSE(boxer.Unbox(string(), &storage, &result));
- EXPECT_FALSE(boxer.Unbox(string(1, box[0]^0x80) + box.substr(1, string::npos),
- &storage, &result));
-}
-
-} // namespace test
-} // namespace net
« no previous file with comments | « net/quic/crypto/crypto_secret_boxer.cc ('k') | net/quic/crypto/crypto_server_config_protobuf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698