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

Unified Diff: LayoutTests/fast/css/fontface-single-font-family.html

Issue 1116593003: Move font-family check to CSSPropertyParser (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: move check into CSSPropertyParser and add test Created 5 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
« no previous file with comments | « no previous file | LayoutTests/fast/css/fontface-single-font-family-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/fontface-single-font-family.html
diff --git a/LayoutTests/fast/css/fontface-single-font-family.html b/LayoutTests/fast/css/fontface-single-font-family.html
new file mode 100644
index 0000000000000000000000000000000000000000..63136dfa84eced5272b5da511d01b74465cebc1c
--- /dev/null
+++ b/LayoutTests/fast/css/fontface-single-font-family.html
@@ -0,0 +1,36 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<style>
+@font-face {
+ font-family: 'Ahem', serif;
+ src: url(../../resources/Ahem.ttf);
+}
+@font-face {
+ font-family: 'Ahem2';
+ src: url('../../resources/WebKitWeightWatcher100.ttf');
+}
+@font-face {
+ font-family: 'Ahem3', Arial;
+}
+</style>
+<script>
+description('Test that @font-face has a single font-family-name.');
+
+function runTests() {
+ shouldBe('document.styleSheets[1].cssRules.length', '3');
+ shouldBeEqualToString('document.styleSheets[1].cssRules[0].style.fontFamily', "");
+ shouldBeEqualToString('document.styleSheets[1].cssRules[1].style.fontFamily', "Ahem2");
+ shouldBeEqualToString('document.styleSheets[1].cssRules[2].style.fontFamily', "");
+}
+
+if (document.fonts)
+ runTests();
+else {
+ testFailed('document.fonts does not exist');
+}
+</script>
+</head>
+<body>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/css/fontface-single-font-family-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698