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

Side by Side Diff: chrome/utility/importer/firefox_importer_unittest.cc

Issue 18501013: Move most importer code to chrome/utility/importer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: another gyp attempt Created 7 years, 5 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
6
7 #include "base/files/file_path.h" 5 #include "base/files/file_path.h"
8 #include "base/path_service.h" 6 #include "base/path_service.h"
9 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/importer/firefox_importer_unittest_utils.h"
11 #include "chrome/browser/importer/nss_decryptor.h"
12 #include "chrome/common/chrome_paths.h" 8 #include "chrome/common/chrome_paths.h"
9 #include "chrome/utility/importer/firefox_importer_unittest_utils.h"
10 #include "chrome/utility/importer/nss_decryptor.h"
11 #include "testing/gtest/include/gtest/gtest.h"
13 12
14 // TODO(jschuh): Disabled on Win64 build. http://crbug.com/179688 13 // TODO(jschuh): Disabled on Win64 build. http://crbug.com/179688
15 #if defined(OS_WIN) && defined(ARCH_CPU_X86_64) 14 #if defined(OS_WIN) && defined(ARCH_CPU_X86_64)
16 #define MAYBE_NSS(x) DISABLED_##x 15 #define MAYBE_NSS(x) DISABLED_##x
17 #else 16 #else
18 #define MAYBE_NSS(x) x 17 #define MAYBE_NSS(x) x
19 #endif 18 #endif
20 19
21 // The following test requires the use of the NSSDecryptor, on OSX this needs 20 // The following test requires the use of the NSSDecryptor, on OSX this needs
22 // to run in a separate process, so we use a proxy object so we can share the 21 // to run in a separate process, so we use a proxy object so we can share the
(...skipping 15 matching lines...) Expand all
38 37
39 ASSERT_TRUE(decryptor_proxy.DecryptorInit(nss_path, db_path)); 38 ASSERT_TRUE(decryptor_proxy.DecryptorInit(nss_path, db_path));
40 EXPECT_EQ(ASCIIToUTF16("hello"), 39 EXPECT_EQ(ASCIIToUTF16("hello"),
41 decryptor_proxy.Decrypt("MDIEEPgAAAAAAAAAAAAAAAAAAAEwFAYIKoZIhvcNAwcECKa" 40 decryptor_proxy.Decrypt("MDIEEPgAAAAAAAAAAAAAAAAAAAEwFAYIKoZIhvcNAwcECKa"
42 "jtRg4qFSHBAhv9luFkXgDJA==")); 41 "jtRg4qFSHBAhv9luFkXgDJA=="));
43 // Test UTF-16 encoding. 42 // Test UTF-16 encoding.
44 EXPECT_EQ(WideToUTF16(L"\x4E2D"), 43 EXPECT_EQ(WideToUTF16(L"\x4E2D"),
45 decryptor_proxy.Decrypt("MDIEEPgAAAAAAAAAAAAAAAAAAAEwFAYIKoZIhvcNAwcECLW" 44 decryptor_proxy.Decrypt("MDIEEPgAAAAAAAAAAAAAAAAAAAEwFAYIKoZIhvcNAwcECLW"
46 "qqiccfQHWBAie74hxnULxlw==")); 45 "qqiccfQHWBAie74hxnULxlw=="));
47 } 46 }
OLDNEW
« no previous file with comments | « chrome/utility/importer/firefox3_importer.cc ('k') | chrome/utility/importer/firefox_importer_unittest_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698