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

Side by Side Diff: LayoutTests/css3/font-weight-multiple-selectors.html

Issue 137813004: Multiple selectors setting relative font-weight names to an element result in a cumulative result (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Improve testcase Created 6 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/css3/font-weight-multiple-selectors-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <style> 3 <style>
4 #bolder { font-weight: bolder; } 4 #outer > div { font-weight: bolder; }
5 #lighter { font-weight: lighter; } 5 #outer > div#bolder { font-weight: bolder; }
6 #outer > div#lighter { font-weight: lighter; }
6 </style> 7 </style>
7 <script src="../resources/js-test.js"></script> 8 <script src="../resources/js-test.js"></script>
8 </head> 9 </head>
9 <body> 10 <body>
10 <div id="outer"> 11 <div id="outer">
11 <div id="bolder"></div> 12 <div id="bolder"></div>
12 <div id="lighter"></div> 13 <div id="lighter"></div>
13 </div> 14 </div>
14 <div id="console"></div> 15 <div id="console"></div>
15 <script> 16 <script>
16 description('Test that font-weight: bolder and font-weight: lighter behave accor ding to spec.'); 17 description('Test that font-weight: bolder and font-weight: lighter are not cumu lative when multiple selectors apply.');
17 18
18 table = [ 19 table = [
19 ["100" , "100" , "normal", "100"], 20 ["100" , "100" , "normal", "100"],
20 ["200" , "200" , "normal", "100"], 21 ["200" , "200" , "normal", "100"],
21 ["300" , "300" , "normal", "100"], 22 ["300" , "300" , "normal", "100"],
22 ["400" , "normal", "bold" , "100"], 23 ["400" , "normal", "bold" , "100"],
23 ["normal", "normal", "bold" , "100"], 24 ["normal", "normal", "bold" , "100"],
24 ["500" , "500" , "bold" , "100"], 25 ["500" , "500" , "bold" , "100"],
25 ["600" , "600" , "900" , "normal"], 26 ["600" , "600" , "900" , "normal"],
26 ["700" , "bold" , "900" , "normal"], 27 ["700" , "bold" , "900" , "normal"],
27 ["bold" , "bold" , "900" , "normal"], 28 ["bold" , "bold" , "900" , "normal"],
28 ["800" , "800" , "900" , "bold"], 29 ["800" , "800" , "900" , "bold"],
29 ["900" , "900" , "900" , "bold"], 30 ["900" , "900" , "900" , "bold"],
30 ]; 31 ];
31 32
32 var outer = document.getElementById("outer"); 33 var outer = document.getElementById("outer");
33 var bolder = document.getElementById("bolder"); 34 var bolder = document.getElementById("bolder");
34 var lighter = document.getElementById("lighter"); 35 var lighter = document.getElementById("lighter");
35 for(var i=0; i<table.length; i++) { 36 for(var i=0; i<table.length; i++) {
36 outer.style.fontWeight = table[i][0]; 37 outer.style.fontWeight = table[i][0];
37 shouldBeEqualToString('getComputedStyle(outer).fontWeight', table[i][1]); 38 shouldBeEqualToString('getComputedStyle(outer).fontWeight', table[i][1]);
38 shouldBeEqualToString('getComputedStyle(bolder).fontWeight', table[i][2]); 39 shouldBeEqualToString('getComputedStyle(bolder).fontWeight', table[i][2]);
39 shouldBeEqualToString('getComputedStyle(lighter).fontWeight', table[i][3]); 40 shouldBeEqualToString('getComputedStyle(lighter).fontWeight', table[i][3]);
40 } 41 }
41 </script> 42 </script>
42 </body> 43 </body>
43 </html> 44 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/css3/font-weight-multiple-selectors-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698