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

Side by Side Diff: chrome/browser/extensions/api/networking_private/networking_private_crypto_unittest.cc

Issue 2511683002: Remove unneeded stringprintf.h usage in chrome/ and net/ (Closed)
Patch Set: rebase Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "chrome/browser/extensions/api/networking_private/networking_private_cr ypto.h" 4 #include "chrome/browser/extensions/api/networking_private/networking_private_cr ypto.h"
5 5
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include "base/base64.h" 8 #include "base/base64.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/stringprintf.h"
11 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
12 11
13 namespace { 12 namespace {
14 13
15 } // namespace 14 } // namespace
16 15
17 // Tests of networking_private_crypto support for Networking Private API. 16 // Tests of networking_private_crypto support for Networking Private API.
18 class NetworkingPrivateCryptoTest : public testing::Test { 17 class NetworkingPrivateCryptoTest : public testing::Test {
19 protected: 18 protected:
20 // Verify that decryption of |encrypted| data using |private_key_pem| matches 19 // Verify that decryption of |encrypted| data using |private_key_pem| matches
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 public_key, plain, &encrypted_output)); 221 public_key, plain, &encrypted_output));
223 222
224 // Checking graceful fail for too much data to encrypt. 223 // Checking graceful fail for too much data to encrypt.
225 EXPECT_FALSE(networking_private_crypto::EncryptByteString( 224 EXPECT_FALSE(networking_private_crypto::EncryptByteString(
226 public_key, std::string(500, 'x'), &encrypted_output)); 225 public_key, std::string(500, 'x'), &encrypted_output));
227 226
228 // Checking graceful fail for a bad key format. 227 // Checking graceful fail for a bad key format.
229 EXPECT_FALSE(networking_private_crypto::EncryptByteString( 228 EXPECT_FALSE(networking_private_crypto::EncryptByteString(
230 kBadKeyData, kTestData, &encrypted_output)); 229 kBadKeyData, kTestData, &encrypted_output));
231 } 230 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/identity/identity_apitest.cc ('k') | chrome/browser/extensions/api/sessions/sessions_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698