OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include <unknwn.h> | 8 #include <unknwn.h> |
9 #include <intshcut.h> | 9 #include <intshcut.h> |
10 #include <pstore.h> | 10 #include <pstore.h> |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 virtual void ImportEnded() { | 144 virtual void ImportEnded() { |
145 MessageLoop::current()->Quit(); | 145 MessageLoop::current()->Quit(); |
146 EXPECT_EQ(arraysize(kIEBookmarks), bookmark_count_); | 146 EXPECT_EQ(arraysize(kIEBookmarks), bookmark_count_); |
147 EXPECT_EQ(1, history_count_); | 147 EXPECT_EQ(1, history_count_); |
148 if (IsWindowsVista()) | 148 if (IsWindowsVista()) |
149 EXPECT_EQ(0, password_count_); | 149 EXPECT_EQ(0, password_count_); |
150 else | 150 else |
151 EXPECT_EQ(1, password_count_); | 151 EXPECT_EQ(1, password_count_); |
152 } | 152 } |
153 | 153 |
154 virtual bool BookmarkBarModelIsLoaded() const { | 154 virtual bool BookmarkModelIsLoaded() const { |
155 // Profile is ready for writing. | 155 // Profile is ready for writing. |
156 return true; | 156 return true; |
157 } | 157 } |
158 | 158 |
159 virtual void AddBookmarkBarModelObserver( | 159 virtual void AddBookmarkModelObserver(BookmarkModelObserver* observer) { |
160 BookmarkBarModelObserver* observer) { | |
161 NOTREACHED(); | 160 NOTREACHED(); |
162 } | 161 } |
163 | 162 |
164 virtual bool TemplateURLModelIsLoaded() const { | 163 virtual bool TemplateURLModelIsLoaded() const { |
165 return true; | 164 return true; |
166 } | 165 } |
167 | 166 |
168 virtual void AddTemplateURLModelObserver(NotificationObserver* observer) { | 167 virtual void AddTemplateURLModelObserver(NotificationObserver* observer) { |
169 NOTREACHED(); | 168 NOTREACHED(); |
170 } | 169 } |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 EXPECT_EQ(arraysize(kFirefox2Bookmarks), bookmark_count_); | 497 EXPECT_EQ(arraysize(kFirefox2Bookmarks), bookmark_count_); |
499 EXPECT_EQ(1, history_count_); | 498 EXPECT_EQ(1, history_count_); |
500 EXPECT_EQ(arraysize(kFirefox2Passwords), password_count_); | 499 EXPECT_EQ(arraysize(kFirefox2Passwords), password_count_); |
501 EXPECT_EQ(arraysize(kFirefox2Keywords), keyword_count_); | 500 EXPECT_EQ(arraysize(kFirefox2Keywords), keyword_count_); |
502 EXPECT_EQ(kFirefox2Keywords[kDefaultFirefox2KeywordIndex].keyword, | 501 EXPECT_EQ(kFirefox2Keywords[kDefaultFirefox2KeywordIndex].keyword, |
503 default_keyword_); | 502 default_keyword_); |
504 EXPECT_EQ(kFirefox2Keywords[kDefaultFirefox2KeywordIndex].url, | 503 EXPECT_EQ(kFirefox2Keywords[kDefaultFirefox2KeywordIndex].url, |
505 default_keyword_url_); | 504 default_keyword_url_); |
506 } | 505 } |
507 | 506 |
508 virtual bool BookmarkBarModelIsLoaded() const { | 507 virtual bool BookmarkModelIsLoaded() const { |
509 // Profile is ready for writing. | 508 // Profile is ready for writing. |
510 return true; | 509 return true; |
511 } | 510 } |
512 | 511 |
513 virtual void AddBookmarkBarModelObserver( | 512 virtual void AddBookmarkModelObserver(BookmarkModelObserver* observer) { |
514 BookmarkBarModelObserver* observer) { | |
515 NOTREACHED(); | 513 NOTREACHED(); |
516 } | 514 } |
517 | 515 |
518 virtual bool TemplateURLModelIsLoaded() const { | 516 virtual bool TemplateURLModelIsLoaded() const { |
519 return true; | 517 return true; |
520 } | 518 } |
521 | 519 |
522 virtual void AddTemplateURLModelObserver(NotificationObserver* observer) { | 520 virtual void AddTemplateURLModelObserver(NotificationObserver* observer) { |
523 NOTREACHED(); | 521 NOTREACHED(); |
524 } | 522 } |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 EXPECT_EQ(arraysize(kFirefox3Bookmarks), bookmark_count_); | 687 EXPECT_EQ(arraysize(kFirefox3Bookmarks), bookmark_count_); |
690 EXPECT_EQ(1, history_count_); | 688 EXPECT_EQ(1, history_count_); |
691 EXPECT_EQ(arraysize(kFirefox3Passwords), password_count_); | 689 EXPECT_EQ(arraysize(kFirefox3Passwords), password_count_); |
692 EXPECT_EQ(arraysize(kFirefox3Keywords), keyword_count_); | 690 EXPECT_EQ(arraysize(kFirefox3Keywords), keyword_count_); |
693 EXPECT_EQ(kFirefox3Keywords[kDefaultFirefox3KeywordIndex].keyword, | 691 EXPECT_EQ(kFirefox3Keywords[kDefaultFirefox3KeywordIndex].keyword, |
694 default_keyword_); | 692 default_keyword_); |
695 EXPECT_EQ(kFirefox3Keywords[kDefaultFirefox3KeywordIndex].url, | 693 EXPECT_EQ(kFirefox3Keywords[kDefaultFirefox3KeywordIndex].url, |
696 default_keyword_url_); | 694 default_keyword_url_); |
697 } | 695 } |
698 | 696 |
699 virtual bool BookmarkBarModelIsLoaded() const { | 697 virtual bool BookmarkModelIsLoaded() const { |
700 // Profile is ready for writing. | 698 // Profile is ready for writing. |
701 return true; | 699 return true; |
702 } | 700 } |
703 | 701 |
704 virtual void AddBookmarkBarModelObserver( | 702 virtual void AddBookmarkModelObserver(BookmarkModelObserver* observer) { |
705 BookmarkBarModelObserver* observer) { | |
706 NOTREACHED(); | 703 NOTREACHED(); |
707 } | 704 } |
708 | 705 |
709 virtual bool TemplateURLModelIsLoaded() const { | 706 virtual bool TemplateURLModelIsLoaded() const { |
710 return true; | 707 return true; |
711 } | 708 } |
712 | 709 |
713 virtual void AddTemplateURLModelObserver(NotificationObserver* observer) { | 710 virtual void AddTemplateURLModelObserver(NotificationObserver* observer) { |
714 NOTREACHED(); | 711 NOTREACHED(); |
715 } | 712 } |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 profile_info.source_path = profile_path_; | 810 profile_info.source_path = profile_path_; |
814 scoped_refptr<ImporterHost> host = new ImporterHost(loop); | 811 scoped_refptr<ImporterHost> host = new ImporterHost(loop); |
815 Firefox3Observer* observer = new Firefox3Observer(); | 812 Firefox3Observer* observer = new Firefox3Observer(); |
816 host->SetObserver(observer); | 813 host->SetObserver(observer); |
817 loop->PostTask(FROM_HERE, NewRunnableMethod(host.get(), | 814 loop->PostTask(FROM_HERE, NewRunnableMethod(host.get(), |
818 &ImporterHost::StartImportSettings, profile_info, | 815 &ImporterHost::StartImportSettings, profile_info, |
819 HISTORY | PASSWORDS | FAVORITES | SEARCH_ENGINES, observer, true)); | 816 HISTORY | PASSWORDS | FAVORITES | SEARCH_ENGINES, observer, true)); |
820 loop->Run(); | 817 loop->Run(); |
821 } | 818 } |
822 | 819 |
OLD | NEW |