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 "chromeos/network/onc/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 "chromeos/network/onc/onc_signature.h" |
10 #include "chromeos/network/onc/onc_test_utils.h" | 11 #include "chromeos/network/onc/onc_test_utils.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
12 | 13 |
13 namespace chromeos { | 14 namespace chromeos { |
14 namespace onc { | 15 namespace onc { |
15 | 16 |
16 TEST(ONCDecrypterTest, BrokenEncryptionIterations) { | 17 TEST(ONCDecrypterTest, BrokenEncryptionIterations) { |
17 scoped_ptr<base::DictionaryValue> encrypted_onc = | 18 scoped_ptr<base::DictionaryValue> encrypted_onc = |
18 test_utils::ReadTestDictionary("broken-encrypted-iterations.onc"); | 19 test_utils::ReadTestDictionary("broken-encrypted-iterations.onc"); |
19 | 20 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 ExpandStringsInOncObject(kNetworkConfigurationSignature, substitution, | 95 ExpandStringsInOncObject(kNetworkConfigurationSignature, substitution, |
95 wifi_onc.get()); | 96 wifi_onc.get()); |
96 | 97 |
97 std::string actual_expanded; | 98 std::string actual_expanded; |
98 wifi_onc->GetString("WiFi.EAP.Identity", &actual_expanded); | 99 wifi_onc->GetString("WiFi.EAP.Identity", &actual_expanded); |
99 EXPECT_EQ(actual_expanded, std::string("abc ") + kLoginId + "@my.domain.com"); | 100 EXPECT_EQ(actual_expanded, std::string("abc ") + kLoginId + "@my.domain.com"); |
100 } | 101 } |
101 | 102 |
102 } // namespace onc | 103 } // namespace onc |
103 } // namespace chromeos | 104 } // namespace chromeos |
OLD | NEW |