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

Unified Diff: chromeos/network/onc/onc_utils_unittest.cc

Issue 11299236: This moves the ONC parsing code into chromeos/network/onc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit tests Created 8 years 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 | « chromeos/network/onc/onc_utils.cc ('k') | chromeos/network/onc/onc_validator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/onc/onc_utils_unittest.cc
diff --git a/chrome/browser/chromeos/network_settings/onc_utils_unittest.cc b/chromeos/network/onc/onc_utils_unittest.cc
similarity index 77%
rename from chrome/browser/chromeos/network_settings/onc_utils_unittest.cc
rename to chromeos/network/onc/onc_utils_unittest.cc
index 609a849b8abb7bd42c38f29be82cb011fb20b603..93ed3904ecab0d8ef7a8d244cc3f6e98cec15f7b 100644
--- a/chrome/browser/chromeos/network_settings/onc_utils_unittest.cc
+++ b/chromeos/network/onc/onc_utils_unittest.cc
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/chromeos/network_settings/onc_utils.h"
+#include "chromeos/network/onc/onc_utils.h"
#include <string>
#include "base/values.h"
-#include "chrome/browser/chromeos/network_settings/onc_test_utils.h"
+#include "chromeos/network/onc/onc_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace chromeos {
@@ -17,12 +17,10 @@ TEST(ONCDecrypterTest, BrokenEncryptionIterations) {
scoped_ptr<base::DictionaryValue> encrypted_onc =
test_utils::ReadTestDictionary("broken-encrypted-iterations.onc");
- std::string error;
scoped_ptr<base::DictionaryValue> decrypted_onc =
- Decrypt("test0000", *encrypted_onc, &error);
+ Decrypt("test0000", *encrypted_onc);
EXPECT_EQ(NULL, decrypted_onc.get());
- EXPECT_FALSE(error.empty());
}
TEST(ONCDecrypterTest, BrokenEncryptionZeroIterations) {
@@ -31,10 +29,9 @@ TEST(ONCDecrypterTest, BrokenEncryptionZeroIterations) {
std::string error;
scoped_ptr<base::DictionaryValue> decrypted_onc =
- Decrypt("test0000", *encrypted_onc, &error);
+ Decrypt("test0000", *encrypted_onc);
EXPECT_EQ(NULL, decrypted_onc.get());
- EXPECT_FALSE(error.empty());
}
TEST(ONCDecrypterTest, LoadEncryptedOnc) {
@@ -45,12 +42,11 @@ TEST(ONCDecrypterTest, LoadEncryptedOnc) {
std::string error;
scoped_ptr<base::DictionaryValue> actual_decrypted_onc =
- Decrypt("test0000", *encrypted_onc, &error);
+ Decrypt("test0000", *encrypted_onc);
base::DictionaryValue emptyDict;
EXPECT_TRUE(test_utils::Equals(expected_decrypted_onc.get(),
actual_decrypted_onc.get()));
- EXPECT_TRUE(error.empty()) << error;
}
} // namespace onc
« no previous file with comments | « chromeos/network/onc/onc_utils.cc ('k') | chromeos/network/onc/onc_validator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698