| Index: LayoutTests/fast/events/resize-events-count.html
|
| diff --git a/LayoutTests/fast/events/resize-events-count.html b/LayoutTests/fast/events/resize-events-count.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bd1d42d18e1760d8951edfd6663504b560c8b6b9
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/events/resize-events-count.html
|
| @@ -0,0 +1,39 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| + <style>
|
| + div.block { height: 400px; border: 1px solid black; margin:10px; }
|
| + </style>
|
| +</head>
|
| +<body>
|
| + <div>
|
| + Test how many resize events are emitted during window resize.
|
| + </div>
|
| + <div id=expandingblock>
|
| + </div>
|
| + <pre id="console"></pre>
|
| + <script src="../js/resources/js-test-pre.js"></script>
|
| + <script>
|
| + var resizeEventCount = 0;
|
| + window.onresize = function() {
|
| + resizeEventCount++;
|
| + }
|
| +
|
| + if (window.testRunner) {
|
| + testRunner.dumpAsText();
|
| + testRunner.waitUntilDone();
|
| + }
|
| + function resizeWindow() {
|
| + window.resizeBy(10, 10);
|
| + setTimeout(finish, 20);
|
| + }
|
| + function finish() {
|
| + // one resize event must be emitted.
|
| + shouldBe("resizeEventCount", "1");
|
| + if (window.testRunner)
|
| + testRunner.notifyDone();
|
| + }
|
| + window.onload = resizeWindow;
|
| + </script>
|
| +</body>
|
| +</html>
|
|
|