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 66% |
copy from LayoutTests/fast/events/resize-events.html |
copy to LayoutTests/fast/events/resize-events-fixed-layout.html |
index a4dd5d54106443bcb91c266d2e0294b1ddc24e39..52d4dcae4e35ca191ebf6d85e96a442240e417ee 100644 |
--- a/LayoutTests/fast/events/resize-events.html |
+++ b/LayoutTests/fast/events/resize-events-fixed-layout.html |
@@ -14,17 +14,20 @@ |
</head> |
<body> |
<div> |
- Test how many resize events are emitted during page load and dynamic content generation. |
+ Following actions must not emit resize events: page load, dynamic content generation and 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(); |
} |
function test() { |
@@ -36,12 +39,22 @@ |
el.setAttribute('class','block'); |
document.getElementById('expandingblock').appendChild(el); |
} |
+ setTimeout(scalePage, 20); |
+ } |
+ 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'; |