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

Unified Diff: LayoutTests/fast/events/resize-events-count.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: use js-test-pre.js Created 7 years, 6 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-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>
« no previous file with comments | « LayoutTests/fast/events/resize-events.html ('k') | LayoutTests/fast/events/resize-events-count-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698