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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-empty-font-family.html

Issue 1823073003: Null check font family name in createFontFamilyValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test Created 4 years, 9 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 | third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-empty-font-family-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 <script> 1 <script>
2 function test() 2 function test()
3 { 3 {
4 if (window.testRunner) 4 if (window.testRunner)
5 testRunner.dumpAsText(); 5 testRunner.dumpAsText();
6 var style = document.defaultView.getComputedStyle(document.body, ""); 6 var style = document.defaultView.getComputedStyle(document.body, "");
7 var text = ""; 7 var text = "";
8 for (var i = 0; i != style.length; ++i) { 8 for (var i = 0; i != style.length; ++i) {
9 var name = style.item(i); 9 var name = style.item(i);
10 if (!name.match(/^font/)) 10 if (!name.match(/^font/))
11 continue; 11 continue;
12 var value = style.getPropertyValue(name); 12 var value = style.getPropertyValue(name);
13 text += name + ": " + value + ";\n"; 13 text += name + ": " + value + ";\n";
14 } 14 }
15 document.getElementById("exposed").textContent = text; 15 document.getElementById("exposed").textContent = text;
16 } 16 }
17 </script> 17 </script>
18 <body onload="test()" style="font-family: monospace, 'Lucida Grande', sans-serif "> 18 <body onload="test()" style="font-family: ''">
19 <p>Font attributes. The font-family should list three families:</p> 19 <p>Font attributes. The font-family should list the empty string:</p>
20 <p id="exposed" style="white-space: pre"></p> 20 <p id="exposed" style="white-space: pre"></p>
21 </body> 21 </body>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-empty-font-family-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698