OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 4 |
5 #include "chrome/browser/chromeos/network_settings/onc_utils.h" | 5 #include "chromeos/network/onc/onc_utils.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/chromeos/network_settings/onc_test_utils.h" | 10 #include "chromeos/network/onc/onc_test_utils.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 | 12 |
13 namespace chromeos { | 13 namespace chromeos { |
14 namespace onc { | 14 namespace onc { |
15 | 15 |
16 TEST(ONCDecrypterTest, BrokenEncryptionIterations) { | 16 TEST(ONCDecrypterTest, BrokenEncryptionIterations) { |
17 scoped_ptr<base::DictionaryValue> encrypted_onc = | 17 scoped_ptr<base::DictionaryValue> encrypted_onc = |
18 test_utils::ReadTestDictionary("broken-encrypted-iterations.onc"); | 18 test_utils::ReadTestDictionary("broken-encrypted-iterations.onc"); |
19 | 19 |
20 std::string error; | 20 std::string error; |
(...skipping 27 matching lines...) Expand all Loading... |
48 Decrypt("test0000", *encrypted_onc, &error); | 48 Decrypt("test0000", *encrypted_onc, &error); |
49 | 49 |
50 base::DictionaryValue emptyDict; | 50 base::DictionaryValue emptyDict; |
51 EXPECT_TRUE(test_utils::Equals(expected_decrypted_onc.get(), | 51 EXPECT_TRUE(test_utils::Equals(expected_decrypted_onc.get(), |
52 actual_decrypted_onc.get())); | 52 actual_decrypted_onc.get())); |
53 EXPECT_TRUE(error.empty()) << error; | 53 EXPECT_TRUE(error.empty()) << error; |
54 } | 54 } |
55 | 55 |
56 } // namespace onc | 56 } // namespace onc |
57 } // namespace chromeos | 57 } // namespace chromeos |
OLD | NEW |