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

Unified Diff: LayoutTests/fast/events/change-overflow-on-overflow-change.html

Issue 959643002: Remove the overflowchanged event with a runtime flag (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: tests Created 5 years, 10 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/change-overflow-on-overflow-change.html
diff --git a/LayoutTests/fast/events/change-overflow-on-overflow-change.html b/LayoutTests/fast/events/change-overflow-on-overflow-change.html
deleted file mode 100644
index 818ac90ec4e0d6faafba05f4c322bd32fcc237fc..0000000000000000000000000000000000000000
--- a/LayoutTests/fast/events/change-overflow-on-overflow-change.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<body>
-<div id="result"></div>
-<div style="position: relative; height: 200px; overflow: auto;">
- <div id="target" style="height: 75%; background-color: red;"></div>
-</div>
-<script>
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- }
-
- window.onload = function () {
- // Force a layout with offsetHeight, and then start toggling overflow.
- target.offsetHeight;
- toggleOverflow();
- }
-
- var callCount = 0;
- var recursionDepth = 0;
-
- var target = document.getElementById("target");
- var result = document.getElementById("result");
-
- function pass()
- {
- result.innerHTML = "PASS";
- if (window.testRunner)
- testRunner.notifyDone();
- }
-
- function fail()
- {
- result.innerHTML = "FAIL";
- if (window.testRunner)
- testRunner.notifyDone();
- }
-
- function toggleOverflow()
- {
- ++recursionDepth;
- ++callCount;
-
- // The code change associated with this test will cause this function to start
- // firing asynchronously.
- if (recursionDepth > 2) {
- fail();
- return;
- }
-
- // If we have made it this far without a recursionDepth of 2 or greater, then we
- // can say that the test passed.
- if (callCount > 8) {
- pass();
- return;
- }
-
- if (target.style.height === "75%")
- target.style.height = "200%";
- else
- target.style.height = "75%";
- target.offsetHeight;
-
- --recursionDepth;
- }
- target.parentNode.addEventListener("overflowchanged", toggleOverflow);
-</script>
-</body>

Powered by Google App Engine
This is Rietveld 408576698