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

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

Issue 231012: The Firefox3XImporter test was incorrectly deleting a ref counted object caus... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 ASSERT_TRUE(file_util::CopyDirectory(data_path, profile_path_, false)); 64 ASSERT_TRUE(file_util::CopyDirectory(data_path, profile_path_, false));
65 65
66 std::wstring search_engine_path = app_path_; 66 std::wstring search_engine_path = app_path_;
67 file_util::AppendToPath(&search_engine_path, L"searchplugins"); 67 file_util::AppendToPath(&search_engine_path, L"searchplugins");
68 CreateDirectory(search_engine_path.c_str(), NULL); 68 CreateDirectory(search_engine_path.c_str(), NULL);
69 if (import_search_plugins) { 69 if (import_search_plugins) {
70 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_path)); 70 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_path));
71 file_util::AppendToPath(&data_path, L"firefox3_searchplugins"); 71 file_util::AppendToPath(&data_path, L"firefox3_searchplugins");
72 if (!file_util::PathExists(data_path)) { 72 if (!file_util::PathExists(data_path)) {
73 // TODO(maruel): Create search test data that we can open source! 73 // TODO(maruel): Create search test data that we can open source!
74 delete observer;
75 LOG(ERROR) << L"Missing internal test data"; 74 LOG(ERROR) << L"Missing internal test data";
76 return; 75 return;
77 } 76 }
78 ASSERT_TRUE(file_util::CopyDirectory(data_path, 77 ASSERT_TRUE(file_util::CopyDirectory(data_path,
79 search_engine_path, false)); 78 search_engine_path, false));
80 } 79 }
81 80
82 MessageLoop* loop = MessageLoop::current(); 81 MessageLoop* loop = MessageLoop::current();
83 ProfileInfo profile_info; 82 ProfileInfo profile_info;
84 profile_info.browser_type = FIREFOX3; 83 profile_info.browser_type = FIREFOX3;
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 int bookmark_count_; 830 int bookmark_count_;
832 int history_count_; 831 int history_count_;
833 int password_count_; 832 int password_count_;
834 int keyword_count_; 833 int keyword_count_;
835 bool import_search_engines_; 834 bool import_search_engines_;
836 std::wstring default_keyword_; 835 std::wstring default_keyword_;
837 std::wstring default_keyword_url_; 836 std::wstring default_keyword_url_;
838 }; 837 };
839 838
840 // This test is disabled, see bug 22884 839 // This test is disabled, see bug 22884
841 TEST_F(ImporterTest, DISABLED_Firefox30Importer) { 840 TEST_F(ImporterTest, Firefox30Importer) {
842 Firefox3Observer* observer = new Firefox3Observer(); 841 scoped_refptr<Firefox3Observer> observer = new Firefox3Observer();
843 Firefox3xImporterTest(L"firefox3_profile", observer, observer, true); 842 Firefox3xImporterTest(L"firefox3_profile", observer.get(), observer.get(),
843 true);
844 } 844 }
845 845
846 TEST_F(ImporterTest, Firefox35Importer) { 846 TEST_F(ImporterTest, Firefox35Importer) {
847 bool import_search_engines = false; 847 bool import_search_engines = false;
848 Firefox3Observer* observer = new Firefox3Observer(import_search_engines); 848 scoped_refptr<Firefox3Observer> observer =
849 Firefox3xImporterTest(L"firefox35_profile", observer, observer, 849 new Firefox3Observer(import_search_engines);
850 Firefox3xImporterTest(L"firefox35_profile", observer.get(), observer.get(),
850 import_search_engines); 851 import_search_engines);
851 } 852 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698