OLD | NEW |
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, page scaling and changing fixed layout size.<br/> | 10 Following actions must not emit resize events: page load, dynamic conten
t generation, page scaling and changing fixed layout size.<br/> |
(...skipping 21 matching lines...) Expand all Loading... |
32 // Add many div blocks to increase document height more than view height
. | 32 // Add many div blocks to increase document height more than view height
. |
33 function showScrollbar() { | 33 function showScrollbar() { |
34 for (var i = 0; i < 10; i++) { | 34 for (var i = 0; i < 10; i++) { |
35 var el = document.createElement('div'); | 35 var el = document.createElement('div'); |
36 el.setAttribute('class','block'); | 36 el.setAttribute('class','block'); |
37 document.getElementById('expandingblock').appendChild(el); | 37 document.getElementById('expandingblock').appendChild(el); |
38 } | 38 } |
39 setTimeout(scalePage, 20); | 39 setTimeout(scalePage, 20); |
40 } | 40 } |
41 function scalePage() { | 41 function scalePage() { |
42 if (window.internals) | 42 if (window.eventSender) |
43 window.internals.setPageScaleFactor(3, 0, 0); | 43 window.eventSender.setPageScaleFactor(3, 0, 0); |
44 setTimeout(changeFixedLayoutSize, 20); | 44 setTimeout(changeFixedLayoutSize, 20); |
45 } | 45 } |
46 function changeFixedLayoutSize() { | 46 function changeFixedLayoutSize() { |
47 if (window.testRunner) | 47 if (window.testRunner) |
48 testRunner.setFixedLayoutSize(1600, 1600); | 48 testRunner.setFixedLayoutSize(1600, 1600); |
49 setTimeout(finish, 20); | 49 setTimeout(finish, 20); |
50 } | 50 } |
51 function finish() { | 51 function finish() { |
52 // No resize events are acceptable. | 52 // No resize events are acceptable. |
53 shouldBe("resizeEventCount", "0"); | 53 shouldBe("resizeEventCount", "0"); |
54 if (window.testRunner) | 54 if (window.testRunner) |
55 testRunner.notifyDone(); | 55 testRunner.notifyDone(); |
56 } | 56 } |
57 window.onload = test; | 57 window.onload = test; |
58 </script> | 58 </script> |
59 </body> | 59 </body> |
60 </html> | 60 </html> |
OLD | NEW |