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

Unified Diff: chrome/browser/chromeos/network_settings/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
Index: chrome/browser/chromeos/network_settings/onc_utils_unittest.cc
diff --git a/chrome/browser/chromeos/network_settings/onc_utils_unittest.cc b/chrome/browser/chromeos/network_settings/onc_utils_unittest.cc
deleted file mode 100644
index 609a849b8abb7bd42c38f29be82cb011fb20b603..0000000000000000000000000000000000000000
--- a/chrome/browser/chromeos/network_settings/onc_utils_unittest.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// 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 <string>
-
-#include "base/values.h"
-#include "chrome/browser/chromeos/network_settings/onc_test_utils.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace chromeos {
-namespace onc {
-
-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);
-
- EXPECT_EQ(NULL, decrypted_onc.get());
- EXPECT_FALSE(error.empty());
-}
-
-TEST(ONCDecrypterTest, BrokenEncryptionZeroIterations) {
- scoped_ptr<base::DictionaryValue> encrypted_onc =
- test_utils::ReadTestDictionary("broken-encrypted-zero-iterations.onc");
-
- std::string error;
- scoped_ptr<base::DictionaryValue> decrypted_onc =
- Decrypt("test0000", *encrypted_onc, &error);
-
- EXPECT_EQ(NULL, decrypted_onc.get());
- EXPECT_FALSE(error.empty());
-}
-
-TEST(ONCDecrypterTest, LoadEncryptedOnc) {
- scoped_ptr<base::DictionaryValue> encrypted_onc =
- test_utils::ReadTestDictionary("encrypted.onc");
- scoped_ptr<base::DictionaryValue> expected_decrypted_onc =
- test_utils::ReadTestDictionary("decrypted.onc");
-
- std::string error;
- scoped_ptr<base::DictionaryValue> actual_decrypted_onc =
- Decrypt("test0000", *encrypted_onc, &error);
-
- base::DictionaryValue emptyDict;
- EXPECT_TRUE(test_utils::Equals(expected_decrypted_onc.get(),
- actual_decrypted_onc.get()));
- EXPECT_TRUE(error.empty()) << error;
-}
-
-} // namespace onc
-} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/network_settings/onc_utils.cc ('k') | chrome/browser/chromeos/network_settings/onc_validator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698