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

Unified Diff: third_party/WebKit/LayoutTests/fast/scroll-behavior/visual-viewport-scroll-no-onscroll-event.html

Issue 1712743002: Revert "Make window.scroll properties relative to the layout viewport by default." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix failing test Created 4 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: third_party/WebKit/LayoutTests/fast/scroll-behavior/visual-viewport-scroll-no-onscroll-event.html
diff --git a/third_party/WebKit/LayoutTests/fast/scroll-behavior/visual-viewport-scroll-no-onscroll-event.html b/third_party/WebKit/LayoutTests/fast/scroll-behavior/visual-viewport-scroll-no-onscroll-event.html
deleted file mode 100644
index d10ea6007d7150d1be083ab95e78fd41a5cfb5cd..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/scroll-behavior/visual-viewport-scroll-no-onscroll-event.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<!DOCTYPE html>
-<script src="../../resources/js-test.js"></script>
-<style>
- #target {
- width: 2000px;
- height: 1500px;
- }
-</style>
-<script>
- var numScrollsReceived = 0;
- var numRAFCalls = 0;
- if (window.testRunner && window.internals) {
- window.jsTestIsAsync = true;
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- setPrintTestResultsLazily();
- }
-
- description("This test ensures that scrolling the visual viewport doesn't\
- trigger an onscroll event.");
-
- function runTest() {
- if (!window.testRunner || !window.internals) {
- testFailed("This test requires test runner and internals")
- finishJSTest();
- return;
- }
-
- internals.settings.setScrollAnimatorEnabled(false);
-
- window.internals.setPageScaleFactor(2.0);
- var target = document.getElementById('target');
-
- document.onscroll = function() {
- ++numScrollsReceived;
- debug('OnScroll called for scroll #' + numScrollsReceived);
- }
-
- var failureSentinel = function() {
- if (numRAFCalls == 0) {
- // The first scroll should trigger onscroll because it scrolls
- // the layout viewport.
- eventSender.mouseMoveTo(target.offsetLeft + 5, target.offsetTop + 5);
- eventSender.continuousMouseScrollBy(0, -400);
- } else if (numRAFCalls == 1) {
- shouldBe('numScrollsReceived', '1');
- // The second scroll should not trigger onscroll because it only
- // scrolls the visual viewport.
- eventSender.mouseMoveTo(target.offsetLeft + 5, target.offsetTop + 5);
- eventSender.continuousMouseScrollBy(0, 40);
- } else {
- shouldBe('numScrollsReceived', '1');
- finishJSTest();
- return;
- }
- ++numRAFCalls;
- window.requestAnimationFrame(failureSentinel);
- }
-
- window.requestAnimationFrame(failureSentinel);
- }
-
- onload = runTest;
-</script>
-<div id="target"></div>

Powered by Google App Engine
This is Rietveld 408576698