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

Side by Side Diff: LayoutTests/fast/css/line-height-number-zoom-get-computed-style.html

Issue 1017173002: Do not correct for zoom for number line-height (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add test Created 5 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 | LayoutTests/fast/css/line-height-number-zoom-get-computed-style-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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <script>» 3 <script>
4 if (window.testRunner) { 4 if (window.testRunner) {
5 testRunner.dumpAsText(); 5 testRunner.dumpAsText();
6 testRunner.setCanOpenWindows(); 6 testRunner.setCanOpenWindows();
7 testRunner.waitUntilDone(); 7 testRunner.waitUntilDone();
8 } 8 }
9 9
10 function log(message) 10 function log(message)
11 { 11 {
12 var console = document.getElementById("console"); 12 var console = document.getElementById("console");
13 console.appendChild(document.createTextNode(message + "\n")); 13 console.appendChild(document.createTextNode(message + "\n"));
(...skipping 11 matching lines...) Expand all
25 ++count; 25 ++count;
26 if (count == 10) 26 if (count == 10)
27 testRunner.notifyDone(); 27 testRunner.notifyDone();
28 } 28 }
29 } else { 29 } else {
30 var num = parseFloat(document.defaultView.getComputedStyle(el, null).get PropertyValue('line-height')); 30 var num = parseFloat(document.defaultView.getComputedStyle(el, null).get PropertyValue('line-height'));
31 log("Line height is" + " : " + num.toFixed(2)); 31 log("Line height is" + " : " + num.toFixed(2));
32 } 32 }
33 } 33 }
34 34
35 </script>» 35 </script>
36 <head> 36 <head>
37 <style type="text/css"> 37 <style type="text/css">
38 p { 38 p {
39 display: inline-block; 39 display: inline-block;
40 background-color: #000; 40 background-color: #000;
41 color: #fff; 41 color: #fff;
42 line-height: 120%; 42 line-height: 1.2;
43 } 43 }
44 p:hover { 44 p:hover {
45 background-color: #fff; 45 background-color: #fff;
46 color: #000; 46 color: #000;
47 } 47 }
48 </style> 48 </style>
49 </head> 49 </head>
50 <body onload="zoomPage()"> 50 <body onload="zoomPage()">
51 <p id="test">This tests that page zoom and getComputedStyle of line-height works well together. This test requires testRunner to run. To test manually, open t his page in a browser window, and zoom in & reload for about 10 times. This text should get bigger at each step proportionately and the line-height should be co nstant.</p> 51 <p id="test">This tests that page zoom and getComputedStyle of line-height works well together. This test requires testRunner to run. To test manually, open t his page in a browser window, and zoom in & reload for about 10 times. This text should get bigger at each step proportionately and the line-height should be co nstant.</p>
52 <pre id="console"></pre> 52 <pre id="console"></pre>
53 </body> 53 </body>
54 </html> 54 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/css/line-height-number-zoom-get-computed-style-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698