| 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_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "chrome/browser/firefox2_importer.h" | 9 #include "chrome/browser/importer/firefox2_importer.h" |
| 10 #include "chrome/browser/firefox_importer_utils.h" | 10 #include "chrome/browser/importer/firefox_importer_utils.h" |
| 11 #include "chrome/browser/firefox_profile_lock.h" | 11 #include "chrome/browser/importer/firefox_profile_lock.h" |
| 12 #include "chrome/common/chrome_paths.h" | 12 #include "chrome/common/chrome_paths.h" |
| 13 | 13 |
| 14 TEST(FirefoxImporterTest, Firefox2NSS3Decryptor) { | 14 TEST(FirefoxImporterTest, Firefox2NSS3Decryptor) { |
| 15 std::wstring nss_path; | 15 std::wstring nss_path; |
| 16 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &nss_path)); | 16 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &nss_path)); |
| 17 file_util::AppendToPath(&nss_path, L"firefox2_nss"); | 17 file_util::AppendToPath(&nss_path, L"firefox2_nss"); |
| 18 std::wstring db_path; | 18 std::wstring db_path; |
| 19 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &db_path)); | 19 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &db_path)); |
| 20 file_util::AppendToPath(&db_path, L"firefox2_profile"); | 20 file_util::AppendToPath(&db_path, L"firefox2_profile"); |
| 21 NSSDecryptor decryptor; | 21 NSSDecryptor decryptor; |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 | 207 |
| 208 lock1->Unlock(); | 208 lock1->Unlock(); |
| 209 EXPECT_FALSE(lock1->HasAcquired()); | 209 EXPECT_FALSE(lock1->HasAcquired()); |
| 210 | 210 |
| 211 lock2->Lock(); | 211 lock2->Lock(); |
| 212 EXPECT_TRUE(lock2->HasAcquired()); | 212 EXPECT_TRUE(lock2->HasAcquired()); |
| 213 lock2->Unlock(); | 213 lock2->Unlock(); |
| 214 EXPECT_FALSE(lock2->HasAcquired()); | 214 EXPECT_FALSE(lock2->HasAcquired()); |
| 215 } | 215 } |
| 216 | 216 |
| OLD | NEW |