OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "chrome/browser/importer/firefox2_importer.h" | 10 #include "chrome/browser/importer/firefox2_importer.h" |
11 #include "chrome/browser/importer/firefox_importer_utils.h" | 11 #include "chrome/browser/importer/firefox_importer_utils.h" |
12 #include "chrome/browser/importer/firefox_profile_lock.h" | 12 #include "chrome/browser/importer/firefox_profile_lock.h" |
| 13 #include "chrome/browser/importer/nss_decryptor.h" |
13 #include "chrome/common/chrome_paths.h" | 14 #include "chrome/common/chrome_paths.h" |
14 #include "chrome/test/file_test_utils.h" | 15 #include "chrome/test/file_test_utils.h" |
15 | 16 |
16 using base::Time; | 17 using base::Time; |
17 | 18 |
18 TEST(FirefoxImporterTest, Firefox2NSS3Decryptor) { | 19 TEST(FirefoxImporterTest, Firefox2NSS3Decryptor) { |
19 std::wstring nss_path; | 20 std::wstring nss_path; |
20 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &nss_path)); | 21 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &nss_path)); |
21 file_util::AppendToPath(&nss_path, L"firefox2_nss"); | 22 file_util::AppendToPath(&nss_path, L"firefox2_nss"); |
22 std::wstring db_path; | 23 std::wstring db_path; |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 EXPECT_FALSE(lock2->HasAcquired()); | 222 EXPECT_FALSE(lock2->HasAcquired()); |
222 | 223 |
223 lock1->Unlock(); | 224 lock1->Unlock(); |
224 EXPECT_FALSE(lock1->HasAcquired()); | 225 EXPECT_FALSE(lock1->HasAcquired()); |
225 | 226 |
226 lock2->Lock(); | 227 lock2->Lock(); |
227 EXPECT_TRUE(lock2->HasAcquired()); | 228 EXPECT_TRUE(lock2->HasAcquired()); |
228 lock2->Unlock(); | 229 lock2->Unlock(); |
229 EXPECT_FALSE(lock2->HasAcquired()); | 230 EXPECT_FALSE(lock2->HasAcquired()); |
230 } | 231 } |
OLD | NEW |