5 div.block { height:
400px; border:
1px solid black; margin:
10px; }
10 Test how many resize events are emitted during window resize.
12 <div id=expandingblock
>
14 <pre id=
"console"></pre>
15 <script src=
"../../resources/js-test.js"></script>
17 var resizeEventCount
= 0;
18 window
.onresize = function() {
20 setTimeout(finish
, 0);
23 if (window
.testRunner
) {
24 testRunner
.useUnfortunateSynchronousResizeMode();
25 testRunner
.dumpAsText();
26 testRunner
.waitUntilDone();
28 function resizeWindow() {
29 window
.resizeBy(10, 10);
32 // one resize event must be emitted.
33 shouldBe("resizeEventCount", "1");
34 if (window
.testRunner
)
35 testRunner
.notifyDone();
37 window
.onload
= resizeWindow
;