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

Unified Diff: chrome/browser/importer/ie_importer_unittest_win.cc

Issue 18501013: Move most importer code to chrome/utility/importer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: another gyp attempt Created 7 years, 5 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/importer/ie_importer_unittest_win.cc
diff --git a/chrome/browser/importer/ie_importer_unittest_win.cc b/chrome/browser/importer/ie_importer_unittest_win.cc
deleted file mode 100644
index df16ade8945cbf9e7cbe0997cb2bd33882e54aa6..0000000000000000000000000000000000000000
--- a/chrome/browser/importer/ie_importer_unittest_win.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "testing/gtest/include/gtest/gtest.h"
-
-#include <windows.h>
-
-#include <vector>
-
-#include "base/strings/string16.h"
-#include "components/webdata/encryptor/ie7_password.h"
-
-TEST(IEImporterTest, IE7Importer) {
- // This is the unencrypted values of my keys under Storage2.
- // The passwords have been manually changed to abcdef... but the size remains
- // the same.
- unsigned char data1[] = "\x0c\x00\x00\x00\x38\x00\x00\x00\x2c\x00\x00\x00"
- "\x57\x49\x43\x4b\x18\x00\x00\x00\x02\x00\x00\x00"
- "\x67\x00\x72\x00\x01\x00\x00\x00\x00\x00\x00\x00"
- "\x00\x00\x00\x00\x4e\xfa\x67\x76\x22\x94\xc8\x01"
- "\x08\x00\x00\x00\x12\x00\x00\x00\x4e\xfa\x67\x76"
- "\x22\x94\xc8\x01\x0c\x00\x00\x00\x61\x00\x62\x00"
- "\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00"
- "\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00"
- "\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00"
- "\x6c\x00\x00\x00";
-
- unsigned char data2[] = "\x0c\x00\x00\x00\x38\x00\x00\x00\x24\x00\x00\x00"
- "\x57\x49\x43\x4b\x18\x00\x00\x00\x02\x00\x00\x00"
- "\x67\x00\x72\x00\x01\x00\x00\x00\x00\x00\x00\x00"
- "\x00\x00\x00\x00\xa8\xea\xf4\xe5\x9f\x9a\xc8\x01"
- "\x09\x00\x00\x00\x14\x00\x00\x00\xa8\xea\xf4\xe5"
- "\x9f\x9a\xc8\x01\x07\x00\x00\x00\x61\x00\x62\x00"
- "\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00"
- "\x69\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00"
- "\x65\x00\x66\x00\x67\x00\x00\x00";
-
-
-
- std::vector<unsigned char> decrypted_data1;
- decrypted_data1.resize(arraysize(data1));
- memcpy(&decrypted_data1.front(), data1, sizeof(data1));
-
- std::vector<unsigned char> decrypted_data2;
- decrypted_data2.resize(arraysize(data2));
- memcpy(&decrypted_data2.front(), data2, sizeof(data2));
-
- string16 password;
- string16 username;
- ASSERT_TRUE(ie7_password::GetUserPassFromData(decrypted_data1, &username,
- &password));
- EXPECT_EQ(L"abcdefgh", username);
- EXPECT_EQ(L"abcdefghijkl", password);
-
- ASSERT_TRUE(ie7_password::GetUserPassFromData(decrypted_data2, &username,
- &password));
- EXPECT_EQ(L"abcdefghi", username);
- EXPECT_EQ(L"abcdefg", password);
-}
« no previous file with comments | « chrome/browser/importer/ie_importer_test_registry_overrider_win.cc ('k') | chrome/browser/importer/ie_importer_utils_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698