| Index: chrome/browser/importer/ie_importer_browsertest_win.cc
|
| diff --git a/chrome/browser/importer/ie_importer_browsertest_win.cc b/chrome/browser/importer/ie_importer_browsertest_win.cc
|
| index 3eb013235c9cf47d877c9b5d19046bf581f8913e..3442be59900104b8d684c16e50f96e763268be13 100644
|
| --- a/chrome/browser/importer/ie_importer_browsertest_win.cc
|
| +++ b/chrome/browser/importer/ie_importer_browsertest_win.cc
|
| @@ -31,6 +31,7 @@
|
| #include "chrome/browser/bookmarks/imported_bookmark_entry.h"
|
| #include "chrome/browser/favicon/imported_favicon_usage.h"
|
| #include "chrome/browser/importer/ie_importer.h"
|
| +#include "chrome/browser/importer/ie_importer_utils_win.h"
|
| #include "chrome/browser/importer/ie_importer_test_registry_overrider_win.h"
|
| #include "chrome/browser/importer/importer_bridge.h"
|
| #include "chrome/browser/importer/importer_data_types.h"
|
| @@ -87,10 +88,6 @@ const char16 kIEIdentifyUrl[] =
|
| const char16 kIEIdentifyTitle[] =
|
| L"Unittest GUID";
|
|
|
| -const char16 kIEFavoritesOrderKey[] =
|
| - L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\"
|
| - L"MenuOrder\\Favorites";
|
| -
|
| const char16 kFaviconStreamSuffix[] = L"url:favicon:$DATA";
|
| const char kDummyFaviconImageData[] =
|
| "\x42\x4D" // Magic signature 'BM'
|
| @@ -147,7 +144,7 @@ bool CreateOrderBlob(const base::FilePath& favorites_folder,
|
| ILFree(id_list_full);
|
| }
|
|
|
| - string16 key_path = kIEFavoritesOrderKey;
|
| + base::string16 key_path(importer::GetIEFavoritesOrderKey());
|
| if (!path.empty())
|
| key_path += L"\\" + path;
|
| base::win::RegKey key;
|
| @@ -415,9 +412,9 @@ class IEImporterBrowserTest : public InProcessBrowserTest {
|
| virtual void SetUp() OVERRIDE {
|
| ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
|
|
|
| - // Turn the override on for this process and flag child processes that they
|
| - // should do so as well.
|
| - ASSERT_TRUE(test_registry_overrider_.SetRegistryOverride());
|
| + // Generate a random registry key to be used by this process and its child
|
| + // processes instead of the default.
|
| + ASSERT_TRUE(test_registry_overrider_.SetTestRegistryOverride());
|
|
|
| // This will launch the browser test and thus needs to happen last.
|
| InProcessBrowserTest::SetUp();
|
| @@ -556,9 +553,10 @@ IN_PROC_BROWSER_TEST_F(IEImporterBrowserTest,
|
| // Verify malformed registry data are safely ignored and alphabetical
|
| // sort is performed.
|
| for (size_t i = 0; i < arraysize(kBadBinary); ++i) {
|
| + base::string16 key_path(importer::GetIEFavoritesOrderKey());
|
| base::win::RegKey key;
|
| ASSERT_EQ(ERROR_SUCCESS,
|
| - key.Create(HKEY_CURRENT_USER, kIEFavoritesOrderKey, KEY_WRITE));
|
| + key.Create(HKEY_CURRENT_USER, key_path.c_str(), KEY_WRITE));
|
| ASSERT_EQ(ERROR_SUCCESS,
|
| key.WriteValue(L"Order", kBadBinary[i].data, kBadBinary[i].length,
|
| REG_BINARY));
|
|
|