forked from mirrors/gecko-dev
Differential Revision: https://phabricator.services.mozilla.com/D52728 --HG-- rename : layout/base/tests/chrome/chrome_content_integration_window.xul => layout/base/tests/chrome/chrome_content_integration_window.xhtml rename : layout/base/tests/chrome/chrome_over_plugin_window.xul => layout/base/tests/chrome/chrome_over_plugin_window.xhtml rename : layout/base/tests/chrome/default_background_window.xul => layout/base/tests/chrome/default_background_window.xhtml rename : layout/base/tests/chrome/dialog_with_positioning_window.xul => layout/base/tests/chrome/dialog_with_positioning_window.xhtml rename : layout/base/tests/chrome/file_bug1018265.xul => layout/base/tests/chrome/file_bug1018265.xhtml rename : layout/base/tests/chrome/printpreview_bug396024_helper.xul => layout/base/tests/chrome/printpreview_bug396024_helper.xhtml rename : layout/base/tests/chrome/printpreview_bug482976_helper.xul => layout/base/tests/chrome/printpreview_bug482976_helper.xhtml rename : layout/base/tests/chrome/printpreview_helper.xul => layout/base/tests/chrome/printpreview_helper.xhtml rename : layout/base/tests/chrome/test_bug1018265.xul => layout/base/tests/chrome/test_bug1018265.xhtml rename : layout/base/tests/chrome/test_bug1041200.xul => layout/base/tests/chrome/test_bug1041200.xhtml rename : layout/base/tests/chrome/test_bug420499.xul => layout/base/tests/chrome/test_bug420499.xhtml rename : layout/base/tests/chrome/test_bug465448.xul => layout/base/tests/chrome/test_bug465448.xhtml rename : layout/base/tests/chrome/test_bug514660.xul => layout/base/tests/chrome/test_bug514660.xhtml rename : layout/base/tests/chrome/test_bug533845.xul => layout/base/tests/chrome/test_bug533845.xhtml rename : layout/base/tests/chrome/test_bug812817.xul => layout/base/tests/chrome/test_bug812817.xhtml rename : layout/base/tests/chrome/test_chrome_content_integration.xul => layout/base/tests/chrome/test_chrome_content_integration.xhtml rename : layout/base/tests/chrome/test_chrome_over_plugin.xul => layout/base/tests/chrome/test_chrome_over_plugin.xhtml rename : layout/base/tests/chrome/test_css_visibility_propagation.xul => layout/base/tests/chrome/test_css_visibility_propagation.xhtml rename : layout/base/tests/chrome/test_default_background.xul => layout/base/tests/chrome/test_default_background.xhtml rename : layout/base/tests/chrome/test_leaf_layers_partition_browser_window.xul => layout/base/tests/chrome/test_leaf_layers_partition_browser_window.xhtml rename : layout/base/tests/chrome/test_printpreview.xul => layout/base/tests/chrome/test_printpreview.xhtml rename : layout/base/tests/chrome/test_printpreview_bug396024.xul => layout/base/tests/chrome/test_printpreview_bug396024.xhtml rename : layout/base/tests/chrome/test_printpreview_bug482976.xul => layout/base/tests/chrome/test_printpreview_bug482976.xhtml rename : layout/forms/test/bug665540_window.xul => layout/forms/test/bug665540_window.xhtml rename : layout/generic/test/file_bug514732_window.xul => layout/generic/test/file_bug514732_window.xhtml rename : layout/generic/test/test_backspace_delete.xul => layout/generic/test/test_backspace_delete.xhtml rename : layout/generic/test/test_bug469613.xul => layout/generic/test/test_bug469613.xhtml rename : layout/generic/test/test_bug469774.xul => layout/generic/test/test_bug469774.xhtml rename : layout/generic/test/test_bug508115.xul => layout/generic/test/test_bug508115.xhtml rename : layout/generic/test/test_bug514732-2.xul => layout/generic/test/test_bug514732-2.xhtml rename : layout/generic/test/test_bug632379.xul => layout/generic/test/test_bug632379.xhtml rename : layout/inspector/tests/chrome/test_bug467669.xul => layout/inspector/tests/chrome/test_bug467669.xhtml rename : layout/inspector/tests/chrome/test_bug695639.xul => layout/inspector/tests/chrome/test_bug695639.xhtml rename : layout/inspector/tests/chrome/test_bug708874.xul => layout/inspector/tests/chrome/test_bug708874.xhtml rename : layout/inspector/tests/chrome/test_bug727834.xul => layout/inspector/tests/chrome/test_bug727834.xhtml rename : layout/inspector/tests/chrome/test_fontFaceGeneric.xul => layout/inspector/tests/chrome/test_fontFaceGeneric.xhtml rename : layout/inspector/tests/chrome/test_fontFaceRanges.xul => layout/inspector/tests/chrome/test_fontFaceRanges.xhtml rename : layout/inspector/tests/chrome/test_fontFeaturesAPI.xul => layout/inspector/tests/chrome/test_fontFeaturesAPI.xhtml rename : layout/inspector/tests/chrome/test_fontVariationsAPI.xul => layout/inspector/tests/chrome/test_fontVariationsAPI.xhtml rename : layout/style/test/chrome/bug535806-xul.xul => layout/style/test/chrome/bug535806-xul.xhtml rename : layout/style/test/chrome/test_bug1160724.xul => layout/style/test/chrome/test_bug1160724.xhtml rename : layout/style/test/chrome/test_bug418986-2.xul => layout/style/test/chrome/test_bug418986-2.xhtml rename : layout/style/test/chrome/test_bug535806.xul => layout/style/test/chrome/test_bug535806.xhtml rename : layout/xul/test/test_bug1197913.xul => layout/xul/test/test_bug1197913.xhtml rename : layout/xul/test/test_bug159346.xul => layout/xul/test/test_bug159346.xhtml rename : layout/xul/test/test_bug372685.xul => layout/xul/test/test_bug372685.xhtml rename : layout/xul/test/test_bug393970.xul => layout/xul/test/test_bug393970.xhtml rename : layout/xul/test/test_bug398982-1.xul => layout/xul/test/test_bug398982-1.xhtml rename : layout/xul/test/test_bug398982-2.xul => layout/xul/test/test_bug398982-2.xhtml rename : layout/xul/test/test_bug467442.xul => layout/xul/test/test_bug467442.xhtml rename : layout/xul/test/test_bug477754.xul => layout/xul/test/test_bug477754.xhtml rename : layout/xul/test/test_bug703150.xul => layout/xul/test/test_bug703150.xhtml rename : layout/xul/test/test_bug987230.xul => layout/xul/test/test_bug987230.xhtml rename : layout/xul/test/test_popupReflowPos.xul => layout/xul/test/test_popupReflowPos.xhtml rename : layout/xul/test/test_popupSizeTo.xul => layout/xul/test/test_popupSizeTo.xhtml rename : layout/xul/test/test_popupZoom.xul => layout/xul/test/test_popupZoom.xhtml rename : layout/xul/test/test_resizer.xul => layout/xul/test/test_resizer.xhtml rename : layout/xul/test/test_resizer_incontent.xul => layout/xul/test/test_resizer_incontent.xhtml rename : layout/xul/test/test_splitter.xul => layout/xul/test/test_splitter.xhtml rename : layout/xul/test/test_submenuClose.xul => layout/xul/test/test_submenuClose.xhtml rename : layout/xul/test/test_windowminmaxsize.xul => layout/xul/test/test_windowminmaxsize.xhtml rename : layout/xul/test/titledpanelwindow.xul => layout/xul/test/titledpanelwindow.xhtml rename : layout/xul/test/window_resizer.xul => layout/xul/test/window_resizer.xhtml rename : layout/xul/test/window_resizer_element.xul => layout/xul/test/window_resizer_element.xhtml rename : layout/xul/test/windowminmaxsize1.xul => layout/xul/test/windowminmaxsize1.xhtml rename : layout/xul/test/windowminmaxsize10.xul => layout/xul/test/windowminmaxsize10.xhtml rename : layout/xul/test/windowminmaxsize2.xul => layout/xul/test/windowminmaxsize2.xhtml rename : layout/xul/test/windowminmaxsize3.xul => layout/xul/test/windowminmaxsize3.xhtml rename : layout/xul/test/windowminmaxsize4.xul => layout/xul/test/windowminmaxsize4.xhtml rename : layout/xul/test/windowminmaxsize5.xul => layout/xul/test/windowminmaxsize5.xhtml rename : layout/xul/test/windowminmaxsize6.xul => layout/xul/test/windowminmaxsize6.xhtml rename : layout/xul/test/windowminmaxsize7.xul => layout/xul/test/windowminmaxsize7.xhtml rename : layout/xul/test/windowminmaxsize8.xul => layout/xul/test/windowminmaxsize8.xhtml rename : layout/xul/test/windowminmaxsize9.xul => layout/xul/test/windowminmaxsize9.xhtml extra : moz-landing-system : lando
85 lines
2.8 KiB
HTML
85 lines
2.8 KiB
HTML
<?xml version="1.0"?>
|
|
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
|
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
|
|
<!--
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=469613
|
|
-->
|
|
<window title="Mozilla Bug 469613"
|
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
|
|
|
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
|
|
<script src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
|
|
<body xmlns="http://www.w3.org/1999/xhtml">
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=469613">Mozilla Bug 469613</a>
|
|
|
|
<p id="display"></p>
|
|
<div id="content" style="display: none">
|
|
</div>
|
|
</body>
|
|
|
|
<vbox style="height: 100px; overflow: auto;" id="scrollbox">
|
|
<hbox style="height: 200px;"/>
|
|
</vbox>
|
|
|
|
<script class="testbody" type="application/javascript"><![CDATA[
|
|
|
|
/** Test for Bug 469613 **/
|
|
|
|
function doTest() {
|
|
let scrollbox = document.getElementById("scrollbox");
|
|
scrollbox.scrollTop = 0;
|
|
|
|
// Make sure that the "scroll focus" is inside the scrollbox by moving the
|
|
// mouse in the scrollbox.
|
|
synthesizeMouse(scrollbox, 6, 6, { type: "mousemove" });
|
|
synthesizeMouse(scrollbox, 8, 8, { type: "mousemove" });
|
|
|
|
// Now scroll 10px down.
|
|
synthesizeWheel(scrollbox, 10, 10, { deltaY: 10.0, deltaMode: WheelEvent.DOM_DELTA_PIXEL });
|
|
|
|
// Send a 0-delta scroll.
|
|
synthesizeWheel(scrollbox, 10, 10, { deltaY: 0.0, deltaMode: WheelEvent.DOM_DELTA_PIXEL });
|
|
|
|
setTimeout(function() {
|
|
// Check if the 10px were scrolled.
|
|
todo(false, "Starting a 0-delta scroll shouldn't cancel a pending async scroll is disabled, see bug 752786");
|
|
//is(scrollbox.scrollTop, 10, "Starting a 0-delta scroll shouldn't cancel a pending async scroll.");
|
|
|
|
// Second test
|
|
scrollbox.scrollTop = 20;
|
|
|
|
// Start an async scroll to 30.
|
|
synthesizeWheel(scrollbox, 10, 10, { deltaY: 10.0, deltaMode: WheelEvent.DOM_DELTA_PIXEL });
|
|
|
|
// Start a sync scroll to 30.
|
|
scrollbox.scrollTop = 30;
|
|
|
|
is(scrollbox.scrollTop, 30, "Setting scrollTop should have immediate effect, even if there was a pending async scroll to the same position.");
|
|
|
|
|
|
// Third test
|
|
scrollbox.scrollTop = 40;
|
|
|
|
// Start an async scroll to 50.
|
|
synthesizeWheel(scrollbox, 10, 10, { deltaY: 10.0, deltaMode: WheelEvent.DOM_DELTA_PIXEL });
|
|
|
|
// Cancel the async scroll.
|
|
scrollbox.scrollTop = 40;
|
|
|
|
// Send a 0-delta scroll.
|
|
synthesizeWheel(scrollbox, 10, 10, { deltaY: 0.0, deltaMode: WheelEvent.DOM_DELTA_PIXEL });
|
|
|
|
setTimeout(function() {
|
|
is(scrollbox.scrollTop, 40, "Canceling an async scroll should reset the point of reference for relative scrolls (mDestinationX/Y).");
|
|
|
|
SimpleTest.finish();
|
|
}, 0);
|
|
}, 0);
|
|
}
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
addLoadEvent(() => setTimeout(doTest, 0));
|
|
|
|
]]></script>
|
|
|
|
</window>
|