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

Unified Diff: LayoutTests/fast/events/overflow-events.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/overflow-events.html
diff --git a/LayoutTests/fast/events/overflow-events.html b/LayoutTests/fast/events/overflow-events.html
deleted file mode 100644
index ce3e019b4ba4287c507f42b142f61f0c1d317417..0000000000000000000000000000000000000000
--- a/LayoutTests/fast/events/overflow-events.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<html>
-<head>
- <script>
- function setupTest() {
- var horizontalOverflow = testResults[currentTest][1];
- if (horizontalOverflow) {
- document.getElementById('child').style.width = '200px';
- } else {
- document.getElementById('child').style.width = '50px';
- }
-
- var verticalOverflow = testResults[currentTest][2];
- if (verticalOverflow) {
- document.getElementById('child').style.height = '200px';
- } else {
- document.getElementById('child').style.height = '50px';
- }
- }
-
- function finished(result)
- {
- document.getElementById('result').innerHTML = result;
-
- if (window.testRunner)
- testRunner.notifyDone();
- }
-
- function nextTest() {
- if (currentTest == testResults.length) {
- finished("SUCCESS");
- return;
- }
-
- forceLayout();
- setupTest();
- forceLayout();
- }
-
- function overflowChanged(event) {
- var result = [event.orient, event.horizontalOverflow, event.verticalOverflow];
-
- if ('' + result == testResults[currentTest]) {
- currentTest++;
- nextTest();
- } else
- finished("FAILURE: expected " + testResults[currentTest] + " got " + result);
- }
-
- function forceLayout() {
- document.body.offsetTop;
- }
-
- function runTest() {
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- }
-
- testResults = [[OverflowEvent.HORIZONTAL, true, false],
- [OverflowEvent.HORIZONTAL, false, false],
- [OverflowEvent.VERTICAL, false, true],
- [OverflowEvent.VERTICAL, false, false],
- [OverflowEvent.BOTH, true, true],
- [OverflowEvent.BOTH, false, false],
- [OverflowEvent.VERTICAL, false, true],
- [OverflowEvent.BOTH, true, false],
- [OverflowEvent.BOTH, false, true]];
-
- currentTest = 0;
-
- var c = document.getElementById('container');
- c.addEventListener('overflowchanged', overflowChanged, false);
- nextTest();
- }
- </script>
-</head>
-<body onload="runTest()">
- <div id="container" style="width:100; height:100px; border: solid red 2px; overflow: hidden">
- <div id="child" style="margin-top: 30px; margin-left: 30px; width:50px; height:50px; border: solid blue 2px;"></div>
- </div>
- This tests that overflowchanged events are fired correctly. If the test is successful, the text "SUCCESS" should be shown below.
- <div id="result">FAILURE</div>
-</body>
-</html>
« no previous file with comments | « LayoutTests/fast/events/event-creation-expected.txt ('k') | LayoutTests/fast/events/overflow-events-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698