| OLD | NEW |
| 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 void ImportStarted() override {} | 239 void ImportStarted() override {} |
| 240 void ImportItemStarted(importer::ImportItem item) override {} | 240 void ImportItemStarted(importer::ImportItem item) override {} |
| 241 void ImportItemEnded(importer::ImportItem item) override {} | 241 void ImportItemEnded(importer::ImportItem item) override {} |
| 242 void ImportEnded() override { | 242 void ImportEnded() override { |
| 243 base::MessageLoop::current()->QuitWhenIdle(); | 243 base::MessageLoop::current()->QuitWhenIdle(); |
| 244 if (importer_items_ & importer::FAVORITES) { | 244 if (importer_items_ & importer::FAVORITES) { |
| 245 EXPECT_EQ(arraysize(kIEBookmarks), bookmark_count_); | 245 EXPECT_EQ(arraysize(kIEBookmarks), bookmark_count_); |
| 246 EXPECT_EQ(arraysize(kIEFaviconGroup), favicon_count_); | 246 EXPECT_EQ(arraysize(kIEFaviconGroup), favicon_count_); |
| 247 } | 247 } |
| 248 if (importer_items_ & importer::HISTORY) | 248 if (importer_items_ & importer::HISTORY) |
| 249 EXPECT_EQ(2, history_count_); | 249 EXPECT_EQ(2u, history_count_); |
| 250 if (importer_items_ & importer::HOME_PAGE) | 250 if (importer_items_ & importer::HOME_PAGE) |
| 251 EXPECT_EQ(1, homepage_count_); | 251 EXPECT_EQ(1u, homepage_count_); |
| 252 if ((importer_items_ & importer::PASSWORDS) && (ie_version_ == IE7)) | 252 if ((importer_items_ & importer::PASSWORDS) && (ie_version_ == IE7)) |
| 253 EXPECT_EQ(1, ie7_password_count_); | 253 EXPECT_EQ(1u, ie7_password_count_); |
| 254 // We need to test the IE6 password importer code. | 254 // We need to test the IE6 password importer code. |
| 255 // https://crbug.com/257100 | 255 // https://crbug.com/257100 |
| 256 // EXPECT_EQ(1, password_count_); | 256 // EXPECT_EQ(1, password_count_); |
| 257 } | 257 } |
| 258 | 258 |
| 259 // ProfileWriter: | 259 // ProfileWriter: |
| 260 bool BookmarkModelIsLoaded() const override { | 260 bool BookmarkModelIsLoaded() const override { |
| 261 // Profile is ready for writing. | 261 // Profile is ready for writing. |
| 262 return true; | 262 return true; |
| 263 } | 263 } |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 } | 345 } |
| 346 | 346 |
| 347 favicon_count_ += usage.size(); | 347 favicon_count_ += usage.size(); |
| 348 } | 348 } |
| 349 | 349 |
| 350 void AddIE7PasswordInfo(const IE7PasswordInfo& info) override { | 350 void AddIE7PasswordInfo(const IE7PasswordInfo& info) override { |
| 351 // This function also gets called for the IEImporter test. Ignore. | 351 // This function also gets called for the IEImporter test. Ignore. |
| 352 if (ie_version_ == IE7) { | 352 if (ie_version_ == IE7) { |
| 353 EXPECT_EQ(L"Test1", info.url_hash); | 353 EXPECT_EQ(L"Test1", info.url_hash); |
| 354 EXPECT_EQ(1, info.encrypted_data[0]); | 354 EXPECT_EQ(1, info.encrypted_data[0]); |
| 355 EXPECT_EQ(4, info.encrypted_data.size()); | 355 EXPECT_EQ(4u, info.encrypted_data.size()); |
| 356 ++ie7_password_count_; | 356 ++ie7_password_count_; |
| 357 } | 357 } |
| 358 } | 358 } |
| 359 | 359 |
| 360 void AddHomepage(const GURL& homepage) override { | 360 void AddHomepage(const GURL& homepage) override { |
| 361 EXPECT_EQ(homepage.spec(), "http://www.test.com/"); | 361 EXPECT_EQ(homepage.spec(), "http://www.test.com/"); |
| 362 ++homepage_count_; | 362 ++homepage_count_; |
| 363 } | 363 } |
| 364 | 364 |
| 365 private: | 365 private: |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |