Index: LayoutTests/fast/events/resize-events-fixed-layout.html |
diff --git a/LayoutTests/fast/events/resize-events.html b/LayoutTests/fast/events/resize-events-fixed-layout.html |
similarity index 63% |
copy from LayoutTests/fast/events/resize-events.html |
copy to LayoutTests/fast/events/resize-events-fixed-layout.html |
index 3e005a9846950949fcebe1a42acdb5ecc229d820..60d5b34dc232f1166333f6098694bc2b4323c2f7 100644 |
--- a/LayoutTests/fast/events/resize-events.html |
+++ b/LayoutTests/fast/events/resize-events-fixed-layout.html |
@@ -14,17 +14,23 @@ |
</head> |
<body> |
<div> |
- Test how many resize events are emitted during page load and dynamic content generation. |
+ Following actions must not emit resize event. |
+ - page load |
+ - dynamic content generation |
+ - page scaling |
+ When fixed layout is enabled, changing fixed layout size must emit resize event. |
Do not resize the page. It invalidates the test. |
<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> |
<script> |
if (window.testRunner) { |
testRunner.dumpAsText(); |
+ testRunner.enableFixedLayoutMode(true); |
+ testRunner.setFixedLayoutSize(700, 240); |
testRunner.waitUntilDone(); |
} |
@@ -36,12 +42,22 @@ |
if (++blockcount < 10) |
setTimeout(addBlock, 20); |
else |
- finish(); |
+ scalePage(); |
+ } |
+ function scalePage() { |
+ if (window.internals) |
+ window.internals.setPageScaleFactor(3, 0, 0); |
+ setTimeout(changeFixedLayoutSize, 20); |
+ } |
+ function changeFixedLayoutSize() { |
+ if (window.testRunner) |
+ testRunner.setFixedLayoutSize(1600, 1600); |
+ setTimeout(finish, 20); |
} |
function finish() { |
var result; |
// No resize events are acceptable. |
- if (resizecount < 1) |
+ if (resizecount == 1) |
result = '<p style="color: green">PASS'; |
else |
result = '<p style="color: red">FAIL'; |