Commit 88ceb91b authored by Gyuyoung Kim's avatar Gyuyoung Kim Committed by Commit Bot

Use EXPECT_EQ directly instead of EXPECT_STREQ in the tests of core/css

As the first step to deprecate WTF::CString, the bug has suggested replacing
EXPECT_STREQ with EXPECT_EQ. This CL replaces EXPECTED_STREQ with EXPECT_EQ
in the cases of converting WTF::String to const char* in order to use
EXPECTE_STREQ.

Bug: 950077
Change-Id: Ida8b633a3439d9072ca133678be17bf02d9fd4cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1607704
Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarJeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659350}
parent cdbc9233
......@@ -28,8 +28,8 @@ TEST_F(CSSComputedStyleDeclarationTest, CleanAncestorsNoRecalc) {
Element* target = GetDocument().getElementById("target");
auto* computed = MakeGarbageCollected<CSSComputedStyleDeclaration>(target);
EXPECT_STREQ("rgb(0, 128, 0)",
computed->GetPropertyValue(CSSPropertyID::kColor).Utf8().data());
EXPECT_EQ("rgb(0, 128, 0)",
computed->GetPropertyValue(CSSPropertyID::kColor));
EXPECT_TRUE(GetDocument().NeedsLayoutTreeUpdate());
}
......@@ -56,8 +56,8 @@ TEST_F(CSSComputedStyleDeclarationTest, CleanShadowAncestorsNoRecalc) {
Element* target = shadow_root.getElementById("target");
auto* computed = MakeGarbageCollected<CSSComputedStyleDeclaration>(target);
EXPECT_STREQ("rgb(0, 128, 0)",
computed->GetPropertyValue(CSSPropertyID::kColor).Utf8().data());
EXPECT_EQ("rgb(0, 128, 0)",
computed->GetPropertyValue(CSSPropertyID::kColor));
EXPECT_TRUE(GetDocument().NeedsLayoutTreeUpdate());
}
......@@ -92,8 +92,8 @@ TEST_F(CSSComputedStyleDeclarationTest, NeedsAdjacentStyleRecalc) {
auto* computed = MakeGarbageCollected<CSSComputedStyleDeclaration>(c_span);
EXPECT_STREQ("rgb(0, 128, 0)",
computed->GetPropertyValue(CSSPropertyID::kColor).Utf8().data());
EXPECT_EQ("rgb(0, 128, 0)",
computed->GetPropertyValue(CSSPropertyID::kColor));
EXPECT_TRUE(GetDocument().NeedsLayoutTreeUpdate());
EXPECT_TRUE(GetDocument().NeedsLayoutTreeUpdateForNode(*d_span));
......
......@@ -132,7 +132,7 @@ TEST(CSSSelectorParserTest, ShadowDomPseudoInCompound) {
CSSParserContext::Create(kHTMLStandardMode,
SecureContextMode::kInsecureContext),
nullptr);
EXPECT_STREQ(test_case[1], list.SelectorsText().Ascii().data());
EXPECT_EQ(test_case[1], list.SelectorsText());
}
}
......@@ -311,7 +311,7 @@ TEST(CSSSelectorParserTest, SerializedUniversal) {
CSSSelectorList list =
CSSSelectorParser::ParseSelector(range, context, sheet);
EXPECT_TRUE(list.IsValid());
EXPECT_STREQ(test_case[1], list.SelectorsText().Ascii().data());
EXPECT_EQ(test_case[1], list.SelectorsText());
}
}
......@@ -560,7 +560,7 @@ TEST(CSSSelectorParserTest, ShadowPartPseudoElementValid) {
CSSParserContext::Create(kHTMLStandardMode,
SecureContextMode::kInsecureContext),
nullptr);
EXPECT_STREQ(test_case, list.SelectorsText().Ascii().data());
EXPECT_EQ(test_case, list.SelectorsText());
}
}
......@@ -580,7 +580,7 @@ TEST(CSSSelectorParserTest, ShadowPartAndBeforeAfterPseudoElementValid) {
CSSParserContext::Create(kHTMLStandardMode,
SecureContextMode::kInsecureContext),
nullptr);
EXPECT_STREQ(test_case, list.SelectorsText().Ascii().data());
EXPECT_EQ(test_case, list.SelectorsText());
}
}
......
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