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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/fontfaceset-invalid-family-names.html

Issue 1363233002: Restrict font-family in @font-face to <family-name> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/fontfaceset-invalid-family-names-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/css/fontfaceset-invalid-family-names.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/fontfaceset-invalid-family-names.html b/third_party/WebKit/LayoutTests/fast/css/fontfaceset-invalid-family-names.html
new file mode 100644
index 0000000000000000000000000000000000000000..f30e83154e13efe1aaeaf2f7fe91c2058bd2d99a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/fontfaceset-invalid-family-names.html
@@ -0,0 +1,66 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<style>
+@font-face {
+ font-family: sans-serif;
+ src: local(Arial);
+}
+
+@font-face {
+ font-family: serif;
+ src: local(Arial);
+}
+
+@font-face {
+ font-family: fantasy;
+ src: local(Arial);
+}
+
+@font-face {
+ font-family: cursive;
+ src: local(Arial);
+}
+
+@font-face {
+ font-family: monospace;
+ src: local(Arial);
+}
+
+@font-face {
+ font-family: inherit;
+ src: local(Arial);
+}
+
+@font-face {
+ font-family: initial;
+ src: local(Arial);
+}
+
+@font-face {
+ font-family: unset;
+ src: local(Arial);
+}
+
+@font-face {
+ font-family: default;
+ src: local(Arial);
+}
+</style>
+<script>
+description('Tests that font-face with invalid family names are not added to FontFaceSet.');
+
+function runTests() {
+ shouldBe('document.fonts.size', '0');
+}
+
+if (document.fonts)
+ runTests();
+else
+ testFailed('document.fonts does not exist');
+
+</script>
+</head>
+<body>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/fontfaceset-invalid-family-names-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698