Commit 9152c98d authored by Daniel Bratell's avatar Daniel Bratell Committed by Commit Bot

Renaming unit_test functions Ident and Dimension to not collide.

CSSTokenizerTest already uses functions named Ident and Dimension so to
avoid special casing in jumbo builds where the tests are compiled
together, rename them here.

R=fs@opera.com

Change-Id: I6b600c269463d897b6d56287e450e37d027b2911
Reviewed-on: https://chromium-review.googlesource.com/574173Reviewed-by: default avatarFredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#487058}
parent 9f083254
......@@ -8,10 +8,10 @@
namespace blink {
static CSSParserToken Ident(const String& string) {
static CSSParserToken IdentToken(const String& string) {
return CSSParserToken(kIdentToken, string);
}
static CSSParserToken Dimension(double value, const String& unit) {
static CSSParserToken DimensionToken(double value, const String& unit) {
CSSParserToken token(kNumberToken, value, kNumberValueType, kNoSign);
token.ConvertToDimensionWithUnit(unit);
return token;
......@@ -23,11 +23,11 @@ TEST(CSSParserTokenTest, IdentTokenEquality) {
String foo16_bit = String::Make16BitFrom8BitSource(foo8_bit.Characters8(),
foo8_bit.length());
EXPECT_EQ(Ident(foo8_bit), Ident(foo16_bit));
EXPECT_EQ(Ident(foo16_bit), Ident(foo8_bit));
EXPECT_EQ(Ident(foo16_bit), Ident(foo16_bit));
EXPECT_NE(Ident(bar8_bit), Ident(foo8_bit));
EXPECT_NE(Ident(bar8_bit), Ident(foo16_bit));
EXPECT_EQ(IdentToken(foo8_bit), IdentToken(foo16_bit));
EXPECT_EQ(IdentToken(foo16_bit), IdentToken(foo8_bit));
EXPECT_EQ(IdentToken(foo16_bit), IdentToken(foo16_bit));
EXPECT_NE(IdentToken(bar8_bit), IdentToken(foo8_bit));
EXPECT_NE(IdentToken(bar8_bit), IdentToken(foo16_bit));
}
TEST(CSSParserTokenTest, DimensionTokenEquality) {
......@@ -36,10 +36,10 @@ TEST(CSSParserTokenTest, DimensionTokenEquality) {
String em16_bit =
String::Make16BitFrom8BitSource(em8_bit.Characters8(), em8_bit.length());
EXPECT_EQ(Dimension(1, em8_bit), Dimension(1, em16_bit));
EXPECT_EQ(Dimension(1, em8_bit), Dimension(1, em8_bit));
EXPECT_NE(Dimension(1, em8_bit), Dimension(1, rem8_bit));
EXPECT_NE(Dimension(2, em8_bit), Dimension(1, em16_bit));
EXPECT_EQ(DimensionToken(1, em8_bit), DimensionToken(1, em16_bit));
EXPECT_EQ(DimensionToken(1, em8_bit), DimensionToken(1, em8_bit));
EXPECT_NE(DimensionToken(1, em8_bit), DimensionToken(1, rem8_bit));
EXPECT_NE(DimensionToken(2, em8_bit), DimensionToken(1, em16_bit));
}
} // namespace blink
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