Index: LayoutTests/fast/events/resize-events-count.html |
diff --git a/LayoutTests/fast/events/resize-events.html b/LayoutTests/fast/events/resize-events-count.html |
similarity index 64% |
copy from LayoutTests/fast/events/resize-events.html |
copy to LayoutTests/fast/events/resize-events-count.html |
index a4dd5d54106443bcb91c266d2e0294b1ddc24e39..d07927d2072188fc48008bd2d08ef13d5bda0924 100644 |
--- a/LayoutTests/fast/events/resize-events.html |
+++ b/LayoutTests/fast/events/resize-events-count.html |
@@ -14,11 +14,9 @@ |
</head> |
<body> |
<div> |
- Test how many resize events are emitted during page load and dynamic content generation. |
- |
- Do not resize the page. It invalidates the test. |
+ Test how many resize events are emitted during window resize. |
<p style="text-indent: 10px" id=result1> |
- Resize events (should be 0): <span id=count1>0</span> |
+ Resize events (should be 1): <span id=count1>0</span> |
</div> |
<div id=expandingblock> |
</div> |
@@ -27,21 +25,14 @@ |
testRunner.dumpAsText(); |
testRunner.waitUntilDone(); |
} |
- function test() { |
- setTimeout(addBlock, 20); |
- } |
- function addBlock() { |
- for (var i = 0; i < 10; i++) { |
- var el = document.createElement('div'); |
- el.setAttribute('class','block'); |
- document.getElementById('expandingblock').appendChild(el); |
- } |
+ function resizeWindow() { |
+ window.resizeBy(10, 10); |
setTimeout(finish, 20); |
} |
function finish() { |
var result; |
// No resize events are acceptable. |
leviw_travelin_and_unemployed
2013/06/26 16:14:19
This comment is no longer correct.
|
- if (resizecount < 1) |
+ if (resizecount == 1) |
leviw_travelin_and_unemployed
2013/06/26 16:14:19
How about making these a script tests (js-test-pre
dshwang
2013/06/26 17:01:36
Thx for review.
In my understanding, you want to
leviw_travelin_and_unemployed
2013/06/26 17:22:54
Not a new js file. There's already a js-test-pre.j
|
result = '<p style="color: green">PASS'; |
else |
result = '<p style="color: red">FAIL'; |
@@ -50,6 +41,6 @@ |
if (window.testRunner) |
testRunner.notifyDone(); |
} |
- onload = test; |
+ onload = resizeWindow; |
</script> |
</body> |