| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/stringprintf.h" | 6 #include "base/stringprintf.h" |
| 7 #include "chrome/browser/history/top_sites.h" | 7 #include "chrome/browser/history/top_sites.h" |
| 8 #include "chrome/browser/tab_contents/thumbnail_generator.h" | 8 #include "chrome/browser/tab_contents/thumbnail_generator.h" |
| 9 #include "chrome/common/render_messages.h" | 9 #include "chrome/common/render_messages.h" |
| 10 #include "chrome/test/base/testing_profile.h" | 10 #include "chrome/test/base/testing_profile.h" |
| 11 #include "content/browser/renderer_host/mock_render_process_host.h" | 11 #include "content/browser/renderer_host/mock_render_process_host.h" |
| 12 #include "content/browser/renderer_host/test_render_view_host.h" | |
| 13 #include "content/public/browser/notification_service.h" | 12 #include "content/public/browser/notification_service.h" |
| 14 #include "content/public/browser/notification_types.h" | 13 #include "content/public/browser/notification_types.h" |
| 14 #include "content/test/test_renderer_host.h" |
| 15 #include "skia/ext/platform_canvas.h" | 15 #include "skia/ext/platform_canvas.h" |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 17 #include "third_party/skia/include/core/SkColorPriv.h" | 17 #include "third_party/skia/include/core/SkColorPriv.h" |
| 18 #include "ui/gfx/canvas_skia.h" | 18 #include "ui/gfx/canvas_skia.h" |
| 19 #include "ui/gfx/surface/transport_dib.h" | 19 #include "ui/gfx/surface/transport_dib.h" |
| 20 | 20 |
| 21 using content::WebContents; | 21 using content::WebContents; |
| 22 | 22 |
| 23 typedef testing::Test ThumbnailGeneratorTest; | 23 typedef testing::Test ThumbnailGeneratorTest; |
| 24 | 24 |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 good_score.good_clipping = true; | 215 good_score.good_clipping = true; |
| 216 good_score.boring_score = 0.0; | 216 good_score.boring_score = 0.0; |
| 217 good_score.load_completed = true; | 217 good_score.load_completed = true; |
| 218 top_sites->AddKnownURL(kGoodURL, good_score); | 218 top_sites->AddKnownURL(kGoodURL, good_score); |
| 219 | 219 |
| 220 // Should be false, as the existing thumbnail is good enough (i.e. don't | 220 // Should be false, as the existing thumbnail is good enough (i.e. don't |
| 221 // need to replace the existing thumbnail which is new and good). | 221 // need to replace the existing thumbnail which is new and good). |
| 222 EXPECT_FALSE(ThumbnailGenerator::ShouldUpdateThumbnail( | 222 EXPECT_FALSE(ThumbnailGenerator::ShouldUpdateThumbnail( |
| 223 &profile, top_sites.get(), kGoodURL)); | 223 &profile, top_sites.get(), kGoodURL)); |
| 224 } | 224 } |
| OLD | NEW |