| Index: third_party/WebKit/Source/core/css/StyleSheetContentsTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/StyleSheetContentsTest.cpp b/third_party/WebKit/Source/core/css/StyleSheetContentsTest.cpp
|
| index b8028f2bb7a34491649345fea1a8a016c8a10c8f..9792610a78e6dd75bc324ef449190066b1a16124 100644
|
| --- a/third_party/WebKit/Source/core/css/StyleSheetContentsTest.cpp
|
| +++ b/third_party/WebKit/Source/core/css/StyleSheetContentsTest.cpp
|
| @@ -21,11 +21,29 @@ TEST(StyleSheetContentsTest, InsertMediaRule)
|
| styleSheet->setMutable();
|
| styleSheet->wrapperInsertRule(CSSParser::parseRule(context, styleSheet, "@media all { div { color: pink } }"), 0);
|
| EXPECT_EQ(1U, styleSheet->ruleCount());
|
| - EXPECT_FALSE(styleSheet->hasMediaQueries());
|
| + EXPECT_TRUE(styleSheet->hasMediaQueries());
|
|
|
| styleSheet->wrapperInsertRule(CSSParser::parseRule(context, styleSheet, "@media all { div { color: green } }"), 1);
|
| EXPECT_EQ(2U, styleSheet->ruleCount());
|
| EXPECT_TRUE(styleSheet->hasMediaQueries());
|
| }
|
|
|
| +TEST(StyleSheetContentsTest, InsertFontFaceRule)
|
| +{
|
| + CSSParserContext context(HTMLStandardMode, nullptr);
|
| +
|
| + StyleSheetContents* styleSheet = StyleSheetContents::create(context);
|
| + styleSheet->parseString("@namespace ns url(test);");
|
| + EXPECT_EQ(1U, styleSheet->ruleCount());
|
| +
|
| + styleSheet->setMutable();
|
| + styleSheet->wrapperInsertRule(CSSParser::parseRule(context, styleSheet, "@font-face { font-family: a }"), 0);
|
| + EXPECT_EQ(1U, styleSheet->ruleCount());
|
| + EXPECT_TRUE(styleSheet->hasFontFaceRule());
|
| +
|
| + styleSheet->wrapperInsertRule(CSSParser::parseRule(context, styleSheet, "@font-face { font-family: b }"), 1);
|
| + EXPECT_EQ(2U, styleSheet->ruleCount());
|
| + EXPECT_TRUE(styleSheet->hasFontFaceRule());
|
| +}
|
| +
|
| } // namespace blink
|
|
|