Commit effa4308 authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

[NGFragmentItem] Ignore NGPhysicalTextFratmentTest

This patch changes |NGPhysicalTextFratmentTest| to do nothing when
NGFragmentItem runtime feature is enabled because NGFragmentItem doesn't use
|NGPhysicalTextFratment|.

Bug: 982194
Change-Id: I27aa35196376d453f2672f10ccb181f8158aaa5d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2106982
Auto-Submit: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#751249}
parent db0d6bd9
...@@ -43,6 +43,8 @@ class NGPhysicalTextFragmentTest : public NGLayoutTest { ...@@ -43,6 +43,8 @@ class NGPhysicalTextFragmentTest : public NGLayoutTest {
}; };
TEST_F(NGPhysicalTextFragmentTest, LocalRect) { TEST_F(NGPhysicalTextFragmentTest, LocalRect) {
if (RuntimeEnabledFeatures::LayoutNGFragmentItemEnabled())
return;
LoadAhem(); LoadAhem();
SetBodyInnerHTML(R"HTML( SetBodyInnerHTML(R"HTML(
<style> <style>
...@@ -59,6 +61,8 @@ TEST_F(NGPhysicalTextFragmentTest, LocalRect) { ...@@ -59,6 +61,8 @@ TEST_F(NGPhysicalTextFragmentTest, LocalRect) {
} }
TEST_F(NGPhysicalTextFragmentTest, LocalRectRTL) { TEST_F(NGPhysicalTextFragmentTest, LocalRectRTL) {
if (RuntimeEnabledFeatures::LayoutNGFragmentItemEnabled())
return;
LoadAhem(); LoadAhem();
SetBodyInnerHTML(R"HTML( SetBodyInnerHTML(R"HTML(
<style> <style>
...@@ -81,6 +85,8 @@ TEST_F(NGPhysicalTextFragmentTest, LocalRectRTL) { ...@@ -81,6 +85,8 @@ TEST_F(NGPhysicalTextFragmentTest, LocalRectRTL) {
} }
TEST_F(NGPhysicalTextFragmentTest, LocalRectVLR) { TEST_F(NGPhysicalTextFragmentTest, LocalRectVLR) {
if (RuntimeEnabledFeatures::LayoutNGFragmentItemEnabled())
return;
LoadAhem(); LoadAhem();
SetBodyInnerHTML(R"HTML( SetBodyInnerHTML(R"HTML(
<style> <style>
...@@ -98,6 +104,8 @@ TEST_F(NGPhysicalTextFragmentTest, LocalRectVLR) { ...@@ -98,6 +104,8 @@ TEST_F(NGPhysicalTextFragmentTest, LocalRectVLR) {
} }
TEST_F(NGPhysicalTextFragmentTest, LocalRectVRL) { TEST_F(NGPhysicalTextFragmentTest, LocalRectVRL) {
if (RuntimeEnabledFeatures::LayoutNGFragmentItemEnabled())
return;
LoadAhem(); LoadAhem();
SetBodyInnerHTML(R"HTML( SetBodyInnerHTML(R"HTML(
<style> <style>
...@@ -115,6 +123,8 @@ TEST_F(NGPhysicalTextFragmentTest, LocalRectVRL) { ...@@ -115,6 +123,8 @@ TEST_F(NGPhysicalTextFragmentTest, LocalRectVRL) {
} }
TEST_F(NGPhysicalTextFragmentTest, NormalTextIsNotAnonymousText) { TEST_F(NGPhysicalTextFragmentTest, NormalTextIsNotAnonymousText) {
if (RuntimeEnabledFeatures::LayoutNGFragmentItemEnabled())
return;
SetBodyInnerHTML("<div id=div>text</div>"); SetBodyInnerHTML("<div id=div>text</div>");
auto text_fragments = CollectTextFragmentsInContainer("div"); auto text_fragments = CollectTextFragmentsInContainer("div");
...@@ -125,6 +135,8 @@ TEST_F(NGPhysicalTextFragmentTest, NormalTextIsNotAnonymousText) { ...@@ -125,6 +135,8 @@ TEST_F(NGPhysicalTextFragmentTest, NormalTextIsNotAnonymousText) {
} }
TEST_F(NGPhysicalTextFragmentTest, FirstLetterIsNotAnonymousText) { TEST_F(NGPhysicalTextFragmentTest, FirstLetterIsNotAnonymousText) {
if (RuntimeEnabledFeatures::LayoutNGFragmentItemEnabled())
return;
SetBodyInnerHTML( SetBodyInnerHTML(
"<style>::first-letter {color:red}</style>" "<style>::first-letter {color:red}</style>"
"<div id=div>text</div>"); "<div id=div>text</div>");
...@@ -139,6 +151,8 @@ TEST_F(NGPhysicalTextFragmentTest, FirstLetterIsNotAnonymousText) { ...@@ -139,6 +151,8 @@ TEST_F(NGPhysicalTextFragmentTest, FirstLetterIsNotAnonymousText) {
} }
TEST_F(NGPhysicalTextFragmentTest, BeforeAndAfterAreAnonymousText) { TEST_F(NGPhysicalTextFragmentTest, BeforeAndAfterAreAnonymousText) {
if (RuntimeEnabledFeatures::LayoutNGFragmentItemEnabled())
return;
SetBodyInnerHTML( SetBodyInnerHTML(
"<style>::before{content:'x'} ::after{content:'x'}</style>" "<style>::before{content:'x'} ::after{content:'x'}</style>"
"<div id=div>text</div>"); "<div id=div>text</div>");
...@@ -155,6 +169,8 @@ TEST_F(NGPhysicalTextFragmentTest, BeforeAndAfterAreAnonymousText) { ...@@ -155,6 +169,8 @@ TEST_F(NGPhysicalTextFragmentTest, BeforeAndAfterAreAnonymousText) {
} }
TEST_F(NGPhysicalTextFragmentTest, Ellipsis) { TEST_F(NGPhysicalTextFragmentTest, Ellipsis) {
if (RuntimeEnabledFeatures::LayoutNGFragmentItemEnabled())
return;
LoadAhem(); LoadAhem();
SetBodyInnerHTML(R"HTML( SetBodyInnerHTML(R"HTML(
<style> <style>
...@@ -191,6 +207,8 @@ TEST_F(NGPhysicalTextFragmentTest, Ellipsis) { ...@@ -191,6 +207,8 @@ TEST_F(NGPhysicalTextFragmentTest, Ellipsis) {
} }
TEST_F(NGPhysicalTextFragmentTest, ListMarkerIsGeneratedText) { TEST_F(NGPhysicalTextFragmentTest, ListMarkerIsGeneratedText) {
if (RuntimeEnabledFeatures::LayoutNGFragmentItemEnabled())
return;
SetBodyInnerHTML( SetBodyInnerHTML(
"<ol style='list-style-position:inside'>" "<ol style='list-style-position:inside'>"
"<li id=list>text</li>" "<li id=list>text</li>"
...@@ -206,6 +224,8 @@ TEST_F(NGPhysicalTextFragmentTest, ListMarkerIsGeneratedText) { ...@@ -206,6 +224,8 @@ TEST_F(NGPhysicalTextFragmentTest, ListMarkerIsGeneratedText) {
} }
TEST_F(NGPhysicalTextFragmentTest, SoftHyphen) { TEST_F(NGPhysicalTextFragmentTest, SoftHyphen) {
if (RuntimeEnabledFeatures::LayoutNGFragmentItemEnabled())
return;
LoadAhem(); LoadAhem();
SetBodyInnerHTML(R"HTML( SetBodyInnerHTML(R"HTML(
<style> <style>
...@@ -234,6 +254,8 @@ TEST_F(NGPhysicalTextFragmentTest, SoftHyphen) { ...@@ -234,6 +254,8 @@ TEST_F(NGPhysicalTextFragmentTest, SoftHyphen) {
} }
TEST_F(NGPhysicalTextFragmentTest, QuotationMarksAreAnonymousText) { TEST_F(NGPhysicalTextFragmentTest, QuotationMarksAreAnonymousText) {
if (RuntimeEnabledFeatures::LayoutNGFragmentItemEnabled())
return;
SetBodyInnerHTML("<div id=div><q>text</q></div>"); SetBodyInnerHTML("<div id=div><q>text</q></div>");
auto text_fragments = CollectTextFragmentsInContainer("div"); auto text_fragments = CollectTextFragmentsInContainer("div");
...@@ -248,6 +270,8 @@ TEST_F(NGPhysicalTextFragmentTest, QuotationMarksAreAnonymousText) { ...@@ -248,6 +270,8 @@ TEST_F(NGPhysicalTextFragmentTest, QuotationMarksAreAnonymousText) {
} }
TEST_F(NGPhysicalTextFragmentTest, TextOffsetForPointForTabulation) { TEST_F(NGPhysicalTextFragmentTest, TextOffsetForPointForTabulation) {
if (RuntimeEnabledFeatures::LayoutNGFragmentItemEnabled())
return;
LoadAhem(); LoadAhem();
SetBodyInnerHTML(R"HTML( SetBodyInnerHTML(R"HTML(
<style> <style>
...@@ -270,6 +294,8 @@ TEST_F(NGPhysicalTextFragmentTest, TextOffsetForPointForTabulation) { ...@@ -270,6 +294,8 @@ TEST_F(NGPhysicalTextFragmentTest, TextOffsetForPointForTabulation) {
} }
TEST_F(NGPhysicalTextFragmentTest, TextOffsetForPointForTabulationRtl) { TEST_F(NGPhysicalTextFragmentTest, TextOffsetForPointForTabulationRtl) {
if (RuntimeEnabledFeatures::LayoutNGFragmentItemEnabled())
return;
LoadAhem(); LoadAhem();
SetBodyInnerHTML(R"HTML( SetBodyInnerHTML(R"HTML(
<style> <style>
......
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