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

Side by Side Diff: LayoutTests/fast/text/descent-clip-in-scaled-page.html

Issue 18546003: Fix tests to avoid page scale reset when setting page scale. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use setPageScaleFactorLimits(). Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <style> 4 <style>
5 /* Use a fake font family for all of the text that we draw. 5 /* Use a fake font family for all of the text that we draw.
6 The setTextSubpixelPositioning() call changes a global text style 6 The setTextSubpixelPositioning() call changes a global text style
7 setting. It gets reset after we're dumped, but if we run first, our 7 setting. It gets reset after we're dumped, but if we run first, our
8 style would be cached and would affect other tests, and if we run after 8 style would be cached and would affect other tests, and if we run after
9 another test, we'd use its cached style and subpixel positioning won't be 9 another test, we'd use its cached style and subpixel positioning won't be
10 enabled. */ 10 enabled. */
11 body { 11 body {
12 font-family: SubpixelPositioning; 12 font-family: SubpixelPositioning;
13 } 13 }
14 div { 14 div {
15 font-family: SubpixelPositioningAhem; 15 font-family: SubpixelPositioningAhem;
16 overflow: hidden; /* the only difference between the test the the ref ht ml */ 16 overflow: hidden; /* the only difference between the test the the ref ht ml */
17 border: solid thin blue; 17 border: solid thin blue;
18 } 18 }
19 </style> 19 </style>
20 <script> 20 <script>
21 if (window.testRunner && window.testRunner.setTextSubpixelPositioning) 21 if (window.testRunner && window.testRunner.setTextSubpixelPositioning)
22 window.testRunner.setTextSubpixelPositioning(true); 22 window.testRunner.setTextSubpixelPositioning(true);
23 if (window.internals) 23 if (window.eventSender)
24 window.internals.setPageScaleFactor(1.7, 0, 0); 24 window.eventSender.setPageScaleFactor(1.7, 0, 0);
25 </script> 25 </script>
26 </head> 26 </head>
27 <body> 27 <body>
28 Tests if the bottom of the text is truncated when the page is scaled by a fr actional factor. 28 Tests if the bottom of the text is truncated when the page is scaled by a fr actional factor.
29 If success, the text in the "overflow: hidden" div (the test case) should be displayed 29 If success, the text in the "overflow: hidden" div (the test case) should be displayed
30 the same as in a normal div (the ref html). 30 the same as in a normal div (the ref html).
31 'p' is the character in ahem font with only the descent part. 31 'p' is the character in ahem font with only the descent part.
32 <br><br> 32 <br><br>
33 <div style="font-size: 13px">&nbsp;pppp&nbsp;</div> 33 <div style="font-size: 13px">&nbsp;pppp&nbsp;</div>
34 <div style="font-size: 14px">&nbsp;pppp&nbsp;</div> 34 <div style="font-size: 14px">&nbsp;pppp&nbsp;</div>
35 <div style="font-size: 15px">&nbsp;pppp&nbsp;</div> 35 <div style="font-size: 15px">&nbsp;pppp&nbsp;</div>
36 <div style="font-size: 16px">&nbsp;pppp&nbsp;</div> 36 <div style="font-size: 16px">&nbsp;pppp&nbsp;</div>
37 <div style="font-size: 17px">&nbsp;pppp&nbsp;</div> 37 <div style="font-size: 17px">&nbsp;pppp&nbsp;</div>
38 <div style="font-size: 18px">&nbsp;pppp&nbsp;</div> 38 <div style="font-size: 18px">&nbsp;pppp&nbsp;</div>
39 </body> 39 </body>
40 </html> 40 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/repaint/scale-page-shrink.html ('k') | LayoutTests/fast/text/descent-clip-in-scaled-page-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698