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

Unified Diff: LayoutTests/css3/fonts/font-style-matching.html

Issue 1270723002: Improve CSS Style matching spec compliance (Closed) Base URL: git@github.com:drott/blink-crosswalk.git@reimplementMatching
Patch Set: Fix TestExpectations Created 5 years, 4 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: LayoutTests/css3/fonts/font-style-matching.html
diff --git a/LayoutTests/css3/fonts/font-style-matching.html b/LayoutTests/css3/fonts/font-style-matching.html
new file mode 100644
index 0000000000000000000000000000000000000000..bd99ae8f2f31ca5daf5f80b708910a2bb55e6a13
--- /dev/null
+++ b/LayoutTests/css3/fonts/font-style-matching.html
@@ -0,0 +1,95 @@
+<!DOCTYPE html>
+<html>
+<meta charset="UTF-8">
+<head>
+ <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
+ <script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script>
+ <script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script>
+ <script type="text/javascript" src="resources/style-matching-test.js"></script>
+ <!-- available fonts --->
+ <style type="text/css">
+ </style>
+ <!-- Applied styles -->
+ <style type="text/css">
+ body {
+ font-size: 24px;
+ line-height: 110%;
+ text-rendering: optimizeLegibility;
+ font-feature-settings: "liga" 1;
+ }
+
+ #condensed_normal_100 {
+ font-family: CSSMatchingTest;
+ font-stretch: condensed;
+ font-style: normal;
+ font-weight: 100;
+ }
+
+ #condensed_normal_900 {
+ font-family: CSSMatchingTest;
+ font-stretch: condensed;
+ font-style: normal;
+ font-weight: 900;
+ }
+
+ #condensed_italic_100 {
+ font-family: CSSMatchingTest;
+ font-stretch: condensed;
+ font-style: italic;
+ font-weight: 100;
+ }
+
+ #condensed_italic_900 {
+ font-family: CSSMatchingTest;
+ font-stretch: condensed;
+ font-style: italic;
+ font-weight: 900;
+ }
+
+ #expanded_normal_100 {
+ font-family: CSSMatchingTest;
+ font-stretch: expanded;
+ font-style: normal;
+ font-weight: 100;
+ }
+
+ #expanded_normal_900 {
+ font-family: CSSMatchingTest;
+ font-stretch: expanded;
+ font-style: normal;
+ font-weight: 900;
+ }
+
+ #expanded_italic_100 {
+ font-family: CSSMatchingTest;
+ font-stretch: expanded;
+ font-style: italic;
+ font-weight: 100;
+ }
+
+ #expanded_italic_900 {
+ font-family: CSSMatchingTest;
+ font-stretch: expanded;
+ font-style: italic;
+ font-weight: 900;
+ }
+ </style>
+</head>
+<body>
+<pre>According to the CSS3 Fonts Module, Step 4 or the Font Style Matching Algorithm
+( https://drafts.csswg.org/css-fonts-3/#font-style-matching ) must narrow down the
+available font faces by finding the nearest match in the following order of
+precedence: stretch, style, weight.
+</pre>
+ <div class="test">
+ <div id="condensed_normal_100">abcdefg</div>
+ <div id="condensed_normal_900">abcdefg</div>
+ <div id="condensed_italic_100">abcdefg</div>
+ <div id="condensed_italic_900">abcdefg</div>
+ <div id="expanded_normal_100">abcdefg</div>
+ <div id="expanded_normal_900">abcdefg</div>
+ <div id="expanded_italic_100">abcdefg</div>
+ <div id="expanded_italic_900">abcdefg</div>
+ </div>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698