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

Side by Side Diff: chrome/browser/tab_contents/thumbnail_generator_unittest.cc

Issue 274040: More style nits. (Closed)
Patch Set: Created 11 years, 2 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
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/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/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;
19 static const int kBitmapHeight = 100; 19 static const int kBitmapHeight = 100;
20 20
21 // TODO(brettw) enable this when GetThumbnailForBackingStore is implemented 21 // TODO(brettw) enable this when GetThumbnailForBackingStore is implemented
22 // for other platforms in thumbnail_generator.cc 22 // for other platforms in thumbnail_generator.cc
23 //#if defined(OS_WIN) 23 // #if defined(OS_WIN)
24 // TODO(brettw) enable this on Windows after we clobber a build to see if the 24 // TODO(brettw) enable this on Windows after we clobber a build to see if the
25 // failures of this on the buildbot can be resolved. 25 // failures of this on the buildbot can be resolved.
26 #if 0 26 #if 0
27 27
28 class ThumbnailGeneratorTest : public testing::Test { 28 class ThumbnailGeneratorTest : public testing::Test {
29 public: 29 public:
30 ThumbnailGeneratorTest() 30 ThumbnailGeneratorTest()
31 : profile_(), 31 : profile_(),
32 process_(new MockRenderProcessHost(&profile_)), 32 process_(new MockRenderProcessHost(&profile_)),
33 widget_(process_, 1), 33 widget_(process_, 1),
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698