OLD | NEW |
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/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "chrome/browser/renderer_host/backing_store_manager.h" | 6 #include "chrome/browser/renderer_host/backing_store_manager.h" |
7 #include "chrome/browser/renderer_host/mock_render_process_host.h" | 7 #include "chrome/browser/renderer_host/mock_render_process_host.h" |
8 #include "chrome/browser/renderer_host/test_render_view_host.h" | 8 #include "chrome/browser/renderer_host/test/test_render_view_host.h" |
9 #include "chrome/browser/tab_contents/thumbnail_generator.h" | 9 #include "chrome/browser/tab_contents/thumbnail_generator.h" |
10 #include "chrome/common/notification_service.h" | 10 #include "chrome/common/notification_service.h" |
11 #include "chrome/common/render_messages.h" | 11 #include "chrome/common/render_messages.h" |
12 #include "chrome/common/transport_dib.h" | 12 #include "chrome/common/transport_dib.h" |
13 #include "chrome/test/testing_profile.h" | 13 #include "chrome/test/testing_profile.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "skia/ext/platform_canvas.h" | 15 #include "skia/ext/platform_canvas.h" |
16 #include "third_party/skia/include/core/SkColorPriv.h" | 16 #include "third_party/skia/include/core/SkColorPriv.h" |
17 | 17 |
18 static const int kBitmapWidth = 100; | 18 static const int kBitmapWidth = 100; |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 // Running the message loop will process the timer, which should expire the | 171 // Running the message loop will process the timer, which should expire the |
172 // cached thumbnail. Asking again should give us a new one computed from the | 172 // cached thumbnail. Asking again should give us a new one computed from the |
173 // backing store. | 173 // backing store. |
174 message_loop_.RunAllPending(); | 174 message_loop_.RunAllPending(); |
175 result = generator_.GetThumbnailForRenderer(&widget_); | 175 result = generator_.GetThumbnailForRenderer(&widget_); |
176 ASSERT_FALSE(result.isNull()); | 176 ASSERT_FALSE(result.isNull()); |
177 EXPECT_EQ(TRANSPORT_WHITE, ClassifyFirstPixel(result)); | 177 EXPECT_EQ(TRANSPORT_WHITE, ClassifyFirstPixel(result)); |
178 } | 178 } |
179 | 179 |
180 #endif | 180 #endif |
OLD | NEW |