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

Side by Side Diff: chrome/browser/importer/ie_importer_browsertest_win.cc

Issue 1465853002: Implement support for importing favorites from Edge on Windows 10. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added missing include files Created 5 years 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 // The order of these includes is important. 5 // The order of these includes is important.
6 #include <windows.h> 6 #include <windows.h>
7 #include <unknwn.h> 7 #include <unknwn.h>
8 #include <intshcut.h> 8 #include <intshcut.h>
9 #include <propvarutil.h> 9 #include <propvarutil.h>
10 #include <shlguid.h> 10 #include <shlguid.h>
(...skipping 14 matching lines...) Expand all
25 #include "base/strings/utf_string_conversions.h" 25 #include "base/strings/utf_string_conversions.h"
26 #include "base/win/registry.h" 26 #include "base/win/registry.h"
27 #include "base/win/scoped_comptr.h" 27 #include "base/win/scoped_comptr.h"
28 #include "base/win/scoped_propvariant.h" 28 #include "base/win/scoped_propvariant.h"
29 #include "base/win/windows_version.h" 29 #include "base/win/windows_version.h"
30 #include "chrome/browser/importer/external_process_importer_host.h" 30 #include "chrome/browser/importer/external_process_importer_host.h"
31 #include "chrome/browser/importer/importer_progress_observer.h" 31 #include "chrome/browser/importer/importer_progress_observer.h"
32 #include "chrome/browser/importer/importer_unittest_utils.h" 32 #include "chrome/browser/importer/importer_unittest_utils.h"
33 #include "chrome/browser/ui/browser.h" 33 #include "chrome/browser/ui/browser.h"
34 #include "chrome/common/chrome_paths.h" 34 #include "chrome/common/chrome_paths.h"
35 #include "chrome/common/importer/ie_importer_test_registry_overrider_win.h"
36 #include "chrome/common/importer/ie_importer_utils_win.h" 35 #include "chrome/common/importer/ie_importer_utils_win.h"
37 #include "chrome/common/importer/imported_bookmark_entry.h" 36 #include "chrome/common/importer/imported_bookmark_entry.h"
38 #include "chrome/common/importer/importer_bridge.h" 37 #include "chrome/common/importer/importer_bridge.h"
39 #include "chrome/common/importer/importer_data_types.h" 38 #include "chrome/common/importer/importer_data_types.h"
39 #include "chrome/common/importer/importer_test_registry_overrider_win.h"
40 #include "chrome/test/base/in_process_browser_test.h" 40 #include "chrome/test/base/in_process_browser_test.h"
41 #include "chrome/test/base/testing_profile.h" 41 #include "chrome/test/base/testing_profile.h"
42 #include "components/autofill/core/common/password_form.h" 42 #include "components/autofill/core/common/password_form.h"
43 #include "components/favicon_base/favicon_usage_data.h" 43 #include "components/favicon_base/favicon_usage_data.h"
44 #include "components/os_crypt/ie7_password_win.h" 44 #include "components/os_crypt/ie7_password_win.h"
45 #include "components/search_engines/template_url.h" 45 #include "components/search_engines/template_url.h"
46 #include "testing/gtest/include/gtest/gtest.h" 46 #include "testing/gtest/include/gtest/gtest.h"
47 47
48 namespace { 48 namespace {
49 49
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 429 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
430 430
431 // This will launch the browser test and thus needs to happen last. 431 // This will launch the browser test and thus needs to happen last.
432 InProcessBrowserTest::SetUp(); 432 InProcessBrowserTest::SetUp();
433 } 433 }
434 434
435 base::ScopedTempDir temp_dir_; 435 base::ScopedTempDir temp_dir_;
436 436
437 // Overrides the default registry key for IE registry keys like favorites, 437 // Overrides the default registry key for IE registry keys like favorites,
438 // settings, password store, etc. 438 // settings, password store, etc.
439 IEImporterTestRegistryOverrider test_registry_overrider_; 439 ImporterTestRegistryOverrider test_registry_overrider_;
440 }; 440 };
441 441
442 IN_PROC_BROWSER_TEST_F(IEImporterBrowserTest, IEImporter) { 442 IN_PROC_BROWSER_TEST_F(IEImporterBrowserTest, IEImporter) {
443 // Sets up a favorites folder. 443 // Sets up a favorites folder.
444 base::FilePath path = temp_dir_.path().AppendASCII("Favorites"); 444 base::FilePath path = temp_dir_.path().AppendASCII("Favorites");
445 CreateDirectory(path.value().c_str(), NULL); 445 CreateDirectory(path.value().c_str(), NULL);
446 CreateDirectory(path.AppendASCII("SubFolder").value().c_str(), NULL); 446 CreateDirectory(path.AppendASCII("SubFolder").value().c_str(), NULL);
447 base::FilePath links_path = path.AppendASCII("Links"); 447 base::FilePath links_path = path.AppendASCII("Links");
448 CreateDirectory(links_path.value().c_str(), NULL); 448 CreateDirectory(links_path.value().c_str(), NULL);
449 CreateDirectory(links_path.AppendASCII("SubFolderOfLinks").value().c_str(), 449 CreateDirectory(links_path.AppendASCII("SubFolderOfLinks").value().c_str(),
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 source_profile.source_path = temp_dir_.path(); 646 source_profile.source_path = temp_dir_.path();
647 647
648 host->StartImportSettings( 648 host->StartImportSettings(
649 source_profile, 649 source_profile,
650 browser()->profile(), 650 browser()->profile(),
651 importer::HOME_PAGE, 651 importer::HOME_PAGE,
652 observer); 652 observer);
653 base::MessageLoop::current()->Run(); 653 base::MessageLoop::current()->Run();
654 } 654 }
655 655
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698