| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
| 10 #include <windows.h> | 10 #include <windows.h> |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 HRESULT res = pstore->WriteItem(0, type, subtype, items[i].name, | 351 HRESULT res = pstore->WriteItem(0, type, subtype, items[i].name, |
| 352 items[i].data_size, reinterpret_cast<BYTE*>(items[i].data), | 352 items[i].data_size, reinterpret_cast<BYTE*>(items[i].data), |
| 353 NULL, 0, 0); | 353 NULL, 0, 0); |
| 354 ASSERT_TRUE(res == PST_E_OK); | 354 ASSERT_TRUE(res == PST_E_OK); |
| 355 } | 355 } |
| 356 } | 356 } |
| 357 | 357 |
| 358 TEST_F(ImporterTest, IEImporter) { | 358 TEST_F(ImporterTest, IEImporter) { |
| 359 // Sets up a favorites folder. | 359 // Sets up a favorites folder. |
| 360 app::win::ScopedCOMInitializer com_init; | 360 app::win::ScopedCOMInitializer com_init; |
| 361 std::wstring path = test_path_.ToWStringHack(); | 361 std::wstring path = test_path_.AppendASCII("Favorites").value(); |
| 362 file_util::AppendToPath(&path, L"Favorites"); | |
| 363 CreateDirectory(path.c_str(), NULL); | 362 CreateDirectory(path.c_str(), NULL); |
| 364 CreateDirectory((path + L"\\SubFolder").c_str(), NULL); | 363 CreateDirectory((path + L"\\SubFolder").c_str(), NULL); |
| 365 CreateDirectory((path + L"\\Links").c_str(), NULL); | 364 CreateDirectory((path + L"\\Links").c_str(), NULL); |
| 366 CreateDirectory((path + L"\\Links\\SubFolderOfLinks").c_str(), NULL); | 365 CreateDirectory((path + L"\\Links\\SubFolderOfLinks").c_str(), NULL); |
| 367 CreateDirectory((path + L"\\\x0061").c_str(), NULL); | 366 CreateDirectory((path + L"\\\x0061").c_str(), NULL); |
| 368 ASSERT_TRUE(CreateUrlFile(path + L"\\Google Home Page.url", | 367 ASSERT_TRUE(CreateUrlFile(path + L"\\Google Home Page.url", |
| 369 L"http://www.google.com/")); | 368 L"http://www.google.com/")); |
| 370 ASSERT_TRUE(CreateUrlFile(path + L"\\SubFolder\\Title.url", | 369 ASSERT_TRUE(CreateUrlFile(path + L"\\SubFolder\\Title.url", |
| 371 L"http://www.link.com/")); | 370 L"http://www.link.com/")); |
| 372 ASSERT_TRUE(CreateUrlFile(path + L"\\TheLink.url", | 371 ASSERT_TRUE(CreateUrlFile(path + L"\\TheLink.url", |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 888 true); | 887 true); |
| 889 } | 888 } |
| 890 | 889 |
| 891 TEST_F(ImporterTest, MAYBE(Firefox35Importer)) { | 890 TEST_F(ImporterTest, MAYBE(Firefox35Importer)) { |
| 892 bool import_search_engines = false; | 891 bool import_search_engines = false; |
| 893 scoped_refptr<Firefox3Observer> observer( | 892 scoped_refptr<Firefox3Observer> observer( |
| 894 new Firefox3Observer(import_search_engines)); | 893 new Firefox3Observer(import_search_engines)); |
| 895 Firefox3xImporterTest("firefox35_profile", observer.get(), observer.get(), | 894 Firefox3xImporterTest("firefox35_profile", observer.get(), observer.get(), |
| 896 import_search_engines); | 895 import_search_engines); |
| 897 } | 896 } |
| OLD | NEW |