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

Unified Diff: chrome/utility/importer/firefox_importer_unittest.cc

Issue 427303004: Fix various bits of error-handling in NSSDecryptor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: isherman comment Created 6 years, 4 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 | « no previous file | chrome/utility/importer/nss_decryptor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/utility/importer/firefox_importer_unittest.cc
diff --git a/chrome/utility/importer/firefox_importer_unittest.cc b/chrome/utility/importer/firefox_importer_unittest.cc
index 0ad20e10a358abfc9abf5e90c0bce3636d15b3a2..48154db0870e408dfd085d22e5c6a41c12f55bba 100644
--- a/chrome/utility/importer/firefox_importer_unittest.cc
+++ b/chrome/utility/importer/firefox_importer_unittest.cc
@@ -45,6 +45,12 @@ TEST(FirefoxImporterTest, MAYBE_NSS(Firefox3NSS3Decryptor)) {
EXPECT_EQ(base::WideToUTF16(L"\x4E2D"),
decryptor_proxy.Decrypt("MDIEEPgAAAAAAAAAAAAAAAAAAAEwFAYIKoZIhvcNAwcECLW"
"qqiccfQHWBAie74hxnULxlw=="));
+
+ // Test empty string edge case.
+ EXPECT_EQ(base::string16(), decryptor_proxy.Decrypt(std::string()));
+
+ // Test invalid base64.
+ EXPECT_EQ(base::string16(), decryptor_proxy.Decrypt("Not! Valid! Base64!"));
}
// The following test verifies proper detection of authentication scheme in
« no previous file with comments | « no previous file | chrome/utility/importer/nss_decryptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698