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

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

Issue 9347042: Introduce content::RenderWidgetHostViewPort (in content/port/browser). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head. Created 8 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host_ui_shim.cc » ('j') | 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) 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"
(...skipping 22 matching lines...) Expand all
33 // transport_dib_win.cc(71)] Check failed: !memory(). Mapped file twice in 33 // transport_dib_win.cc(71)] Check failed: !memory(). Mapped file twice in
34 // the same process. 34 // the same process.
35 // 35 //
36 #if !defined(OS_MACOSX) && !defined(OS_WIN) 36 #if !defined(OS_MACOSX) && !defined(OS_WIN)
37 37
38 // This test render widget host view uses BackingStoreSkia instead of 38 // This test render widget host view uses BackingStoreSkia instead of
39 // TestBackingStore, so that basic operations like CopyFromBackingStore() 39 // TestBackingStore, so that basic operations like CopyFromBackingStore()
40 // works. The skia implementation doesn't have any hardware or system 40 // works. The skia implementation doesn't have any hardware or system
41 // dependencies. 41 // dependencies.
42 class TestRenderWidgetHostViewWithBackingStoreSkia 42 class TestRenderWidgetHostViewWithBackingStoreSkia
43 : public TestRenderWidgetHostView { 43 : public content::TestRenderWidgetHostView {
44 public: 44 public:
45 explicit TestRenderWidgetHostViewWithBackingStoreSkia(RenderWidgetHost* rwh) 45 explicit TestRenderWidgetHostViewWithBackingStoreSkia(RenderWidgetHost* rwh)
46 : TestRenderWidgetHostView(rwh), rwh_(rwh) {} 46 : content::TestRenderWidgetHostView(rwh), rwh_(rwh) {}
47 47
48 BackingStore* AllocBackingStore(const gfx::Size& size) { 48 BackingStore* AllocBackingStore(const gfx::Size& size) {
49 return new BackingStoreSkia(rwh_, size); 49 return new BackingStoreSkia(rwh_, size);
50 } 50 }
51 51
52 private: 52 private:
53 RenderWidgetHost* rwh_; 53 RenderWidgetHost* rwh_;
54 DISALLOW_COPY_AND_ASSIGN(TestRenderWidgetHostViewWithBackingStoreSkia); 54 DISALLOW_COPY_AND_ASSIGN(TestRenderWidgetHostViewWithBackingStoreSkia);
55 }; 55 };
56 56
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 good_score.good_clipping = true; 397 good_score.good_clipping = true;
398 good_score.boring_score = 0.0; 398 good_score.boring_score = 0.0;
399 good_score.load_completed = true; 399 good_score.load_completed = true;
400 top_sites->AddKnownURL(kGoodURL, good_score); 400 top_sites->AddKnownURL(kGoodURL, good_score);
401 401
402 // Should be false, as the existing thumbnail is good enough (i.e. don't 402 // Should be false, as the existing thumbnail is good enough (i.e. don't
403 // need to replace the existing thumbnail which is new and good). 403 // need to replace the existing thumbnail which is new and good).
404 EXPECT_FALSE(ThumbnailGenerator::ShouldUpdateThumbnail( 404 EXPECT_FALSE(ThumbnailGenerator::ShouldUpdateThumbnail(
405 &profile, top_sites.get(), kGoodURL)); 405 &profile, top_sites.get(), kGoodURL));
406 } 406 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host_ui_shim.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698