summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history
diff options
context:
space:
mode:
authornshkrob@chromium.org <nshkrob@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-22 20:00:36 +0000
committernshkrob@chromium.org <nshkrob@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-22 20:00:36 +0000
commit2a301cd4286f55db708048d02e66a147f2973ee4 (patch)
tree80a314ae34f7c842108e04460f23e45f7accd88e /chrome/browser/history
parent1b38d0b4a83aee2e741297b97181fdded474da82 (diff)
downloadchromium_src-2a301cd4286f55db708048d02e66a147f2973ee4.zip
chromium_src-2a301cd4286f55db708048d02e66a147f2973ee4.tar.gz
chromium_src-2a301cd4286f55db708048d02e66a147f2973ee4.tar.bz2
Fix a segfault in DeleteNotifications test caused by an invalid C-cast.
Re-enable the test. BUG=49799 TEST=TopSitesTest::DeleteNotifications. Review URL: http://codereview.chromium.org/2847066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53372 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history')
-rw-r--r--chrome/browser/history/top_sites_unittest.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/chrome/browser/history/top_sites_unittest.cc b/chrome/browser/history/top_sites_unittest.cc
index a6b7e7b..8d0d81e 100644
--- a/chrome/browser/history/top_sites_unittest.cc
+++ b/chrome/browser/history/top_sites_unittest.cc
@@ -705,9 +705,7 @@ TEST_F(TopSitesTest, RealDatabase) {
EXPECT_TRUE(high_score.Equals(out_2.thumbnail_score));
}
-// This test has been crashing unit_tests on Mac 10.6.
-// See http://crbug.com/49799
-TEST_F(TopSitesTest, DISABLED_DeleteNotifications) {
+TEST_F(TopSitesTest, DeleteNotifications) {
ChromeThread db_loop(ChromeThread::DB, MessageLoop::current());
GURL google1_url("http://google.com");
GURL google2_url("http://google.com/redirect");
@@ -735,11 +733,12 @@ TEST_F(TopSitesTest, DISABLED_DeleteNotifications) {
hs.RemoveMostVisitedURL();
- history::URLsDeletedDetails details;
- details.all_history = false;
+ history::URLsDeletedDetails history_details;
+ history_details.all_history = false;
+ Details<URLsDeletedDetails> details(&history_details);
top_sites().Observe(NotificationType::HISTORY_URLS_DELETED,
Source<Profile> (&profile()),
- (const NotificationDetails&)details);
+ details);
MessageLoop::current()->RunAllPending();
top_sites().GetMostVisitedURLs(
@@ -750,10 +749,11 @@ TEST_F(TopSitesTest, DISABLED_DeleteNotifications) {
EXPECT_EQ(google_title, urls()[0].title);
hs.RemoveMostVisitedURL();
- details.all_history = true;
+ history_details.all_history = true;
+ details = Details<HistoryDetails>(&history_details);
top_sites().Observe(NotificationType::HISTORY_URLS_DELETED,
Source<Profile> (&profile()),
- (const NotificationDetails&)details);
+ details);
MessageLoop::current()->RunAllPending();
top_sites().GetMostVisitedURLs(
consumer(),