From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- .../test/mochitest/apz_test_native_event_utils.js | 261 ++++++++ gfx/layers/apz/test/mochitest/apz_test_utils.js | 403 ++++++++++++ gfx/layers/apz/test/mochitest/chrome.ini | 9 + .../apz/test/mochitest/helper_basic_pan.html | 38 ++ .../apz/test/mochitest/helper_bug1151663.html | 83 +++ .../apz/test/mochitest/helper_bug1162771.html | 104 +++ .../apz/test/mochitest/helper_bug1271432.html | 574 ++++++++++++++++ .../apz/test/mochitest/helper_bug1280013.html | 74 +++ .../apz/test/mochitest/helper_bug1285070.html | 44 ++ .../apz/test/mochitest/helper_bug1299195.html | 47 ++ .../apz/test/mochitest/helper_bug982141.html | 149 +++++ gfx/layers/apz/test/mochitest/helper_click.html | 41 ++ gfx/layers/apz/test/mochitest/helper_div_pan.html | 44 ++ .../apz/test/mochitest/helper_drag_click.html | 43 ++ .../apz/test/mochitest/helper_drag_scroll.html | 603 +++++++++++++++++ gfx/layers/apz/test/mochitest/helper_iframe1.html | 14 + gfx/layers/apz/test/mochitest/helper_iframe2.html | 14 + .../apz/test/mochitest/helper_iframe_pan.html | 41 ++ gfx/layers/apz/test/mochitest/helper_long_tap.html | 81 +++ .../helper_scroll_inactive_perspective.html | 46 ++ .../mochitest/helper_scroll_inactive_zindex.html | 47 ++ .../mochitest/helper_scroll_on_position_fixed.html | 62 ++ .../apz/test/mochitest/helper_scrollto_tap.html | 61 ++ .../apz/test/mochitest/helper_subframe_style.css | 15 + gfx/layers/apz/test/mochitest/helper_tall.html | 504 +++++++++++++++ gfx/layers/apz/test/mochitest/helper_tap.html | 32 + .../apz/test/mochitest/helper_tap_fullzoom.html | 33 + .../apz/test/mochitest/helper_tap_passive.html | 64 ++ .../apz/test/mochitest/helper_touch_action.html | 115 ++++ .../mochitest/helper_touch_action_complex.html | 143 ++++ .../mochitest/helper_touch_action_regions.html | 246 +++++++ gfx/layers/apz/test/mochitest/mochitest.ini | 67 ++ gfx/layers/apz/test/mochitest/test_bug1151663.html | 38 ++ gfx/layers/apz/test/mochitest/test_bug1151667.html | 65 ++ gfx/layers/apz/test/mochitest/test_bug1253683.html | 59 ++ gfx/layers/apz/test/mochitest/test_bug1277814.html | 106 +++ .../apz/test/mochitest/test_bug1304689-2.html | 131 ++++ gfx/layers/apz/test/mochitest/test_bug1304689.html | 135 ++++ gfx/layers/apz/test/mochitest/test_bug982141.html | 38 ++ .../test/mochitest/test_frame_reconstruction.html | 218 +++++++ .../apz/test/mochitest/test_group_mouseevents.html | 35 + .../test/mochitest/test_group_pointerevents.html | 31 + .../apz/test/mochitest/test_group_touchevents.html | 104 +++ .../apz/test/mochitest/test_group_wheelevents.html | 41 ++ gfx/layers/apz/test/mochitest/test_group_zoom.html | 44 ++ .../test/mochitest/test_interrupted_reflow.html | 719 +++++++++++++++++++++ .../apz/test/mochitest/test_layerization.html | 214 ++++++ .../mochitest/test_scroll_inactive_bug1190112.html | 541 ++++++++++++++++ .../test_scroll_inactive_flattened_frame.html | 49 ++ .../mochitest/test_scroll_subframe_scrollbar.html | 117 ++++ gfx/layers/apz/test/mochitest/test_smoothness.html | 77 +++ .../test_touch_listeners_impacting_wheel.html | 114 ++++ .../apz/test/mochitest/test_wheel_scroll.html | 106 +++ .../test/mochitest/test_wheel_transactions.html | 137 ++++ 54 files changed, 7221 insertions(+) create mode 100644 gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js create mode 100644 gfx/layers/apz/test/mochitest/apz_test_utils.js create mode 100644 gfx/layers/apz/test/mochitest/chrome.ini create mode 100644 gfx/layers/apz/test/mochitest/helper_basic_pan.html create mode 100644 gfx/layers/apz/test/mochitest/helper_bug1151663.html create mode 100644 gfx/layers/apz/test/mochitest/helper_bug1162771.html create mode 100644 gfx/layers/apz/test/mochitest/helper_bug1271432.html create mode 100644 gfx/layers/apz/test/mochitest/helper_bug1280013.html create mode 100644 gfx/layers/apz/test/mochitest/helper_bug1285070.html create mode 100644 gfx/layers/apz/test/mochitest/helper_bug1299195.html create mode 100644 gfx/layers/apz/test/mochitest/helper_bug982141.html create mode 100644 gfx/layers/apz/test/mochitest/helper_click.html create mode 100644 gfx/layers/apz/test/mochitest/helper_div_pan.html create mode 100644 gfx/layers/apz/test/mochitest/helper_drag_click.html create mode 100644 gfx/layers/apz/test/mochitest/helper_drag_scroll.html create mode 100644 gfx/layers/apz/test/mochitest/helper_iframe1.html create mode 100644 gfx/layers/apz/test/mochitest/helper_iframe2.html create mode 100644 gfx/layers/apz/test/mochitest/helper_iframe_pan.html create mode 100644 gfx/layers/apz/test/mochitest/helper_long_tap.html create mode 100644 gfx/layers/apz/test/mochitest/helper_scroll_inactive_perspective.html create mode 100644 gfx/layers/apz/test/mochitest/helper_scroll_inactive_zindex.html create mode 100644 gfx/layers/apz/test/mochitest/helper_scroll_on_position_fixed.html create mode 100644 gfx/layers/apz/test/mochitest/helper_scrollto_tap.html create mode 100644 gfx/layers/apz/test/mochitest/helper_subframe_style.css create mode 100644 gfx/layers/apz/test/mochitest/helper_tall.html create mode 100644 gfx/layers/apz/test/mochitest/helper_tap.html create mode 100644 gfx/layers/apz/test/mochitest/helper_tap_fullzoom.html create mode 100644 gfx/layers/apz/test/mochitest/helper_tap_passive.html create mode 100644 gfx/layers/apz/test/mochitest/helper_touch_action.html create mode 100644 gfx/layers/apz/test/mochitest/helper_touch_action_complex.html create mode 100644 gfx/layers/apz/test/mochitest/helper_touch_action_regions.html create mode 100644 gfx/layers/apz/test/mochitest/mochitest.ini create mode 100644 gfx/layers/apz/test/mochitest/test_bug1151663.html create mode 100644 gfx/layers/apz/test/mochitest/test_bug1151667.html create mode 100644 gfx/layers/apz/test/mochitest/test_bug1253683.html create mode 100644 gfx/layers/apz/test/mochitest/test_bug1277814.html create mode 100644 gfx/layers/apz/test/mochitest/test_bug1304689-2.html create mode 100644 gfx/layers/apz/test/mochitest/test_bug1304689.html create mode 100644 gfx/layers/apz/test/mochitest/test_bug982141.html create mode 100644 gfx/layers/apz/test/mochitest/test_frame_reconstruction.html create mode 100644 gfx/layers/apz/test/mochitest/test_group_mouseevents.html create mode 100644 gfx/layers/apz/test/mochitest/test_group_pointerevents.html create mode 100644 gfx/layers/apz/test/mochitest/test_group_touchevents.html create mode 100644 gfx/layers/apz/test/mochitest/test_group_wheelevents.html create mode 100644 gfx/layers/apz/test/mochitest/test_group_zoom.html create mode 100644 gfx/layers/apz/test/mochitest/test_interrupted_reflow.html create mode 100644 gfx/layers/apz/test/mochitest/test_layerization.html create mode 100644 gfx/layers/apz/test/mochitest/test_scroll_inactive_bug1190112.html create mode 100644 gfx/layers/apz/test/mochitest/test_scroll_inactive_flattened_frame.html create mode 100644 gfx/layers/apz/test/mochitest/test_scroll_subframe_scrollbar.html create mode 100644 gfx/layers/apz/test/mochitest/test_smoothness.html create mode 100644 gfx/layers/apz/test/mochitest/test_touch_listeners_impacting_wheel.html create mode 100644 gfx/layers/apz/test/mochitest/test_wheel_scroll.html create mode 100644 gfx/layers/apz/test/mochitest/test_wheel_transactions.html (limited to 'gfx/layers/apz/test/mochitest') diff --git a/gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js b/gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js new file mode 100644 index 000000000..7f820a936 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js @@ -0,0 +1,261 @@ +// Utilities for synthesizing of native events. + +function getPlatform() { + if (navigator.platform.indexOf("Win") == 0) { + return "windows"; + } + if (navigator.platform.indexOf("Mac") == 0) { + return "mac"; + } + // Check for Android before Linux + if (navigator.appVersion.indexOf("Android") >= 0) { + return "android" + } + if (navigator.platform.indexOf("Linux") == 0) { + return "linux"; + } + return "unknown"; +} + +function nativeVerticalWheelEventMsg() { + switch (getPlatform()) { + case "windows": return 0x020A; // WM_MOUSEWHEEL + case "mac": return 0; // value is unused, can be anything + case "linux": return 4; // value is unused, pass GDK_SCROLL_SMOOTH anyway + } + throw "Native wheel events not supported on platform " + getPlatform(); +} + +function nativeHorizontalWheelEventMsg() { + switch (getPlatform()) { + case "windows": return 0x020E; // WM_MOUSEHWHEEL + case "mac": return 0; // value is unused, can be anything + case "linux": return 4; // value is unused, pass GDK_SCROLL_SMOOTH anyway + } + throw "Native wheel events not supported on platform " + getPlatform(); +} + +// Given a pixel scrolling delta, converts it to the platform's native units. +function nativeScrollUnits(aElement, aDimen) { + switch (getPlatform()) { + case "linux": { + // GTK deltas are treated as line height divided by 3 by gecko. + var targetWindow = aElement.ownerDocument.defaultView; + var lineHeight = targetWindow.getComputedStyle(aElement)["font-size"]; + return aDimen / (parseInt(lineHeight) * 3); + } + } + return aDimen; +} + +function nativeMouseDownEventMsg() { + switch (getPlatform()) { + case "windows": return 2; // MOUSEEVENTF_LEFTDOWN + case "mac": return 1; // NSLeftMouseDown + case "linux": return 4; // GDK_BUTTON_PRESS + case "android": return 5; // ACTION_POINTER_DOWN + } + throw "Native mouse-down events not supported on platform " + getPlatform(); +} + +function nativeMouseMoveEventMsg() { + switch (getPlatform()) { + case "windows": return 1; // MOUSEEVENTF_MOVE + case "mac": return 5; // NSMouseMoved + case "linux": return 3; // GDK_MOTION_NOTIFY + case "android": return 7; // ACTION_HOVER_MOVE + } + throw "Native mouse-move events not supported on platform " + getPlatform(); +} + +function nativeMouseUpEventMsg() { + switch (getPlatform()) { + case "windows": return 4; // MOUSEEVENTF_LEFTUP + case "mac": return 2; // NSLeftMouseUp + case "linux": return 7; // GDK_BUTTON_RELEASE + case "android": return 6; // ACTION_POINTER_UP + } + throw "Native mouse-up events not supported on platform " + getPlatform(); +} + +// Convert (aX, aY), in CSS pixels relative to aElement's bounding rect, +// to device pixels relative to the screen. +function coordinatesRelativeToScreen(aX, aY, aElement) { + var targetWindow = aElement.ownerDocument.defaultView; + var scale = targetWindow.devicePixelRatio; + var rect = aElement.getBoundingClientRect(); + return { + x: (targetWindow.mozInnerScreenX + rect.left + aX) * scale, + y: (targetWindow.mozInnerScreenY + rect.top + aY) * scale + }; +} + +// Get the bounding box of aElement, and return it in device pixels +// relative to the screen. +function rectRelativeToScreen(aElement) { + var targetWindow = aElement.ownerDocument.defaultView; + var scale = targetWindow.devicePixelRatio; + var rect = aElement.getBoundingClientRect(); + return { + x: (targetWindow.mozInnerScreenX + rect.left) * scale, + y: (targetWindow.mozInnerScreenY + rect.top) * scale, + w: (rect.width * scale), + h: (rect.height * scale) + }; +} + +// Synthesizes a native mousewheel event and returns immediately. This does not +// guarantee anything; you probably want to use one of the other functions below +// which actually wait for results. +// aX and aY are relative to the top-left of |aElement|'s containing window. +// aDeltaX and aDeltaY are pixel deltas, and aObserver can be left undefined +// if not needed. +function synthesizeNativeWheel(aElement, aX, aY, aDeltaX, aDeltaY, aObserver) { + var pt = coordinatesRelativeToScreen(aX, aY, aElement); + if (aDeltaX && aDeltaY) { + throw "Simultaneous wheeling of horizontal and vertical is not supported on all platforms."; + } + aDeltaX = nativeScrollUnits(aElement, aDeltaX); + aDeltaY = nativeScrollUnits(aElement, aDeltaY); + var msg = aDeltaX ? nativeHorizontalWheelEventMsg() : nativeVerticalWheelEventMsg(); + var utils = SpecialPowers.getDOMWindowUtils(aElement.ownerDocument.defaultView); + utils.sendNativeMouseScrollEvent(pt.x, pt.y, msg, aDeltaX, aDeltaY, 0, 0, 0, aElement, aObserver); + return true; +} + +// Synthesizes a native mousewheel event and invokes the callback once the +// request has been successfully made to the OS. This does not necessarily +// guarantee that the OS generates the event we requested. See +// synthesizeNativeWheel for details on the parameters. +function synthesizeNativeWheelAndWaitForObserver(aElement, aX, aY, aDeltaX, aDeltaY, aCallback) { + var observer = { + observe: function(aSubject, aTopic, aData) { + if (aCallback && aTopic == "mousescrollevent") { + setTimeout(aCallback, 0); + } + } + }; + return synthesizeNativeWheel(aElement, aX, aY, aDeltaX, aDeltaY, observer); +} + +// Synthesizes a native mousewheel event and invokes the callback once the +// wheel event is dispatched to |aElement|'s containing window. If the event +// targets content in a subdocument, |aElement| should be inside the +// subdocument. See synthesizeNativeWheel for details on the other parameters. +function synthesizeNativeWheelAndWaitForWheelEvent(aElement, aX, aY, aDeltaX, aDeltaY, aCallback) { + var targetWindow = aElement.ownerDocument.defaultView; + targetWindow.addEventListener("wheel", function wheelWaiter(e) { + targetWindow.removeEventListener("wheel", wheelWaiter); + setTimeout(aCallback, 0); + }); + return synthesizeNativeWheel(aElement, aX, aY, aDeltaX, aDeltaY); +} + +// Synthesizes a native mousewheel event and invokes the callback once the +// first resulting scroll event is dispatched to |aElement|'s containing window. +// If the event targets content in a subdocument, |aElement| should be inside +// the subdocument. See synthesizeNativeWheel for details on the other +// parameters. +function synthesizeNativeWheelAndWaitForScrollEvent(aElement, aX, aY, aDeltaX, aDeltaY, aCallback) { + var targetWindow = aElement.ownerDocument.defaultView; + var useCapture = true; // scroll events don't always bubble + targetWindow.addEventListener("scroll", function scrollWaiter(e) { + targetWindow.removeEventListener("scroll", scrollWaiter, useCapture); + setTimeout(aCallback, 0); + }, useCapture); + return synthesizeNativeWheel(aElement, aX, aY, aDeltaX, aDeltaY); +} + +// Synthesizes a native mouse move event and returns immediately. +// aX and aY are relative to the top-left of |aElement|'s containing window. +function synthesizeNativeMouseMove(aElement, aX, aY) { + var pt = coordinatesRelativeToScreen(aX, aY, aElement); + var utils = SpecialPowers.getDOMWindowUtils(aElement.ownerDocument.defaultView); + utils.sendNativeMouseEvent(pt.x, pt.y, nativeMouseMoveEventMsg(), 0, aElement); + return true; +} + +// Synthesizes a native mouse move event and invokes the callback once the +// mouse move event is dispatched to |aElement|'s containing window. If the event +// targets content in a subdocument, |aElement| should be inside the +// subdocument. See synthesizeNativeMouseMove for details on the other +// parameters. +function synthesizeNativeMouseMoveAndWaitForMoveEvent(aElement, aX, aY, aCallback) { + var targetWindow = aElement.ownerDocument.defaultView; + targetWindow.addEventListener("mousemove", function mousemoveWaiter(e) { + targetWindow.removeEventListener("mousemove", mousemoveWaiter); + setTimeout(aCallback, 0); + }); + return synthesizeNativeMouseMove(aElement, aX, aY); +} + +// Synthesizes a native touch event and dispatches it. aX and aY in CSS pixels +// relative to the top-left of |aElement|'s bounding rect. +function synthesizeNativeTouch(aElement, aX, aY, aType, aObserver = null, aTouchId = 0) { + var pt = coordinatesRelativeToScreen(aX, aY, aElement); + var utils = SpecialPowers.getDOMWindowUtils(aElement.ownerDocument.defaultView); + utils.sendNativeTouchPoint(aTouchId, aType, pt.x, pt.y, 1, 90, aObserver); + return true; +} + +// A handy constant when synthesizing native touch drag events with the pref +// "apz.touch_start_tolerance" set to 0. In this case, the first touchmove with +// a nonzero pixel movement is consumed by the APZ to transition from the +// "touching" state to the "panning" state, so calls to synthesizeNativeTouchDrag +// should add an extra pixel pixel for this purpose. The TOUCH_SLOP provides +// a constant that can be used for this purpose. Note that if the touch start +// tolerance is set to something higher, the touch slop amount used must be +// correspondingly increased so as to be higher than the tolerance. +const TOUCH_SLOP = 1; +function synthesizeNativeTouchDrag(aElement, aX, aY, aDeltaX, aDeltaY, aObserver = null, aTouchId = 0) { + synthesizeNativeTouch(aElement, aX, aY, SpecialPowers.DOMWindowUtils.TOUCH_CONTACT, null, aTouchId); + var steps = Math.max(Math.abs(aDeltaX), Math.abs(aDeltaY)); + for (var i = 1; i < steps; i++) { + var dx = i * (aDeltaX / steps); + var dy = i * (aDeltaY / steps); + synthesizeNativeTouch(aElement, aX + dx, aY + dy, SpecialPowers.DOMWindowUtils.TOUCH_CONTACT, null, aTouchId); + } + synthesizeNativeTouch(aElement, aX + aDeltaX, aY + aDeltaY, SpecialPowers.DOMWindowUtils.TOUCH_CONTACT, null, aTouchId); + return synthesizeNativeTouch(aElement, aX + aDeltaX, aY + aDeltaY, SpecialPowers.DOMWindowUtils.TOUCH_REMOVE, aObserver, aTouchId); +} + +function synthesizeNativeTap(aElement, aX, aY, aObserver = null) { + var pt = coordinatesRelativeToScreen(aX, aY, aElement); + var utils = SpecialPowers.getDOMWindowUtils(aElement.ownerDocument.defaultView); + utils.sendNativeTouchTap(pt.x, pt.y, false, aObserver); + return true; +} + +function synthesizeNativeMouseEvent(aElement, aX, aY, aType, aObserver = null) { + var pt = coordinatesRelativeToScreen(aX, aY, aElement); + var utils = SpecialPowers.getDOMWindowUtils(aElement.ownerDocument.defaultView); + utils.sendNativeMouseEvent(pt.x, pt.y, aType, 0, aElement, aObserver); + return true; +} + +function synthesizeNativeClick(aElement, aX, aY, aObserver = null) { + var pt = coordinatesRelativeToScreen(aX, aY, aElement); + var utils = SpecialPowers.getDOMWindowUtils(aElement.ownerDocument.defaultView); + utils.sendNativeMouseEvent(pt.x, pt.y, nativeMouseDownEventMsg(), 0, aElement, function() { + utils.sendNativeMouseEvent(pt.x, pt.y, nativeMouseUpEventMsg(), 0, aElement, aObserver); + }); + return true; +} + +// Move the mouse to (dx, dy) relative to |element|, and scroll the wheel +// at that location. +// Moving the mouse is necessary to avoid wheel events from two consecutive +// moveMouseAndScrollWheelOver() calls on different elements being incorrectly +// considered as part of the same wheel transaction. +// We also wait for the mouse move event to be processed before sending the +// wheel event, otherwise there is a chance they might get reordered, and +// we have the transaction problem again. +function moveMouseAndScrollWheelOver(element, dx, dy, testDriver, waitForScroll = true) { + return synthesizeNativeMouseMoveAndWaitForMoveEvent(element, dx, dy, function() { + if (waitForScroll) { + synthesizeNativeWheelAndWaitForScrollEvent(element, dx, dy, 0, -10, testDriver); + } else { + synthesizeNativeWheelAndWaitForWheelEvent(element, dx, dy, 0, -10, testDriver); + } + }); +} diff --git a/gfx/layers/apz/test/mochitest/apz_test_utils.js b/gfx/layers/apz/test/mochitest/apz_test_utils.js new file mode 100644 index 000000000..c97738434 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/apz_test_utils.js @@ -0,0 +1,403 @@ +// Utilities for writing APZ tests using the framework added in bug 961289 + +// ---------------------------------------------------------------------- +// Functions that convert the APZ test data into a more usable form. +// Every place we have a WebIDL sequence whose elements are dictionaries +// with two elements, a key, and a value, we convert this into a JS +// object with a property for each key/value pair. (This is the structure +// we really want, but we can't express in directly in WebIDL.) +// ---------------------------------------------------------------------- + +function convertEntries(entries) { + var result = {}; + for (var i = 0; i < entries.length; ++i) { + result[entries[i].key] = entries[i].value; + } + return result; +} + +function getPropertyAsRect(scrollFrames, scrollId, prop) { + SimpleTest.ok(scrollId in scrollFrames, + 'expected scroll frame data for scroll id ' + scrollId); + var scrollFrameData = scrollFrames[scrollId]; + SimpleTest.ok('displayport' in scrollFrameData, + 'expected a ' + prop + ' for scroll id ' + scrollId); + var value = scrollFrameData[prop]; + var pieces = value.replace(/[()\s]+/g, '').split(','); + SimpleTest.is(pieces.length, 4, "expected string of form (x,y,w,h)"); + return { x: parseInt(pieces[0]), + y: parseInt(pieces[1]), + w: parseInt(pieces[2]), + h: parseInt(pieces[3]) }; +} + +function convertScrollFrameData(scrollFrames) { + var result = {}; + for (var i = 0; i < scrollFrames.length; ++i) { + result[scrollFrames[i].scrollId] = convertEntries(scrollFrames[i].entries); + } + return result; +} + +function convertBuckets(buckets) { + var result = {}; + for (var i = 0; i < buckets.length; ++i) { + result[buckets[i].sequenceNumber] = convertScrollFrameData(buckets[i].scrollFrames); + } + return result; +} + +function convertTestData(testData) { + var result = {}; + result.paints = convertBuckets(testData.paints); + result.repaintRequests = convertBuckets(testData.repaintRequests); + return result; +} + +// Given APZ test data for a single paint on the compositor side, +// reconstruct the APZC tree structure from the 'parentScrollId' +// entries that were logged. More specifically, the subset of the +// APZC tree structure corresponding to the layer subtree for the +// content process that triggered the paint, is reconstructed (as +// the APZ test data only contains information abot this subtree). +function buildApzcTree(paint) { + // The APZC tree can potentially have multiple root nodes, + // so we invent a node that is the parent of all roots. + // This 'root' does not correspond to an APZC. + var root = {scrollId: -1, children: []}; + for (var scrollId in paint) { + paint[scrollId].children = []; + paint[scrollId].scrollId = scrollId; + } + for (var scrollId in paint) { + var parentNode = null; + if ("hasNoParentWithSameLayersId" in paint[scrollId]) { + parentNode = root; + } else if ("parentScrollId" in paint[scrollId]) { + parentNode = paint[paint[scrollId].parentScrollId]; + } + parentNode.children.push(paint[scrollId]); + } + return root; +} + +// Given an APZC tree produced by buildApzcTree, return the RCD node in +// the tree, or null if there was none. +function findRcdNode(apzcTree) { + if (!!apzcTree.isRootContent) { // isRootContent will be undefined or "1" + return apzcTree; + } + for (var i = 0; i < apzcTree.children.length; i++) { + var rcd = findRcdNode(apzcTree.children[i]); + if (rcd != null) { + return rcd; + } + } + return null; +} + +// Return whether an element whose id includes |elementId| has been layerized. +// Assumes |elementId| will be present in the content description for the +// element, and not in the content descriptions of other elements. +function isLayerized(elementId) { + var contentTestData = SpecialPowers.getDOMWindowUtils(window).getContentAPZTestData(); + ok(contentTestData.paints.length > 0, "expected at least one paint"); + var seqno = contentTestData.paints[contentTestData.paints.length - 1].sequenceNumber; + contentTestData = convertTestData(contentTestData); + var paint = contentTestData.paints[seqno]; + for (var scrollId in paint) { + if ("contentDescription" in paint[scrollId]) { + if (paint[scrollId]["contentDescription"].includes(elementId)) { + return true; + } + } + } + return false; +} + +function flushApzRepaints(aCallback, aWindow = window) { + if (!aCallback) { + throw "A callback must be provided!"; + } + var repaintDone = function() { + SpecialPowers.Services.obs.removeObserver(repaintDone, "apz-repaints-flushed", false); + setTimeout(aCallback, 0); + }; + SpecialPowers.Services.obs.addObserver(repaintDone, "apz-repaints-flushed", false); + if (SpecialPowers.getDOMWindowUtils(aWindow).flushApzRepaints()) { + dump("Flushed APZ repaints, waiting for callback...\n"); + } else { + dump("Flushing APZ repaints was a no-op, triggering callback directly...\n"); + repaintDone(); + } +} + +// Flush repaints, APZ pending repaints, and any repaints resulting from that +// flush. This is particularly useful if the test needs to reach some sort of +// "idle" state in terms of repaints. Usually just doing waitForAllPaints +// followed by flushApzRepaints is sufficient to flush all APZ state back to +// the main thread, but it can leave a paint scheduled which will get triggered +// at some later time. For tests that specifically test for painting at +// specific times, this method is the way to go. Even if in doubt, this is the +// preferred method as the extra step is "safe" and shouldn't interfere with +// most tests. +function waitForApzFlushedRepaints(aCallback) { + // First flush the main-thread paints and send transactions to the APZ + waitForAllPaints(function() { + // Then flush the APZ to make sure any repaint requests have been sent + // back to the main thread + flushApzRepaints(function() { + // Then flush the main-thread again to process the repaint requests. + // Once this is done, we should be in a stable state with nothing + // pending, so we can trigger the callback. + waitForAllPaints(aCallback); + }); + }); +} + +// This function takes a set of subtests to run one at a time in new top-level +// windows, and returns a Promise that is resolved once all the subtests are +// done running. +// +// The aSubtests array is an array of objects with the following keys: +// file: required, the filename of the subtest. +// prefs: optional, an array of arrays containing key-value prefs to set. +// dp_suppression: optional, a boolean on whether or not to respect displayport +// suppression during the test. +// onload: optional, a function that will be registered as a load event listener +// for the child window that will hold the subtest. the function will be +// passed exactly one argument, which will be the child window. +// An example of an array is: +// aSubtests = [ +// { 'file': 'test_file_name.html' }, +// { 'file': 'test_file_2.html', 'prefs': [['pref.name', true], ['other.pref', 1000]], 'dp_suppression': false } +// { 'file': 'file_3.html', 'onload': function(w) { w.subtestDone(); } } +// ]; +// +// Each subtest should call the subtestDone() function when it is done, to +// indicate that the window should be torn down and the next text should run. +// The subtestDone() function is injected into the subtest's window by this +// function prior to loading the subtest. For convenience, the |is| and |ok| +// functions provided by SimpleTest are also mapped into the subtest's window. +// For other things from the parent, the subtest can use window.opener. +// to access objects. +function runSubtestsSeriallyInFreshWindows(aSubtests) { + return new Promise(function(resolve, reject) { + var testIndex = -1; + var w = null; + + function advanceSubtestExecution() { + var test = aSubtests[testIndex]; + if (w) { + if (typeof test.dp_suppression != 'undefined') { + // We modified the suppression when starting the test, so now undo that. + SpecialPowers.getDOMWindowUtils(window).respectDisplayPortSuppression(!test.dp_suppression); + } + if (test.prefs) { + // We pushed some prefs for this test, pop them, and re-invoke + // advanceSubtestExecution() after that's been processed + SpecialPowers.popPrefEnv(function() { + w.close(); + w = null; + advanceSubtestExecution(); + }); + return; + } + + w.close(); + } + + testIndex++; + if (testIndex >= aSubtests.length) { + resolve(); + return; + } + + test = aSubtests[testIndex]; + if (typeof test.dp_suppression != 'undefined') { + // Normally during a test, the displayport will get suppressed during page + // load, and unsuppressed at a non-deterministic time during the test. The + // unsuppression can trigger a repaint which interferes with the test, so + // to avoid that we can force the displayport to be unsuppressed for the + // entire test which is more deterministic. + SpecialPowers.getDOMWindowUtils(window).respectDisplayPortSuppression(test.dp_suppression); + } + + function spawnTest(aFile) { + w = window.open('', "_blank"); + w.subtestDone = advanceSubtestExecution; + w.SimpleTest = SimpleTest; + w.is = function(a, b, msg) { return is(a, b, aFile + " | " + msg); }; + w.ok = function(cond, name, diag) { return ok(cond, aFile + " | " + name, diag); }; + if (test.onload) { + w.addEventListener('load', function(e) { test.onload(w); }, { once: true }); + } + w.location = location.href.substring(0, location.href.lastIndexOf('/') + 1) + aFile; + return w; + } + + if (test.prefs) { + // Got some prefs for this subtest, push them + SpecialPowers.pushPrefEnv({"set": test.prefs}, function() { + w = spawnTest(test.file); + }); + } else { + w = spawnTest(test.file); + } + } + + advanceSubtestExecution(); + }); +} + +function pushPrefs(prefs) { + return SpecialPowers.pushPrefEnv({'set': prefs}); +} + +function waitUntilApzStable() { + return new Promise(function(resolve, reject) { + SimpleTest.waitForFocus(function() { + waitForAllPaints(function() { + flushApzRepaints(resolve); + }); + }, window); + }); +} + +function isApzEnabled() { + var enabled = SpecialPowers.getDOMWindowUtils(window).asyncPanZoomEnabled; + if (!enabled) { + // All tests are required to have at least one assertion. Since APZ is + // disabled, and the main test is presumably not going to run, we stick in + // a dummy assertion here to keep the test passing. + SimpleTest.ok(true, "APZ is not enabled; this test will be skipped"); + } + return enabled; +} + +// Despite what this function name says, this does not *directly* run the +// provided continuation testFunction. Instead, it returns a function that +// can be used to run the continuation. The extra level of indirection allows +// it to be more easily added to a promise chain, like so: +// waitUntilApzStable().then(runContinuation(myTest)); +// +// If you want to run the continuation directly, outside of a promise chain, +// you can invoke the return value of this function, like so: +// runContinuation(myTest)(); +function runContinuation(testFunction) { + // We need to wrap this in an extra function, so that the call site can + // be more readable without running the promise too early. In other words, + // if we didn't have this extra function, the promise would start running + // during construction of the promise chain, concurrently with the first + // promise in the chain. + return function() { + return new Promise(function(resolve, reject) { + var testContinuation = null; + + function driveTest() { + if (!testContinuation) { + testContinuation = testFunction(driveTest); + } + var ret = testContinuation.next(); + if (ret.done) { + resolve(); + } + } + + driveTest(); + }); + }; +} + +// Take a snapshot of the given rect, *including compositor transforms* (i.e. +// includes async scroll transforms applied by APZ). If you don't need the +// compositor transforms, you can probably get away with using +// SpecialPowers.snapshotWindowWithOptions or one of the friendlier wrappers. +// The rect provided is expected to be relative to the screen, for example as +// returned by rectRelativeToScreen in apz_test_native_event_utils.js. +// Example usage: +// var snapshot = getSnapshot(rectRelativeToScreen(myDiv)); +// which will take a snapshot of the 'myDiv' element. Note that if part of the +// element is obscured by other things on top, the snapshot will include those +// things. If it is clipped by a scroll container, the snapshot will include +// that area anyway, so you will probably get parts of the scroll container in +// the snapshot. If the rect extends outside the browser window then the +// results are undefined. +// The snapshot is returned in the form of a data URL. +function getSnapshot(rect) { + function parentProcessSnapshot() { + addMessageListener('snapshot', function(rect) { + Components.utils.import('resource://gre/modules/Services.jsm'); + var topWin = Services.wm.getMostRecentWindow('navigator:browser'); + + // reposition the rect relative to the top-level browser window + rect = JSON.parse(rect); + rect.x -= topWin.mozInnerScreenX; + rect.y -= topWin.mozInnerScreenY; + + // take the snapshot + var canvas = topWin.document.createElementNS("http://www.w3.org/1999/xhtml", "canvas"); + canvas.width = rect.w; + canvas.height = rect.h; + var ctx = canvas.getContext("2d"); + ctx.drawWindow(topWin, rect.x, rect.y, rect.w, rect.h, 'rgb(255,255,255)', ctx.DRAWWINDOW_DRAW_VIEW | ctx.DRAWWINDOW_USE_WIDGET_LAYERS | ctx.DRAWWINDOW_DRAW_CARET); + return canvas.toDataURL(); + }); + } + + if (typeof getSnapshot.chromeHelper == 'undefined') { + // This is the first time getSnapshot is being called; do initialization + getSnapshot.chromeHelper = SpecialPowers.loadChromeScript(parentProcessSnapshot); + SimpleTest.registerCleanupFunction(function() { getSnapshot.chromeHelper.destroy() }); + } + + return getSnapshot.chromeHelper.sendSyncMessage('snapshot', JSON.stringify(rect)).toString(); +} + +// Takes the document's query string and parses it, assuming the query string +// is composed of key-value pairs where the value is in JSON format. The object +// returned contains the various values indexed by their respective keys. In +// case of duplicate keys, the last value be used. +// Examples: +// ?key="value"&key2=false&key3=500 +// produces { "key": "value", "key2": false, "key3": 500 } +// ?key={"x":0,"y":50}&key2=[1,2,true] +// produces { "key": { "x": 0, "y": 0 }, "key2": [1, 2, true] } +function getQueryArgs() { + var args = {}; + if (location.search.length > 0) { + var params = location.search.substr(1).split('&'); + for (var p of params) { + var [k, v] = p.split('='); + args[k] = JSON.parse(v); + } + } + return args; +} + +// Return a function that returns a promise to create a script element with the +// given URI and append it to the head of the document in the given window. +// As with runContinuation(), the extra function wrapper is for convenience +// at the call site, so that this can be chained with other promises: +// waitUntilApzStable().then(injectScript('foo')) +// .then(injectScript('bar')); +// If you want to do the injection right away, run the function returned by +// this function: +// injectScript('foo')(); +function injectScript(aScript, aWindow = window) { + return function() { + return new Promise(function(resolve, reject) { + var e = aWindow.document.createElement('script'); + e.type = 'text/javascript'; + e.onload = function() { + resolve(); + }; + e.onerror = function() { + dump('Script [' + aScript + '] errored out\n'); + reject(); + }; + e.src = aScript; + aWindow.document.getElementsByTagName('head')[0].appendChild(e); + }); + }; +} diff --git a/gfx/layers/apz/test/mochitest/chrome.ini b/gfx/layers/apz/test/mochitest/chrome.ini new file mode 100644 index 000000000..d52da5928 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/chrome.ini @@ -0,0 +1,9 @@ +[DEFAULT] +support-files = + apz_test_native_event_utils.js +tags = apz-chrome + +[test_smoothness.html] +# hardware vsync only on win/mac +# e10s only since APZ is only enabled on e10s +skip-if = debug || (os != 'mac' && os != 'win') || !e10s diff --git a/gfx/layers/apz/test/mochitest/helper_basic_pan.html b/gfx/layers/apz/test/mochitest/helper_basic_pan.html new file mode 100644 index 000000000..c33258da8 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_basic_pan.html @@ -0,0 +1,38 @@ + + + + + + Sanity panning test + + + + + + +
+ This div makes the page scrollable. +
+ + diff --git a/gfx/layers/apz/test/mochitest/helper_bug1151663.html b/gfx/layers/apz/test/mochitest/helper_bug1151663.html new file mode 100644 index 000000000..ef2fde9a9 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_bug1151663.html @@ -0,0 +1,83 @@ + + + + + + Test for Bug 1151663, helper page + + + + + Mozilla Bug 1151663 +
+ +
+
+ +
+ + diff --git a/gfx/layers/apz/test/mochitest/helper_bug1162771.html b/gfx/layers/apz/test/mochitest/helper_bug1162771.html new file mode 100644 index 000000000..18e4a2f05 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_bug1162771.html @@ -0,0 +1,104 @@ + + + + + + Test for touchend on media elements + + + + + + + +

Tap on the colored boxes to hide them.

+ + +
+ + diff --git a/gfx/layers/apz/test/mochitest/helper_bug1271432.html b/gfx/layers/apz/test/mochitest/helper_bug1271432.html new file mode 100644 index 000000000..8234b8232 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_bug1271432.html @@ -0,0 +1,574 @@ + + Ensure that the hit region doesn't get unexpectedly expanded + + + + + + + +Some text + +
+Scrolling on the very left edge of this div will work. +Scrolling on the right side of this div (starting with the left edge of the orange box above) should work, but doesn't.
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+
+
this div makes the page scrollable
+ diff --git a/gfx/layers/apz/test/mochitest/helper_bug1280013.html b/gfx/layers/apz/test/mochitest/helper_bug1280013.html new file mode 100644 index 000000000..0c602901a --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_bug1280013.html @@ -0,0 +1,74 @@ + + + + + + + Test for bug 1280013 + + + + + + + The iframe below is at (0, 800). Scroll it into view, and then scroll the contents. The content should be fully rendered in high-resolution. + + + diff --git a/gfx/layers/apz/test/mochitest/helper_bug1285070.html b/gfx/layers/apz/test/mochitest/helper_bug1285070.html new file mode 100644 index 000000000..3a4879034 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_bug1285070.html @@ -0,0 +1,44 @@ + + + + + + Test pointer events are dispatched once for touch tap + + + + + + +
+ + diff --git a/gfx/layers/apz/test/mochitest/helper_bug1299195.html b/gfx/layers/apz/test/mochitest/helper_bug1299195.html new file mode 100644 index 000000000..8e746749c --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_bug1299195.html @@ -0,0 +1,47 @@ + + + + + + Test pointer events are dispatched once for touch tap + + + + + + +
+ + diff --git a/gfx/layers/apz/test/mochitest/helper_bug982141.html b/gfx/layers/apz/test/mochitest/helper_bug982141.html new file mode 100644 index 000000000..5d2f15397 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_bug982141.html @@ -0,0 +1,149 @@ + + + + + + + Test for Bug 982141, helper page + + + + + Mozilla Bug 982141 + +
+
+ Wide content so that the vertical scrollbar for the parent div + doesn't eat into the 50px width and reduce the width of the + displayport. +
+ Line 1
+ Line 2
+ Line 3
+ Line 4
+ Line 5
+ Line 6
+ Line 7
+ Line 8
+ Line 9
+ Line 10
+ Line 11
+ Line 12
+ Line 13
+ Line 14
+ Line 15
+ Line 16
+ Line 17
+ Line 18
+ Line 19
+ Line 20
+ Line 21
+ Line 22
+ Line 23
+ Line 24
+ Line 25
+ Line 26
+ Line 27
+ Line 28
+ Line 29
+ Line 30
+ Line 31
+ Line 32
+ Line 33
+ Line 34
+ Line 35
+ Line 36
+ Line 37
+ Line 38
+ Line 39
+ Line 40
+ Line 41
+ Line 42
+ Line 43
+ Line 44
+ Line 45
+ Line 46
+ Line 40
+ Line 48
+ Line 49
+ Line 50
+
+ + diff --git a/gfx/layers/apz/test/mochitest/helper_click.html b/gfx/layers/apz/test/mochitest/helper_click.html new file mode 100644 index 000000000..b74f175fe --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_click.html @@ -0,0 +1,41 @@ + + + + + + Sanity mouse-clicking test + + + + + + + + + diff --git a/gfx/layers/apz/test/mochitest/helper_div_pan.html b/gfx/layers/apz/test/mochitest/helper_div_pan.html new file mode 100644 index 000000000..f37be8ba6 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_div_pan.html @@ -0,0 +1,44 @@ + + + + + + Sanity panning test for scrollable div + + + + + + +
+
+ This div makes the |outer| div scrollable. +
+
+
+ This div makes the top-level page scrollable. +
+ + diff --git a/gfx/layers/apz/test/mochitest/helper_drag_click.html b/gfx/layers/apz/test/mochitest/helper_drag_click.html new file mode 100644 index 000000000..cf7117339 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_drag_click.html @@ -0,0 +1,43 @@ + + + + + + Sanity mouse-drag click test + + + + + + + + + diff --git a/gfx/layers/apz/test/mochitest/helper_drag_scroll.html b/gfx/layers/apz/test/mochitest/helper_drag_scroll.html new file mode 100644 index 000000000..3c06a5b7e --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_drag_scroll.html @@ -0,0 +1,603 @@ + + + + + + Dragging the mouse on a content-implemented scrollbar + + + + + + + + +
Drag up and down on this bar. The background/scrollbar shouldn't glitch
+This is a tall page
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+ + + diff --git a/gfx/layers/apz/test/mochitest/helper_iframe1.html b/gfx/layers/apz/test/mochitest/helper_iframe1.html new file mode 100644 index 000000000..047da96bd --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_iframe1.html @@ -0,0 +1,14 @@ + + + + + + + +
+
+
+ + diff --git a/gfx/layers/apz/test/mochitest/helper_iframe2.html b/gfx/layers/apz/test/mochitest/helper_iframe2.html new file mode 100644 index 000000000..fee3883e9 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_iframe2.html @@ -0,0 +1,14 @@ + + + + + + + +
+
+
+ + diff --git a/gfx/layers/apz/test/mochitest/helper_iframe_pan.html b/gfx/layers/apz/test/mochitest/helper_iframe_pan.html new file mode 100644 index 000000000..47213f33a --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_iframe_pan.html @@ -0,0 +1,41 @@ + + + + + + Sanity panning test for scrollable div + + + + + + + +
+ This div makes the top-level page scrollable. +
+ + diff --git a/gfx/layers/apz/test/mochitest/helper_long_tap.html b/gfx/layers/apz/test/mochitest/helper_long_tap.html new file mode 100644 index 000000000..604d03d64 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_long_tap.html @@ -0,0 +1,81 @@ + + + + + + Ensure we get a touch-cancel after a contextmenu comes up + + + + + + + Link to nowhere + + diff --git a/gfx/layers/apz/test/mochitest/helper_scroll_inactive_perspective.html b/gfx/layers/apz/test/mochitest/helper_scroll_inactive_perspective.html new file mode 100644 index 000000000..da866c1ce --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_scroll_inactive_perspective.html @@ -0,0 +1,46 @@ + + + Wheel-scrolling over inactive subframe with perspective + + + + + + + +
+
+
+
+ + diff --git a/gfx/layers/apz/test/mochitest/helper_scroll_inactive_zindex.html b/gfx/layers/apz/test/mochitest/helper_scroll_inactive_zindex.html new file mode 100644 index 000000000..763aaf92b --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_scroll_inactive_zindex.html @@ -0,0 +1,47 @@ + + + Wheel-scrolling over inactive subframe with z-index + + + + + + + +
+
+
+
+ + diff --git a/gfx/layers/apz/test/mochitest/helper_scroll_on_position_fixed.html b/gfx/layers/apz/test/mochitest/helper_scroll_on_position_fixed.html new file mode 100644 index 000000000..b9d187faf --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_scroll_on_position_fixed.html @@ -0,0 +1,62 @@ + + + Wheel-scrolling over position:fixed and position:sticky elements, in the top-level document as well as iframes + + + + + + +
sticky
+
fixed
+ + +
+
scrollable content inside a fixed-pos item
+
+ + diff --git a/gfx/layers/apz/test/mochitest/helper_scrollto_tap.html b/gfx/layers/apz/test/mochitest/helper_scrollto_tap.html new file mode 100644 index 000000000..fc444f2b7 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_scrollto_tap.html @@ -0,0 +1,61 @@ + + + + + + Sanity touch-tapping test + + + + + + +
spacer
+ + + diff --git a/gfx/layers/apz/test/mochitest/helper_subframe_style.css b/gfx/layers/apz/test/mochitest/helper_subframe_style.css new file mode 100644 index 000000000..5af964080 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_subframe_style.css @@ -0,0 +1,15 @@ +body { + height: 500px; +} + +.inner-frame { + margin-top: 50px; /* this should be at least 30px */ + height: 200%; + width: 75%; + overflow: scroll; +} +.inner-content { + height: 200%; + width: 200%; + background: repeating-linear-gradient(#EEE, #EEE 100px, #DDD 100px, #DDD 200px); +} diff --git a/gfx/layers/apz/test/mochitest/helper_tall.html b/gfx/layers/apz/test/mochitest/helper_tall.html new file mode 100644 index 000000000..7fde795fd --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_tall.html @@ -0,0 +1,504 @@ + + +This is a tall page
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+ + diff --git a/gfx/layers/apz/test/mochitest/helper_tap.html b/gfx/layers/apz/test/mochitest/helper_tap.html new file mode 100644 index 000000000..6fde9387d --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_tap.html @@ -0,0 +1,32 @@ + + + + + + Sanity touch-tapping test + + + + + + + + + diff --git a/gfx/layers/apz/test/mochitest/helper_tap_fullzoom.html b/gfx/layers/apz/test/mochitest/helper_tap_fullzoom.html new file mode 100644 index 000000000..494363b9c --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_tap_fullzoom.html @@ -0,0 +1,33 @@ + + + + + + Sanity touch-tapping test with fullzoom + + + + + + + + + diff --git a/gfx/layers/apz/test/mochitest/helper_tap_passive.html b/gfx/layers/apz/test/mochitest/helper_tap_passive.html new file mode 100644 index 000000000..dc3d85ed2 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_tap_passive.html @@ -0,0 +1,64 @@ + + + + + + Ensure APZ doesn't wait for passive listeners + + + + + + + Link to nowhere + + diff --git a/gfx/layers/apz/test/mochitest/helper_touch_action.html b/gfx/layers/apz/test/mochitest/helper_touch_action.html new file mode 100644 index 000000000..4495dc76e --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_touch_action.html @@ -0,0 +1,115 @@ + + + + + + Sanity touch-action test + + + + + + +
+ This div makes the page scrollable on both axes.
+ This is the second line of text.
+ This is the third line of text.
+ This is the fourth line of text. +
+ +
+ + diff --git a/gfx/layers/apz/test/mochitest/helper_touch_action_complex.html b/gfx/layers/apz/test/mochitest/helper_touch_action_complex.html new file mode 100644 index 000000000..11d6e66e1 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_touch_action_complex.html @@ -0,0 +1,143 @@ + + + + + + Complex touch-action test + + + + + + +
+
+
+ + + + +
+ + diff --git a/gfx/layers/apz/test/mochitest/helper_touch_action_regions.html b/gfx/layers/apz/test/mochitest/helper_touch_action_regions.html new file mode 100644 index 000000000..cbd4cd61d --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_touch_action_regions.html @@ -0,0 +1,246 @@ + + + + + + Test to ensure APZ doesn't always wait for touch-action + + + + + + +
+
+ This is a colored div that will move on the screen as the scroller scrolls. +
+
+ This is a large div to make the scroller scrollable. +
+ + diff --git a/gfx/layers/apz/test/mochitest/mochitest.ini b/gfx/layers/apz/test/mochitest/mochitest.ini new file mode 100644 index 000000000..09e62428c --- /dev/null +++ b/gfx/layers/apz/test/mochitest/mochitest.ini @@ -0,0 +1,67 @@ +[DEFAULT] + support-files = + apz_test_native_event_utils.js + apz_test_utils.js + helper_basic_pan.html + helper_bug982141.html + helper_bug1151663.html + helper_bug1162771.html + helper_bug1271432.html + helper_bug1280013.html + helper_bug1285070.html + helper_bug1299195.html + helper_click.html + helper_div_pan.html + helper_drag_click.html + helper_drag_scroll.html + helper_iframe_pan.html + helper_iframe1.html + helper_iframe2.html + helper_long_tap.html + helper_scroll_inactive_perspective.html + helper_scroll_inactive_zindex.html + helper_scroll_on_position_fixed.html + helper_scrollto_tap.html + helper_subframe_style.css + helper_tall.html + helper_tap.html + helper_tap_fullzoom.html + helper_tap_passive.html + helper_touch_action.html + helper_touch_action_regions.html + helper_touch_action_complex.html + tags = apz +[test_bug982141.html] +[test_bug1151663.html] +[test_bug1151667.html] + skip-if = (os == 'android') # wheel events not supported on mobile +[test_bug1253683.html] + skip-if = (os == 'android') # wheel events not supported on mobile +[test_bug1277814.html] + skip-if = (os == 'android') # wheel events not supported on mobile +[test_bug1304689.html] +[test_bug1304689-2.html] +[test_frame_reconstruction.html] +[test_group_mouseevents.html] + skip-if = (toolkit == 'android') # mouse events not supported on mobile +[test_group_pointerevents.html] +[test_group_touchevents.html] +[test_group_wheelevents.html] + skip-if = (toolkit == 'android') # wheel events not supported on mobile +[test_group_zoom.html] + skip-if = (toolkit != 'android') # only android supports zoom +[test_interrupted_reflow.html] +[test_layerization.html] + skip-if = (os == 'android') # wheel events not supported on mobile +[test_scroll_inactive_bug1190112.html] + skip-if = (os == 'android') # wheel events not supported on mobile +[test_scroll_inactive_flattened_frame.html] + skip-if = (os == 'android') # wheel events not supported on mobile +[test_scroll_subframe_scrollbar.html] + skip-if = (os == 'android') # wheel events not supported on mobile +[test_touch_listeners_impacting_wheel.html] + skip-if = (toolkit == 'android') || (toolkit == 'cocoa') # wheel events not supported on mobile, and synthesized wheel smooth-scrolling not supported on OS X +[test_wheel_scroll.html] + skip-if = (os == 'android') # wheel events not supported on mobile +[test_wheel_transactions.html] + skip-if = (os == 'android') # wheel events not supported on mobile diff --git a/gfx/layers/apz/test/mochitest/test_bug1151663.html b/gfx/layers/apz/test/mochitest/test_bug1151663.html new file mode 100644 index 000000000..10810c6ca --- /dev/null +++ b/gfx/layers/apz/test/mochitest/test_bug1151663.html @@ -0,0 +1,38 @@ + + + + + + Test for Bug 1151663 + + + + + + + Mozilla Bug 1151663 + + diff --git a/gfx/layers/apz/test/mochitest/test_bug1151667.html b/gfx/layers/apz/test/mochitest/test_bug1151667.html new file mode 100644 index 000000000..88facf6e9 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/test_bug1151667.html @@ -0,0 +1,65 @@ + + + + + Test for Bug 1151667 + + + + + + + + + +Mozilla Bug 1151667 +

+
+ +
+
+ +
+
+
+
+ + diff --git a/gfx/layers/apz/test/mochitest/test_bug1253683.html b/gfx/layers/apz/test/mochitest/test_bug1253683.html new file mode 100644 index 000000000..52c8e4a96 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/test_bug1253683.html @@ -0,0 +1,59 @@ + + + + + Test to ensure non-scrollable frames don't get layerized + + + + + + + + +

+
+
sample code here
+
spacer to make the 'container' div the root scrollable element
+
+
+
+
+ + diff --git a/gfx/layers/apz/test/mochitest/test_bug1277814.html b/gfx/layers/apz/test/mochitest/test_bug1277814.html new file mode 100644 index 000000000..877286468 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/test_bug1277814.html @@ -0,0 +1,106 @@ + + + + + + Test for Bug 1277814 + + + + + + + + + + +
+ CoolCmd
CoolCmd
CoolCmd
CoolCmd
+ CoolCmd
CoolCmd
CoolCmd
CoolCmd
+ CoolCmd
CoolCmd
CoolCmd
CoolCmd
+ CoolCmd
CoolCmd
CoolCmd
CoolCmd
+ CoolCmd
CoolCmd
CoolCmd
CoolCmd
+ + + diff --git a/gfx/layers/apz/test/mochitest/test_bug1304689-2.html b/gfx/layers/apz/test/mochitest/test_bug1304689-2.html new file mode 100644 index 000000000..356d7bcb3 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/test_bug1304689-2.html @@ -0,0 +1,131 @@ + + + + + + Test for Bug 1285070 + + + + + + + + +
+
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+
+
+ + diff --git a/gfx/layers/apz/test/mochitest/test_bug1304689.html b/gfx/layers/apz/test/mochitest/test_bug1304689.html new file mode 100644 index 000000000..a64f8a34e --- /dev/null +++ b/gfx/layers/apz/test/mochitest/test_bug1304689.html @@ -0,0 +1,135 @@ + + + + + + Test for Bug 1285070 + + + + + + + + +
+
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+ this is some scrollable text.
+ this is a second line to make the scrolling more obvious.
+ and a third for good measure.
+
+
+ + diff --git a/gfx/layers/apz/test/mochitest/test_bug982141.html b/gfx/layers/apz/test/mochitest/test_bug982141.html new file mode 100644 index 000000000..9984b79ff --- /dev/null +++ b/gfx/layers/apz/test/mochitest/test_bug982141.html @@ -0,0 +1,38 @@ + + + + + + Test for Bug 982141 + + + + + + + Mozilla Bug 982141 + + diff --git a/gfx/layers/apz/test/mochitest/test_frame_reconstruction.html b/gfx/layers/apz/test/mochitest/test_frame_reconstruction.html new file mode 100644 index 000000000..589fb2843 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/test_frame_reconstruction.html @@ -0,0 +1,218 @@ + + + + + Test for bug 1235899 + + + + + + + + + +Mozilla Bug 1235899 +

+
+

You should be able to fling this list without it stopping abruptly

+
+
+
    +
  1. Some text
  2. +
  3. Some text
  4. +
  5. Some text
  6. +
  7. Some text
  8. +
  9. Some text
  10. +
  11. Some text
  12. +
  13. Some text
  14. +
  15. Some text
  16. +
  17. Some text
  18. +
  19. Some text
  20. +
  21. Some text
  22. +
  23. Some text
  24. +
  25. Some text
  26. +
  27. Some text
  28. +
  29. Some text
  30. +
  31. Some text
  32. +
  33. Some text
  34. +
  35. Some text
  36. +
  37. Some text
  38. +
  39. Some text
  40. +
  41. Some text
  42. +
  43. Some text
  44. +
  45. Some text
  46. +
  47. Some text
  48. +
  49. Some text
  50. +
  51. Some text
  52. +
  53. Some text
  54. +
  55. Some text
  56. +
  57. Some text
  58. +
  59. Some text
  60. +
  61. Some text
  62. +
  63. Some text
  64. +
  65. Some text
  66. +
  67. Some text
  68. +
  69. Some text
  70. +
  71. Some text
  72. +
  73. Some text
  74. +
  75. Some text
  76. +
  77. Some text
  78. +
  79. Some text
  80. +
  81. Some text
  82. +
  83. Some text
  84. +
  85. Some text
  86. +
  87. Some text
  88. +
  89. Some text
  90. +
  91. Some text
  92. +
  93. Some text
  94. +
  95. Some text
  96. +
  97. Some text
  98. +
  99. Some text
  100. +
  101. Some text
  102. +
  103. Some text
  104. +
  105. Some text
  106. +
  107. Some text
  108. +
  109. Some text
  110. +
  111. Some text
  112. +
  113. Some text
  114. +
  115. Some text
  116. +
  117. Some text
  118. +
  119. Some text
  120. +
  121. Some text
  122. +
  123. Some text
  124. +
  125. Some text
  126. +
  127. Some text
  128. +
  129. Some text
  130. +
  131. Some text
  132. +
  133. Some text
  134. +
  135. Some text
  136. +
  137. Some text
  138. +
  139. Some text
  140. +
  141. Some text
  142. +
  143. Some text
  144. +
  145. Some text
  146. +
  147. Some text
  148. +
  149. Some text
  150. +
  151. Some text
  152. +
  153. Some text
  154. +
  155. Some text
  156. +
  157. Some text
  158. +
  159. Some text
  160. +
  161. Some text
  162. +
  163. Some text
  164. +
  165. Some text
  166. +
  167. Some text
  168. +
  169. Some text
  170. +
  171. Some text
  172. +
  173. Some text
  174. +
  175. Some text
  176. +
  177. Some text
  178. +
  179. Some text
  180. +
  181. Some text
  182. +
  183. Some text
  184. +
  185. Some text
  186. +
  187. Some text
  188. +
  189. Some text
  190. +
  191. Some text
  192. +
  193. Some text
  194. +
  195. Some text
  196. +
  197. Some text
  198. +
  199. Some text
  200. +
  201. Some text
  202. +
  203. Some text
  204. +
+
+
+
+ +
+
+
+
diff --git a/gfx/layers/apz/test/mochitest/test_group_mouseevents.html b/gfx/layers/apz/test/mochitest/test_group_mouseevents.html
new file mode 100644
index 000000000..dcf71f0cc
--- /dev/null
+++ b/gfx/layers/apz/test/mochitest/test_group_mouseevents.html
@@ -0,0 +1,35 @@
+
+
+
+  
+  Various mouse tests that spawn in new windows
+  
+  
+  
+  
+
+
+
+
diff --git a/gfx/layers/apz/test/mochitest/test_group_pointerevents.html b/gfx/layers/apz/test/mochitest/test_group_pointerevents.html
new file mode 100644
index 000000000..2e8d7c240
--- /dev/null
+++ b/gfx/layers/apz/test/mochitest/test_group_pointerevents.html
@@ -0,0 +1,31 @@
+
+
+
+
+  
+  Test for Bug 1285070
+  
+  
+  
+  
+
+
+
+
diff --git a/gfx/layers/apz/test/mochitest/test_group_touchevents.html b/gfx/layers/apz/test/mochitest/test_group_touchevents.html
new file mode 100644
index 000000000..bc0261d46
--- /dev/null
+++ b/gfx/layers/apz/test/mochitest/test_group_touchevents.html
@@ -0,0 +1,104 @@
+
+
+
+  
+  Various touch tests that spawn in new windows
+  
+  
+  
+  
+  
+
+
+
+
diff --git a/gfx/layers/apz/test/mochitest/test_group_wheelevents.html b/gfx/layers/apz/test/mochitest/test_group_wheelevents.html
new file mode 100644
index 000000000..98c36f320
--- /dev/null
+++ b/gfx/layers/apz/test/mochitest/test_group_wheelevents.html
@@ -0,0 +1,41 @@
+
+
+
+  
+  Various wheel-scrolling tests that spawn in new windows
+  
+  
+  
+  
+
+
+
+
diff --git a/gfx/layers/apz/test/mochitest/test_group_zoom.html b/gfx/layers/apz/test/mochitest/test_group_zoom.html
new file mode 100644
index 000000000..4bf9c0bed
--- /dev/null
+++ b/gfx/layers/apz/test/mochitest/test_group_zoom.html
@@ -0,0 +1,44 @@
+
+
+
+  
+  Various zoom-related tests that spawn in new windows
+  
+  
+  
+  
+
+
+
+
diff --git a/gfx/layers/apz/test/mochitest/test_interrupted_reflow.html b/gfx/layers/apz/test/mochitest/test_interrupted_reflow.html
new file mode 100644
index 000000000..05c5e5478
--- /dev/null
+++ b/gfx/layers/apz/test/mochitest/test_interrupted_reflow.html
@@ -0,0 +1,719 @@
+
+
+ 
+ 
+  Test for bug 1292781
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+Mozilla Bug 1292781
+

+
+

The frame reconstruction should not leave this scrollframe in a bad state

+
+
+ this is the top of the scrollframe. +
this is a box
+
this is a box
+
this is a box
+
this is a box
+ this is near the top of the scrollframe. +
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+ this is near the bottom of the scrollframe. +
this is a box
+
this is a box
+
this is a box
+
this is a box
+
this is a box
+ this is the bottom of the scrollframe. +
+
+
+ +
+
+
+
diff --git a/gfx/layers/apz/test/mochitest/test_layerization.html b/gfx/layers/apz/test/mochitest/test_layerization.html
new file mode 100644
index 000000000..c74b181bd
--- /dev/null
+++ b/gfx/layers/apz/test/mochitest/test_layerization.html
@@ -0,0 +1,214 @@
+
+
+
+
+  Test for layerization
+  
+  
+  
+  
+  
+  
+  
+  
+
+
+APZ layerization tests
+

+
+
+
+
+
+
+
+
+
+
+
+ + + +
+
+
+
+
+ + diff --git a/gfx/layers/apz/test/mochitest/test_scroll_inactive_bug1190112.html b/gfx/layers/apz/test/mochitest/test_scroll_inactive_bug1190112.html new file mode 100644 index 000000000..3349ef1ab --- /dev/null +++ b/gfx/layers/apz/test/mochitest/test_scroll_inactive_bug1190112.html @@ -0,0 +1,541 @@ + + + + Test scrolling flattened inactive frames + + + + + + + + +
+
+
+
+

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+ +

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+ +

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+ +

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+ +

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+ +

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+ +

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+ +

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+ +

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+ +

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+ +

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+ +

+
+ + + diff --git a/gfx/layers/apz/test/mochitest/test_scroll_inactive_flattened_frame.html b/gfx/layers/apz/test/mochitest/test_scroll_inactive_flattened_frame.html new file mode 100644 index 000000000..51e16aab9 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/test_scroll_inactive_flattened_frame.html @@ -0,0 +1,49 @@ + + + + Test scrolling flattened inactive frames + + + + + + + +
+
+
+
+
+
+ + + diff --git a/gfx/layers/apz/test/mochitest/test_scroll_subframe_scrollbar.html b/gfx/layers/apz/test/mochitest/test_scroll_subframe_scrollbar.html new file mode 100644 index 000000000..4d9da8c2c --- /dev/null +++ b/gfx/layers/apz/test/mochitest/test_scroll_subframe_scrollbar.html @@ -0,0 +1,117 @@ + + + + Test scrolling subframe scrollbars + + + + + + + + +

+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+

+ + + diff --git a/gfx/layers/apz/test/mochitest/test_smoothness.html b/gfx/layers/apz/test/mochitest/test_smoothness.html new file mode 100644 index 000000000..88373957a --- /dev/null +++ b/gfx/layers/apz/test/mochitest/test_smoothness.html @@ -0,0 +1,77 @@ + + + Test Frame Uniformity While Scrolling + + + + + + + + + +
+
+ + diff --git a/gfx/layers/apz/test/mochitest/test_touch_listeners_impacting_wheel.html b/gfx/layers/apz/test/mochitest/test_touch_listeners_impacting_wheel.html new file mode 100644 index 000000000..913269a67 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/test_touch_listeners_impacting_wheel.html @@ -0,0 +1,114 @@ + + + + + Test for Bug 1203140 + + + + + + + + + +Mozilla Bug 1203140 +

+
+

The box below has a touch listener and a passive wheel listener. With touch events disabled, APZ shouldn't wait for any listeners.

+
+
Div to make 'content' scrollable
+
+
+
+
+ + + diff --git a/gfx/layers/apz/test/mochitest/test_wheel_scroll.html b/gfx/layers/apz/test/mochitest/test_wheel_scroll.html new file mode 100644 index 000000000..479478d42 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/test_wheel_scroll.html @@ -0,0 +1,106 @@ + + + + + Test for Bug 1013412 + + + + + + + + + +Mozilla Bug 1161206 +

+
+

Scrolling the page should be async, but scrolling over the dark circle should not scroll the page and instead rotate the white ball.

+
+
+
+
+
+
+
+
+
+ + + diff --git a/gfx/layers/apz/test/mochitest/test_wheel_transactions.html b/gfx/layers/apz/test/mochitest/test_wheel_transactions.html new file mode 100644 index 000000000..e00e992cd --- /dev/null +++ b/gfx/layers/apz/test/mochitest/test_wheel_transactions.html @@ -0,0 +1,137 @@ + + + + + Test for Bug 1175585 + + + + + + + + + +APZ wheel transactions test +

+
+
+
+
+
+
+
+
+ + + -- cgit v1.2.3