| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/backing_store_manager.h" | 11 #include "content/browser/renderer_host/backing_store_manager.h" |
| 12 #include "content/browser/renderer_host/backing_store_skia.h" | 12 #include "content/browser/renderer_host/backing_store_skia.h" |
| 13 #include "content/browser/renderer_host/mock_render_process_host.h" | 13 #include "content/browser/renderer_host/mock_render_process_host.h" |
| 14 #include "content/browser/renderer_host/test_render_view_host.h" | 14 #include "content/browser/renderer_host/test_render_view_host.h" |
| 15 #include "content/browser/tab_contents/render_view_host_manager.h" | 15 #include "content/browser/tab_contents/render_view_host_manager.h" |
| 16 #include "content/common/view_messages.h" | |
| 17 #include "content/public/browser/notification_service.h" | 16 #include "content/public/browser/notification_service.h" |
| 18 #include "content/public/browser/notification_types.h" | 17 #include "content/public/browser/notification_types.h" |
| 19 #include "skia/ext/platform_canvas.h" | 18 #include "skia/ext/platform_canvas.h" |
| 20 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| 21 #include "third_party/skia/include/core/SkColorPriv.h" | 20 #include "third_party/skia/include/core/SkColorPriv.h" |
| 22 #include "ui/gfx/canvas_skia.h" | 21 #include "ui/gfx/canvas_skia.h" |
| 23 #include "ui/gfx/surface/transport_dib.h" | 22 #include "ui/gfx/surface/transport_dib.h" |
| 24 | 23 |
| 25 static const int kBitmapWidth = 100; | 24 static const int kBitmapWidth = 100; |
| 26 static const int kBitmapHeight = 100; | 25 static const int kBitmapHeight = 100; |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 good_score.good_clipping = true; | 404 good_score.good_clipping = true; |
| 406 good_score.boring_score = 0.0; | 405 good_score.boring_score = 0.0; |
| 407 good_score.load_completed = true; | 406 good_score.load_completed = true; |
| 408 top_sites->AddKnownURL(kGoodURL, good_score); | 407 top_sites->AddKnownURL(kGoodURL, good_score); |
| 409 | 408 |
| 410 // Should be false, as the existing thumbnail is good enough (i.e. don't | 409 // Should be false, as the existing thumbnail is good enough (i.e. don't |
| 411 // need to replace the existing thumbnail which is new and good). | 410 // need to replace the existing thumbnail which is new and good). |
| 412 EXPECT_FALSE(ThumbnailGenerator::ShouldUpdateThumbnail( | 411 EXPECT_FALSE(ThumbnailGenerator::ShouldUpdateThumbnail( |
| 413 &profile, top_sites.get(), kGoodURL)); | 412 &profile, top_sites.get(), kGoodURL)); |
| 414 } | 413 } |
| OLD | NEW |