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

Side by Side Diff: LayoutTests/fast/events/resize-events-fixed-layout.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 div.block { height: 400px; border: 1px solid black; margin:10px; } 5 div.block { height: 400px; border: 1px solid black; margin:10px; }
6 </style> 6 </style>
7 </head> 7 </head>
8 <body> 8 <body>
9 <div> 9 <div>
10 Following actions must not emit resize events: page load, dynamic conten t generation and page scaling.<br/> 10 Following actions must not emit resize events: page load, dynamic conten t generation and page scaling.<br/>
(...skipping 25 matching lines...) Expand all
36 // Add many div blocks to increase document height more than view height . 36 // Add many div blocks to increase document height more than view height .
37 function showScrollbar() { 37 function showScrollbar() {
38 for (var i = 0; i < 10; i++) { 38 for (var i = 0; i < 10; i++) {
39 var el = document.createElement('div'); 39 var el = document.createElement('div');
40 el.setAttribute('class','block'); 40 el.setAttribute('class','block');
41 document.getElementById('expandingblock').appendChild(el); 41 document.getElementById('expandingblock').appendChild(el);
42 } 42 }
43 setTimeout(scalePage, 20); 43 setTimeout(scalePage, 20);
44 } 44 }
45 function scalePage() { 45 function scalePage() {
46 if (window.internals) 46 if (window.eventSender)
47 window.internals.setPageScaleFactor(3, 0, 0); 47 window.eventSender.setPageScaleFactor(3, 0, 0);
48 setTimeout(changeFixedLayoutSize, 20); 48 setTimeout(changeFixedLayoutSize, 20);
49 } 49 }
50 function changeFixedLayoutSize() { 50 function changeFixedLayoutSize() {
51 if (window.testRunner) 51 if (window.testRunner)
52 testRunner.setFixedLayoutSize(1600, 1600); 52 testRunner.setFixedLayoutSize(1600, 1600);
53 setTimeout(finish, 20); 53 setTimeout(finish, 20);
54 } 54 }
55 function finish() { 55 function finish() {
56 // setFixedLayoutSize() must emit a resize event. 56 // setFixedLayoutSize() must emit a resize event.
57 shouldBe("resizeEventCount", "1"); 57 shouldBe("resizeEventCount", "1");
58 if (window.testRunner) 58 if (window.testRunner)
59 testRunner.notifyDone(); 59 testRunner.notifyDone();
60 } 60 }
61 window.onload = test; 61 window.onload = test;
62 </script> 62 </script>
63 </body> 63 </body>
64 </html> 64 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/resize-events.html ('k') | LayoutTests/fast/events/scale-and-scroll-body.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698