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

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

Issue 2464663002: chrome: move networking_private_crypto from common to browser (Closed)
Patch Set: chrome/test 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/common/extensions/api/networking_private/networking_private_cry pto.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" 10 #include "base/strings/stringprintf.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace { 13 namespace {
14 14
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 public_key, plain, &encrypted_output)); 222 public_key, plain, &encrypted_output));
223 223
224 // Checking graceful fail for too much data to encrypt. 224 // Checking graceful fail for too much data to encrypt.
225 EXPECT_FALSE(networking_private_crypto::EncryptByteString( 225 EXPECT_FALSE(networking_private_crypto::EncryptByteString(
226 public_key, std::string(500, 'x'), &encrypted_output)); 226 public_key, std::string(500, 'x'), &encrypted_output));
227 227
228 // Checking graceful fail for a bad key format. 228 // Checking graceful fail for a bad key format.
229 EXPECT_FALSE(networking_private_crypto::EncryptByteString( 229 EXPECT_FALSE(networking_private_crypto::EncryptByteString(
230 kBadKeyData, kTestData, &encrypted_output)); 230 kBadKeyData, kTestData, &encrypted_output));
231 } 231 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/networking_private/networking_private_crypto.cc ('k') | chrome/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698