OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 // The order of these includes is important. | 8 // The order of these includes is important. |
9 #include <windows.h> | 9 #include <windows.h> |
10 #include <unknwn.h> | 10 #include <unknwn.h> |
11 #include <intshcut.h> | 11 #include <intshcut.h> |
12 #include <pstore.h> | 12 #include <pstore.h> |
13 #include <urlhist.h> | 13 #include <urlhist.h> |
14 #include <shlguid.h> | 14 #include <shlguid.h> |
15 #endif | 15 #endif |
16 | 16 |
17 #include <vector> | 17 #include <vector> |
18 | 18 |
19 #include "app/win/scoped_com_initializer.h" | 19 #include "app/win/scoped_com_initializer.h" |
20 #include "base/compiler_specific.h" | 20 #include "base/compiler_specific.h" |
21 #include "base/file_util.h" | 21 #include "base/file_util.h" |
22 #include "base/message_loop.h" | 22 #include "base/message_loop.h" |
23 #include "base/path_service.h" | 23 #include "base/path_service.h" |
24 #include "base/stl_util-inl.h" | 24 #include "base/stl_util-inl.h" |
25 #include "base/string_util.h" | 25 #include "base/string_util.h" |
26 #include "base/utf_string_conversions.h" | 26 #include "base/utf_string_conversions.h" |
27 #include "base/values.h" | 27 #include "base/values.h" |
28 #include "base/win/windows_version.h" | |
tfarina
2011/04/05 23:10:47
This is already included at line 42.
Peter Kasting
2011/04/05 23:45:32
Ah, missed that, thanks.
| |
28 #include "chrome/browser/history/history_types.h" | 29 #include "chrome/browser/history/history_types.h" |
29 #include "chrome/browser/importer/importer_bridge.h" | 30 #include "chrome/browser/importer/importer_bridge.h" |
30 #include "chrome/browser/importer/importer_data_types.h" | 31 #include "chrome/browser/importer/importer_data_types.h" |
31 #include "chrome/browser/importer/importer_host.h" | 32 #include "chrome/browser/importer/importer_host.h" |
32 #include "chrome/browser/importer/importer_progress_observer.h" | 33 #include "chrome/browser/importer/importer_progress_observer.h" |
33 #include "chrome/browser/search_engines/template_url.h" | 34 #include "chrome/browser/search_engines/template_url.h" |
34 #include "chrome/common/chrome_paths.h" | 35 #include "chrome/common/chrome_paths.h" |
35 #include "content/browser/browser_thread.h" | 36 #include "content/browser/browser_thread.h" |
36 #include "testing/gtest/include/gtest/gtest.h" | 37 #include "testing/gtest/include/gtest/gtest.h" |
37 #include "webkit/glue/password_form.h" | 38 #include "webkit/glue/password_form.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
198 | 199 |
199 // importer::ImporterProgressObserver: | 200 // importer::ImporterProgressObserver: |
200 virtual void ImportStarted() OVERRIDE {} | 201 virtual void ImportStarted() OVERRIDE {} |
201 virtual void ImportItemStarted(importer::ImportItem item) OVERRIDE {} | 202 virtual void ImportItemStarted(importer::ImportItem item) OVERRIDE {} |
202 virtual void ImportItemEnded(importer::ImportItem item) OVERRIDE {} | 203 virtual void ImportItemEnded(importer::ImportItem item) OVERRIDE {} |
203 virtual void ImportEnded() OVERRIDE { | 204 virtual void ImportEnded() OVERRIDE { |
204 MessageLoop::current()->Quit(); | 205 MessageLoop::current()->Quit(); |
205 EXPECT_EQ(arraysize(kIEBookmarks), bookmark_count_); | 206 EXPECT_EQ(arraysize(kIEBookmarks), bookmark_count_); |
206 EXPECT_EQ(1, history_count_); | 207 EXPECT_EQ(1, history_count_); |
207 #if 0 // This part of the test is disabled. See bug #2466 | 208 #if 0 // This part of the test is disabled. See bug #2466 |
208 if (base::win::GetVersion() < base::win::VERSION_VISTA) | 209 if (base::win::GetVersion() >= base::win::VERSION_VISTA) |
209 EXPECT_EQ(0, password_count_); | 210 EXPECT_EQ(0, password_count_); |
210 else | 211 else |
211 EXPECT_EQ(1, password_count_); | 212 EXPECT_EQ(1, password_count_); |
212 #endif | 213 #endif |
213 } | 214 } |
214 | 215 |
215 virtual bool BookmarkModelIsLoaded() const { | 216 virtual bool BookmarkModelIsLoaded() const { |
216 // Profile is ready for writing. | 217 // Profile is ready for writing. |
217 return true; | 218 return true; |
218 } | 219 } |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
881 true); | 882 true); |
882 } | 883 } |
883 | 884 |
884 TEST_F(ImporterTest, MAYBE(Firefox35Importer)) { | 885 TEST_F(ImporterTest, MAYBE(Firefox35Importer)) { |
885 bool import_search_engines = false; | 886 bool import_search_engines = false; |
886 scoped_refptr<Firefox3Observer> observer( | 887 scoped_refptr<Firefox3Observer> observer( |
887 new Firefox3Observer(import_search_engines)); | 888 new Firefox3Observer(import_search_engines)); |
888 Firefox3xImporterTest("firefox35_profile", observer.get(), observer.get(), | 889 Firefox3xImporterTest("firefox35_profile", observer.get(), observer.get(), |
889 import_search_engines); | 890 import_search_engines); |
890 } | 891 } |
OLD | NEW |