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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/importer/firefox_importer_unittest_utils.h" | 10 #include "chrome/browser/importer/firefox_importer_unittest_utils.h" |
11 #include "chrome/browser/importer/nss_decryptor.h" | 11 #include "chrome/browser/importer/nss_decryptor.h" |
12 #include "chrome/common/chrome_paths.h" | 12 #include "chrome/common/chrome_paths.h" |
13 | 13 |
14 // TODO(jschuh): Disabled on Win64 build. http://crbug.com/179688 | 14 // TODO(jschuh): Disabled on Win64 build. http://crbug.com/179688 |
15 #if defined(OS_WIN) && defined(ARCH_CPU_X86_64) | 15 #if defined(OS_WIN) && defined(ARCH_CPU_X86_64) |
16 #define MAYBE_NSS(x) DISABLED_##x | 16 #define MAYBE_NSS(x) DISABLED_##x |
17 #else | 17 #else |
18 #define MAYBE_NSS(x) x | 18 #define MAYBE_NSS(x) x |
19 #endif | 19 #endif |
(...skipping 18 matching lines...) Expand all Loading... |
38 | 38 |
39 ASSERT_TRUE(decryptor_proxy.DecryptorInit(nss_path, db_path)); | 39 ASSERT_TRUE(decryptor_proxy.DecryptorInit(nss_path, db_path)); |
40 EXPECT_EQ(ASCIIToUTF16("hello"), | 40 EXPECT_EQ(ASCIIToUTF16("hello"), |
41 decryptor_proxy.Decrypt("MDIEEPgAAAAAAAAAAAAAAAAAAAEwFAYIKoZIhvcNAwcECKa" | 41 decryptor_proxy.Decrypt("MDIEEPgAAAAAAAAAAAAAAAAAAAEwFAYIKoZIhvcNAwcECKa" |
42 "jtRg4qFSHBAhv9luFkXgDJA==")); | 42 "jtRg4qFSHBAhv9luFkXgDJA==")); |
43 // Test UTF-16 encoding. | 43 // Test UTF-16 encoding. |
44 EXPECT_EQ(WideToUTF16(L"\x4E2D"), | 44 EXPECT_EQ(WideToUTF16(L"\x4E2D"), |
45 decryptor_proxy.Decrypt("MDIEEPgAAAAAAAAAAAAAAAAAAAEwFAYIKoZIhvcNAwcECLW" | 45 decryptor_proxy.Decrypt("MDIEEPgAAAAAAAAAAAAAAAAAAAEwFAYIKoZIhvcNAwcECLW" |
46 "qqiccfQHWBAie74hxnULxlw==")); | 46 "qqiccfQHWBAie74hxnULxlw==")); |
47 } | 47 } |
OLD | NEW |