| Index: third_party/WebKit/Source/core/layout/LayoutTextTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutTextTest.cpp b/third_party/WebKit/Source/core/layout/LayoutTextTest.cpp
|
| index d379930d092d61317d800089bf9aef8edc0c99d4..affb1c0ce53a62928822cbc104649e3858c96ad6 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutTextTest.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutTextTest.cpp
|
| @@ -30,19 +30,20 @@ const char* kTacoText = "Los Compadres Taco Truck";
|
|
|
| TEST_F(LayoutTextTest, WidthZeroFromZeroLength) {
|
| setBasicBody(kTacoText);
|
| - ASSERT_EQ(0, getBasicText()->width(0u, 0u, LayoutUnit(), LTR, false));
|
| + ASSERT_EQ(0, getBasicText()->width(0u, 0u, LayoutUnit(), TextDirection::Ltr,
|
| + false));
|
| }
|
|
|
| TEST_F(LayoutTextTest, WidthMaxFromZeroLength) {
|
| setBasicBody(kTacoText);
|
| ASSERT_EQ(0, getBasicText()->width(std::numeric_limits<unsigned>::max(), 0u,
|
| - LayoutUnit(), LTR, false));
|
| + LayoutUnit(), TextDirection::Ltr, false));
|
| }
|
|
|
| TEST_F(LayoutTextTest, WidthZeroFromMaxLength) {
|
| setBasicBody(kTacoText);
|
| float width = getBasicText()->width(0u, std::numeric_limits<unsigned>::max(),
|
| - LayoutUnit(), LTR, false);
|
| + LayoutUnit(), TextDirection::Ltr, false);
|
| // Width may vary by platform and we just want to make sure it's something
|
| // roughly reasonable.
|
| ASSERT_GE(width, 100.f);
|
| @@ -53,7 +54,7 @@ TEST_F(LayoutTextTest, WidthMaxFromMaxLength) {
|
| setBasicBody(kTacoText);
|
| ASSERT_EQ(0, getBasicText()->width(std::numeric_limits<unsigned>::max(),
|
| std::numeric_limits<unsigned>::max(),
|
| - LayoutUnit(), LTR, false));
|
| + LayoutUnit(), TextDirection::Ltr, false));
|
| }
|
|
|
| TEST_F(LayoutTextTest, WidthWithHugeLengthAvoidsOverflow) {
|
| @@ -71,22 +72,24 @@ TEST_F(LayoutTextTest, WidthWithHugeLengthAvoidsOverflow) {
|
| "</div>");
|
| // Width may vary by platform and we just want to make sure it's something
|
| // roughly reasonable.
|
| - float width =
|
| - getBasicText()->width(23u, 4294967282u, LayoutUnit(2.59375), RTL, false);
|
| + const float width = getBasicText()->width(
|
| + 23u, 4294967282u, LayoutUnit(2.59375), TextDirection::Rtl, false);
|
| ASSERT_GE(width, 100.f);
|
| ASSERT_LE(width, 300.f);
|
| }
|
|
|
| TEST_F(LayoutTextTest, WidthFromBeyondLength) {
|
| setBasicBody("x");
|
| - ASSERT_EQ(0u, getBasicText()->width(1u, 1u, LayoutUnit(), LTR, false));
|
| + ASSERT_EQ(0u, getBasicText()->width(1u, 1u, LayoutUnit(), TextDirection::Ltr,
|
| + false));
|
| }
|
|
|
| TEST_F(LayoutTextTest, WidthLengthBeyondLength) {
|
| setBasicBody("x");
|
| // Width may vary by platform and we just want to make sure it's something
|
| // roughly reasonable.
|
| - float width = getBasicText()->width(0u, 2u, LayoutUnit(), LTR, false);
|
| + const float width =
|
| + getBasicText()->width(0u, 2u, LayoutUnit(), TextDirection::Ltr, false);
|
| ASSERT_GE(width, 4.f);
|
| ASSERT_LE(width, 20.f);
|
| }
|
|
|