blob: 18b7e5a79f8522e30cb5daef7c377b9d28cb83d0 [file] [log] [blame]
rbpotter80cbe042017-12-08 07:00:521// 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
3// found in the LICENSE file.
4
5#include "printing/printed_page_win.h"
6#include "testing/gtest/include/gtest/gtest.h"
7
8namespace printing {
9
10TEST(PrintedPageTest, Shrink) {
11 scoped_refptr<PrintedPage> page = base::MakeRefCounted<PrintedPage>(
12 1, std::unique_ptr<MetafilePlayer>(), gfx::Size(1200, 1200),
13 gfx::Rect(0, 0, 400, 1100));
14 EXPECT_EQ(0.0f, page->shrink_factor());
15 page->set_shrink_factor(0.2f);
16 EXPECT_EQ(0.2f, page->shrink_factor());
17 page->set_shrink_factor(0.7f);
18 EXPECT_EQ(0.7f, page->shrink_factor());
19}
20
21} // namespace printing