Commit 79e8dbcb authored by Kent Tamura's avatar Kent Tamura Committed by Commit Bot

TextControl NG: Fix All/HTMLTextAreaElementTest.ValueWithHardLineBreaks/1 test...

TextControl NG: Fix All/HTMLTextAreaElementTest.ValueWithHardLineBreaks/1 test on linux_layout_tests_layout_ng_disabled bot

HTMLTextAreaElementTest is a parameterized test for LayoutNGTextArea
flag. However, the feature can be disabled even with GetParam() == true
because we can disable LayoutNG flag.

This CL fixes the issue by checking LayoutObject instead of GetParam().

Bug: 1040826
Change-Id: I160037df5b2f52694f96379188724b578fb77d59
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng_disabled
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2505343
Auto-Submit: Kent Tamura <tkent@chromium.org>
Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#822031}
parent 483686a9
...@@ -83,7 +83,8 @@ TEST_P(HTMLTextAreaElementTest, ValueWithHardLineBreaks) { ...@@ -83,7 +83,8 @@ TEST_P(HTMLTextAreaElementTest, ValueWithHardLineBreaks) {
inner_editor->appendChild(doc.CreateRawElement(html_names::kBrTag)); inner_editor->appendChild(doc.CreateRawElement(html_names::kBrTag));
RunDocumentLifecycle(); RunDocumentLifecycle();
// Should be "1234\n5678\n90". The legacy behavior is wrong. // Should be "1234\n5678\n90". The legacy behavior is wrong.
EXPECT_EQ(GetParam() ? "1234\n5678\n90" : "1234567890", EXPECT_EQ(textarea.GetLayoutBox()->IsLayoutNGObject() ? "1234\n5678\n90"
: "1234567890",
textarea.ValueWithHardLineBreaks()); textarea.ValueWithHardLineBreaks());
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment