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

Unified Diff: LayoutTests/css3/font-weight.html

Issue 15994009: Match spec for font-weight: bolder|lighter (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: presubmit has svn error, maybe re-upload will fix? Created 7 years, 6 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/css3/font-weight-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/css3/font-weight.html
diff --git a/LayoutTests/css3/font-weight.html b/LayoutTests/css3/font-weight.html
new file mode 100644
index 0000000000000000000000000000000000000000..cf201988399dce9a1e9677c26f305373bccc5c0e
--- /dev/null
+++ b/LayoutTests/css3/font-weight.html
@@ -0,0 +1,44 @@
+<html>
+<head>
+<style>
+#bolder { font-weight: bolder; }
+#lighter { font-weight: lighter; }
+</style>
+<script src="../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<div id="outer">
+ <div id="bolder"></div>
+ <div id="lighter"></div>
+</div>
+<div id="console"></div>
+<script>
+description('Test that font-weight: bolder and font-weight: lighter behave according to spec.');
+
+table = [
+["100" , "100" , "normal", "100"],
+["200" , "200" , "normal", "100"],
+["300" , "300" , "normal", "100"],
+["400" , "normal", "bold" , "100"],
+["normal", "normal", "bold" , "100"],
+["500" , "500" , "bold" , "100"],
+["600" , "600" , "900" , "normal"],
+["700" , "bold" , "900" , "normal"],
+["bold" , "bold" , "900" , "normal"],
+["800" , "800" , "900" , "bold"],
+["900" , "900" , "900" , "bold"],
+];
+
+var outer = document.getElementById("outer");
+var bolder = document.getElementById("bolder");
+var lighter = document.getElementById("lighter");
+for(var i=0; i<table.length; i++) {
+ outer.style.fontWeight = table[i][0];
+ shouldBeEqualToString('getComputedStyle(outer).fontWeight', table[i][1]);
+ shouldBeEqualToString('getComputedStyle(bolder).fontWeight', table[i][2]);
+ shouldBeEqualToString('getComputedStyle(lighter).fontWeight', table[i][3]);
+}
+</script>
+<script src="../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/css3/font-weight-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698