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

Side by Side Diff: LayoutTests/fast/frames/iframe-double-scale-contents.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 <html> 1 <html>
2 <head> 2 <head>
3 <style> 3 <style>
4 ::-webkit-scrollbar { 4 ::-webkit-scrollbar {
5 width: 0px; 5 width: 0px;
6 height: 0px; 6 height: 0px;
7 } 7 }
8 </style> 8 </style>
9 <script src="../js/resources/js-test-pre.js"></script> 9 <script src="../js/resources/js-test-pre.js"></script>
10 <script> 10 <script>
11 window.enablePixelTesting = true; 11 window.enablePixelTesting = true;
12 12
13 if (window.testRunner) 13 if (window.testRunner)
14 testRunner.waitUntilDone(); 14 testRunner.waitUntilDone();
15 15
16 // Layout for the iframe will be scaled down to a quarter. 16 // Layout for the iframe will be scaled down to a quarter.
17 // It appears this bug will only manifest itself if layout for the 17 // It appears this bug will only manifest itself if layout for the
18 // iframe has not yet been computed. If we've already laid out 18 // iframe has not yet been computed. If we've already laid out
19 // the iframe, then CSSStyleSelector::styleForDocument does not appear 19 // the iframe, then CSSStyleSelector::styleForDocument does not appear
20 // to get called for the iframe. 20 // to get called for the iframe.
21 scalePage(0.5); 21 scalePage(0.5);
22 22
23 function scalePage(scaleFactor) { 23 function scalePage(scaleFactor) {
24 var scaleOffset = 0; 24 var scaleOffset = 0;
25 if (window.internals) { 25 if (window.eventSender) {
26 window.internals.setPageScaleFactor(scaleFactor, scaleOffset, scaleO ffset); 26 window.eventSender.setPageScaleFactor(scaleFactor, scaleOffset, scal eOffset);
27 } 27 }
28 } 28 }
29 29
30 function test() { 30 function test() {
31 // Curiously, the document style for the iframe does not 31 // Curiously, the document style for the iframe does not
32 // appear to be recalculated after this 32 // appear to be recalculated after this
33 scalePage(1.0); 33 scalePage(1.0);
34 document.body.offsetWidth; 34 document.body.offsetWidth;
35 if (window.testRunner) 35 if (window.testRunner)
36 testRunner.notifyDone(); 36 testRunner.notifyDone();
37 } 37 }
38 </script> 38 </script>
39 <script src="../js/resources/js-test-pre.js"></script> 39 <script src="../js/resources/js-test-pre.js"></script>
40 </head> 40 </head>
41 <body onload="test();"> 41 <body onload="test();">
42 <iframe id="frame" src="resources/iframe-content-scaling-bug-iframe.html" styl e="position: absolute; left: 0px; top: 0px; border: none; width: 300px; height: 300px;"></iframe> 42 <iframe id="frame" src="resources/iframe-content-scaling-bug-iframe.html" styl e="position: absolute; left: 0px; top: 0px; border: none; width: 300px; height: 300px;"></iframe>
43 <div id="rightbox" style="position: absolute; left: 300px; top: 0px; width: 30 0px; height: 300px; background-color: green;"></div> 43 <div id="rightbox" style="position: absolute; left: 300px; top: 0px; width: 30 0px; height: 300px; background-color: green;"></div>
44 <script src="../js/resources/js-test-post.js"></script> 44 <script src="../js/resources/js-test-post.js"></script>
45 </body> 45 </body>
46 </html> 46 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/frames/frame-set-scaling-hit.html ('k') | LayoutTests/fast/repaint/background-scaling.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698