Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Unified Diff: third_party/WebKit/Source/core/dom/custom/CustomElementTest.cpp

Issue 1914383002: Implement CustomElement::isValidName() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@PCENChar
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/custom/CustomElementTest.cpp
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElementTest.cpp b/third_party/WebKit/Source/core/dom/custom/CustomElementTest.cpp
index 1b76776a72c13fa2ebf47616c490a1b00f0be972..6f1e428bcfed4bc731fafa62fcce131ffbb60805 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementTest.cpp
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElementTest.cpp
@@ -110,4 +110,18 @@ TEST(CustomElementTest, TestIsPotentialCustomElementNameCharFalse)
}
}
+TEST(CustomElementTest, TestHyphenContainingElementNames)
+{
+ EXPECT_TRUE(CustomElement::isValidName("valid-name"));
+
+ EXPECT_FALSE(CustomElement::isValidName("annotation-xml"));
+ EXPECT_FALSE(CustomElement::isValidName("color-profile"));
+ EXPECT_FALSE(CustomElement::isValidName("font-face"));
+ EXPECT_FALSE(CustomElement::isValidName("font-face-src"));
+ EXPECT_FALSE(CustomElement::isValidName("font-face-uri"));
+ EXPECT_FALSE(CustomElement::isValidName("font-face-format"));
+ EXPECT_FALSE(CustomElement::isValidName("font-face-name"));
+ EXPECT_FALSE(CustomElement::isValidName("missing-glyph"));
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698