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

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

Issue 15798020: Use a direct include of strings headers in chrome/browser/i*/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <windows.h> 7 #include <windows.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/string16.h" 11 #include "base/strings/string16.h"
12 #include "components/webdata/encryptor/ie7_password.h" 12 #include "components/webdata/encryptor/ie7_password.h"
13 13
14 TEST(IEImporterTest, IE7Importer) { 14 TEST(IEImporterTest, IE7Importer) {
15 // This is the unencrypted values of my keys under Storage2. 15 // This is the unencrypted values of my keys under Storage2.
16 // The passwords have been manually changed to abcdef... but the size remains 16 // The passwords have been manually changed to abcdef... but the size remains
17 // the same. 17 // the same.
18 unsigned char data1[] = "\x0c\x00\x00\x00\x38\x00\x00\x00\x2c\x00\x00\x00" 18 unsigned char data1[] = "\x0c\x00\x00\x00\x38\x00\x00\x00\x2c\x00\x00\x00"
19 "\x57\x49\x43\x4b\x18\x00\x00\x00\x02\x00\x00\x00" 19 "\x57\x49\x43\x4b\x18\x00\x00\x00\x02\x00\x00\x00"
20 "\x67\x00\x72\x00\x01\x00\x00\x00\x00\x00\x00\x00" 20 "\x67\x00\x72\x00\x01\x00\x00\x00\x00\x00\x00\x00"
21 "\x00\x00\x00\x00\x4e\xfa\x67\x76\x22\x94\xc8\x01" 21 "\x00\x00\x00\x00\x4e\xfa\x67\x76\x22\x94\xc8\x01"
(...skipping 29 matching lines...) Expand all
51 ASSERT_TRUE(ie7_password::GetUserPassFromData(decrypted_data1, &username, 51 ASSERT_TRUE(ie7_password::GetUserPassFromData(decrypted_data1, &username,
52 &password)); 52 &password));
53 EXPECT_EQ(L"abcdefgh", username); 53 EXPECT_EQ(L"abcdefgh", username);
54 EXPECT_EQ(L"abcdefghijkl", password); 54 EXPECT_EQ(L"abcdefghijkl", password);
55 55
56 ASSERT_TRUE(ie7_password::GetUserPassFromData(decrypted_data2, &username, 56 ASSERT_TRUE(ie7_password::GetUserPassFromData(decrypted_data2, &username,
57 &password)); 57 &password));
58 EXPECT_EQ(L"abcdefghi", username); 58 EXPECT_EQ(L"abcdefghi", username);
59 EXPECT_EQ(L"abcdefg", password); 59 EXPECT_EQ(L"abcdefg", password);
60 } 60 }
OLDNEW
« no previous file with comments | « chrome/browser/importer/ie_importer_test_registry_overrider_win.h ('k') | chrome/browser/importer/ie_importer_utils_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698