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

Unified Diff: content/renderer/webcrypto/webcrypto_impl_unittest.cc

Issue 57373004: [webcrypto] Fix compiler errors in WebCryptoImplTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update based on padolph's comment Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/webcrypto/webcrypto_impl_unittest.cc
diff --git a/content/renderer/webcrypto/webcrypto_impl_unittest.cc b/content/renderer/webcrypto/webcrypto_impl_unittest.cc
index 503bdb8c9ffaf327bab4413ecc43091a06872360..3d0a537e06547509c2b224284286e7641ac3c221 100644
--- a/content/renderer/webcrypto/webcrypto_impl_unittest.cc
+++ b/content/renderer/webcrypto/webcrypto_impl_unittest.cc
@@ -2,7 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webcrypto_impl.h"
+#include "content/renderer/webcrypto/webcrypto_impl.h"
+
+#include <string>
+#include <vector>
#include "base/basictypes.h"
#include "base/logging.h"
@@ -10,7 +13,6 @@
#include "base/strings/string_number_conversions.h"
#include "content/public/renderer/content_renderer_client.h"
#include "content/renderer/renderer_webkitplatformsupport_impl.h"
-#include "content/renderer/webcrypto/webcrypto_impl.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/public/platform/WebArrayBuffer.h"
#include "third_party/WebKit/public/platform/WebCryptoAlgorithm.h"
@@ -72,7 +74,7 @@ WebKit::WebCryptoAlgorithm CreateAesCbcAlgorithm(
}
WebKit::WebCryptoAlgorithm CreateAesCbcAlgorithm(
- unsigned short key_length_bits) {
+ unsigned short key_length_bits) { // NOLINT
eroman 2013/11/05 01:06:39 what is the lint error that this line gives?
return WebKit::WebCryptoAlgorithm::adoptParamsAndCreate(
WebKit::WebCryptoAlgorithmIdAesCbc,
new WebKit::WebCryptoAesKeyGenParams(key_length_bits));
@@ -637,8 +639,7 @@ TEST_F(WebCryptoImplTest, AesCbcSampleSets) {
}
}
-// TODO (padolph): Add test to verify generated symmetric keys appear random.
-
+// TODO(padolph): Add test to verify generated symmetric keys appear random.
TEST_F(WebCryptoImplTest, GenerateKeyAes) {
WebKit::WebCryptoKey key = WebKit::WebCryptoKey::createNull();
@@ -686,7 +687,6 @@ TEST_F(WebCryptoImplTest, ImportSecretKeyNoAlgorithm) {
#if !defined(USE_OPENSSL)
TEST_F(WebCryptoImplTest, GenerateKeyPairRsa) {
-
// Note: using unrealistic short key lengths here to avoid bogging down tests.
// Successful WebCryptoAlgorithmIdRsaEsPkcs1v1_5 key generation.
@@ -696,7 +696,7 @@ TEST_F(WebCryptoImplTest, GenerateKeyPairRsa) {
CreateRsaAlgorithm(WebKit::WebCryptoAlgorithmIdRsaEsPkcs1v1_5,
modulus_length,
public_exponent);
- const bool extractable = false;
+ bool extractable = false;
const WebKit::WebCryptoKeyUsageMask usage_mask = 0;
WebKit::WebCryptoKey public_key = WebKit::WebCryptoKey::createNull();
WebKit::WebCryptoKey private_key = WebKit::WebCryptoKey::createNull();
@@ -718,7 +718,7 @@ TEST_F(WebCryptoImplTest, GenerateKeyPairRsa) {
algorithm, extractable, usage_mask, &public_key, &private_key));
// Fail with bad exponent: larger than unsigned long.
- unsigned exponent_length = sizeof(unsigned long) + 1;
+ unsigned exponent_length = sizeof(unsigned long) + 1; // NOLINT
eroman 2013/11/05 01:06:39 what is the lint error that this line gives?
const std::vector<uint8> long_exponent(exponent_length, 0x01);
algorithm = CreateRsaAlgorithm(WebKit::WebCryptoAlgorithmIdRsaEsPkcs1v1_5,
modulus_length,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698