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

Side by Side Diff: chrome/browser/history/top_sites_unittest.cc

Issue 2832066: Marking TopSitesTest.DeleteNotifications as DISABLED (Closed)
Patch Set: Changing comment. Created 10 years, 5 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
« 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "base/scoped_temp_dir.h" 5 #include "base/scoped_temp_dir.h"
6 #include "base/string_util.h" 6 #include "base/string_util.h"
7 #include "chrome/browser/history/top_sites.h" 7 #include "chrome/browser/history/top_sites.h"
8 #include "chrome/common/chrome_paths.h" 8 #include "chrome/common/chrome_paths.h"
9 #include "chrome/browser/history/history_marshaling.h" 9 #include "chrome/browser/history/history_marshaling.h"
10 #include "chrome/browser/history/top_sites_database.h" 10 #include "chrome/browser/history/top_sites_database.h"
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 EXPECT_TRUE(top_sites().GetPageThumbnail(google1_url, &out_1)); 698 EXPECT_TRUE(top_sites().GetPageThumbnail(google1_url, &out_1));
699 EXPECT_FALSE(ThumbnailsAreEqual(out_1, out_2.thumbnail)); 699 EXPECT_FALSE(ThumbnailsAreEqual(out_1, out_2.thumbnail));
700 MessageLoop::current()->RunAllPending(); 700 MessageLoop::current()->RunAllPending();
701 701
702 // Read the new thumbnail from the DB - should match what's in TopSites. 702 // Read the new thumbnail from the DB - should match what's in TopSites.
703 db->GetPageThumbnail(url2.url, &out_2); 703 db->GetPageThumbnail(url2.url, &out_2);
704 EXPECT_TRUE(ThumbnailsAreEqual(out_1, out_2.thumbnail)); 704 EXPECT_TRUE(ThumbnailsAreEqual(out_1, out_2.thumbnail));
705 EXPECT_TRUE(high_score.Equals(out_2.thumbnail_score)); 705 EXPECT_TRUE(high_score.Equals(out_2.thumbnail_score));
706 } 706 }
707 707
708 TEST_F(TopSitesTest, DeleteNotifications) { 708 // This test has been crashing unit_tests on Mac 10.6.
709 // See http://crbug.com/49799
710 TEST_F(TopSitesTest, DISABLED_DeleteNotifications) {
709 ChromeThread db_loop(ChromeThread::DB, MessageLoop::current()); 711 ChromeThread db_loop(ChromeThread::DB, MessageLoop::current());
710 GURL google1_url("http://google.com"); 712 GURL google1_url("http://google.com");
711 GURL google2_url("http://google.com/redirect"); 713 GURL google2_url("http://google.com/redirect");
712 GURL google3_url("http://www.google.com"); 714 GURL google3_url("http://www.google.com");
713 string16 google_title(ASCIIToUTF16("Google")); 715 string16 google_title(ASCIIToUTF16("Google"));
714 GURL news_url("http://news.google.com"); 716 GURL news_url("http://news.google.com");
715 string16 news_title(ASCIIToUTF16("Google News")); 717 string16 news_title(ASCIIToUTF16("Google News"));
716 718
717 MockHistoryServiceImpl hs; 719 MockHistoryServiceImpl hs;
718 720
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 941
940 RefCountedBytes* out = NULL; 942 RefCountedBytes* out = NULL;
941 ASSERT_TRUE(top_sites().GetPageThumbnail(unknown_url, &out)); 943 ASSERT_TRUE(top_sites().GetPageThumbnail(unknown_url, &out));
942 scoped_ptr<SkBitmap> out_bitmap(gfx::JPEGCodec::Decode(out->front(), 944 scoped_ptr<SkBitmap> out_bitmap(gfx::JPEGCodec::Decode(out->front(),
943 out->size())); 945 out->size()));
944 EXPECT_EQ(0, memcmp(thumbnail.getPixels(), out_bitmap->getPixels(), 946 EXPECT_EQ(0, memcmp(thumbnail.getPixels(), out_bitmap->getPixels(),
945 thumbnail.getSize())); 947 thumbnail.getSize()));
946 } 948 }
947 949
948 } // namespace history 950 } // namespace history
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