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

Side by Side Diff: chrome/browser/thumbnails/render_widget_snapshot_taker_unittest.cc

Issue 24175004: Remove dependency on ui::ScaleFactor from ui/gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix new usage of scale in FastShowPickler Created 7 years, 3 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "chrome/browser/thumbnails/render_widget_snapshot_taker.h" 5 #include "chrome/browser/thumbnails/render_widget_snapshot_taker.h"
6 6
7 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 7 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
8 8
9 class RenderWidgetSnapshotTakerTest : public ChromeRenderViewHostTestHarness { 9 class RenderWidgetSnapshotTakerTest : public ChromeRenderViewHostTestHarness {
10 public: 10 public:
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 RenderWidgetSnapshotTaker snapshot_taker; 68 RenderWidgetSnapshotTaker snapshot_taker;
69 const gfx::Size size(100, 100); 69 const gfx::Size size(100, 100);
70 snapshot_taker.AskForSnapshot( 70 snapshot_taker.AskForSnapshot(
71 rvh(), 71 rvh(),
72 base::Bind(&RenderWidgetSnapshotTakerTest::SnapshotReady, 72 base::Bind(&RenderWidgetSnapshotTakerTest::SnapshotReady,
73 base::Unretained(this)), 73 base::Unretained(this)),
74 size, 74 size,
75 size); 75 size);
76 EXPECT_EQ(1U, snapshot_taker.callback_map_.size()); 76 EXPECT_EQ(1U, snapshot_taker.callback_map_.size());
77 const int sequence_num = 1; 77 const int sequence_num = 1;
78 const gfx::Size size2(200, 200); 78 // Ensure this is bigger than the max scale factor X the size.
79 const gfx::Size size2(300, 300);
79 snapshot_taker.WidgetDidReceivePaintAtSizeAck( 80 snapshot_taker.WidgetDidReceivePaintAtSizeAck(
80 content::RenderViewHostTestHarness::rvh(), 81 content::RenderViewHostTestHarness::rvh(),
81 sequence_num, 82 sequence_num,
82 size2); 83 size2);
83 EXPECT_FALSE(snapshot_taker.callback_map_.empty()); 84 EXPECT_FALSE(snapshot_taker.callback_map_.empty());
84 EXPECT_FALSE(snapshot_ready_called()); 85 EXPECT_FALSE(snapshot_ready_called());
85 } 86 }
OLDNEW
« no previous file with comments | « chrome/browser/thumbnails/render_widget_snapshot_taker.cc ('k') | chrome/browser/thumbnails/simple_thumbnail_crop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698