Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Unified Diff: LayoutTests/fast/events/resize-events-fixed-layout.html

Issue 14766010: Clarify the size of a document view (a.k.a layout size) that causes FrameView to emit the resize ev… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add new test: fast/events/resize-events-count.html Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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';

Powered by Google App Engine
This is Rietveld 408576698