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

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/ng_min_max_content_size_test.cc

Issue 2721613003: [LayoutNG] Move remaining ng_units structs to their own files (Closed)
Patch Set: Don't export NGBoxStrut for now Created 3 years, 9 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
(Empty)
1 // Copyright 2016 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 "core/layout/ng/ng_min_max_content_size.h"
6
7 #include "testing/gtest/include/gtest/gtest.h"
8
9 namespace blink {
10
11 namespace {
12
13 TEST(NGUnitsTest, ShrinkToFit) {
14 MinMaxContentSize sizes;
15
16 sizes.min_content = LayoutUnit(100);
17 sizes.max_content = LayoutUnit(200);
18 EXPECT_EQ(LayoutUnit(200), sizes.ShrinkToFit(LayoutUnit(300)));
19
20 sizes.min_content = LayoutUnit(100);
21 sizes.max_content = LayoutUnit(300);
22 EXPECT_EQ(LayoutUnit(200), sizes.ShrinkToFit(LayoutUnit(200)));
23
24 sizes.min_content = LayoutUnit(200);
25 sizes.max_content = LayoutUnit(300);
26 EXPECT_EQ(LayoutUnit(200), sizes.ShrinkToFit(LayoutUnit(100)));
27 }
28
29 } // namespace
30
31 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698