зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1501382 - Add a mochitest. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D14285 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
eba436101f
Коммит
3071a667e4
|
@ -0,0 +1,40 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width; initial-scale=1.0">
|
||||||
|
<title>Touch-action on a zero-opacity element</title>
|
||||||
|
<script type="application/javascript" src="apz_test_native_event_utils.js"></script>
|
||||||
|
<script type="application/javascript" src="apz_test_utils.js"></script>
|
||||||
|
<script type="application/javascript" src="/tests/SimpleTest/paint_listener.js"></script>
|
||||||
|
<script type="application/javascript">
|
||||||
|
function* test(testDriver) {
|
||||||
|
var target = document.getElementById('target');
|
||||||
|
|
||||||
|
document.body.addEventListener('touchend', testDriver, { passive: true });
|
||||||
|
|
||||||
|
// drag the page up to scroll down by 50px
|
||||||
|
yield ok(synthesizeNativeTouchDrag(target, 10, 100, 0, -50),
|
||||||
|
"Synthesized native vertical drag, waiting for touch-end event...");
|
||||||
|
|
||||||
|
yield flushApzRepaints(testDriver);
|
||||||
|
|
||||||
|
is(window.scrollX, 0, "X scroll offset didn't change");
|
||||||
|
is(window.scrollY, 0, "Y scroll offset didn't change");
|
||||||
|
}
|
||||||
|
|
||||||
|
waitUntilApzStable()
|
||||||
|
.then(runContinuation(test))
|
||||||
|
.then(subtestDone);
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body style="border: solid 1px green">
|
||||||
|
<div id="spacer" style="height: 2000px">
|
||||||
|
Inside the black border is a zero-opacity touch-action none.
|
||||||
|
<div id="border" style="border: solid 1px black">
|
||||||
|
<div id="target" style="opacity: 0; height: 300px; touch-action: none">this text shouldn't be visible</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -23,8 +23,11 @@ var subtests = [
|
||||||
// Tests that touch-action CSS properties are handled in APZ without waiting
|
// Tests that touch-action CSS properties are handled in APZ without waiting
|
||||||
// on the main-thread, when possible
|
// on the main-thread, when possible
|
||||||
{'file': 'helper_touch_action_regions.html', 'prefs': touch_action_prefs},
|
{'file': 'helper_touch_action_regions.html', 'prefs': touch_action_prefs},
|
||||||
|
// Tests that touch-action inside zero-opacity items are respected
|
||||||
|
{'file': 'helper_touch_action_zero_opacity_bug1500864.html', 'prefs': touch_action_prefs},
|
||||||
|
|
||||||
// Add new subtests to test_group_touch_events-4.html, not this file.
|
// Add new subtests to test_group_touchevents-4.html, not this file (exceptions
|
||||||
|
// may be made for quick-running tests that need the touch-action prefs)
|
||||||
];
|
];
|
||||||
|
|
||||||
if (isApzEnabled()) {
|
if (isApzEnabled()) {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
|
|
||||||
var subtests = [
|
var subtests = [
|
||||||
// touch-action tests with :active::after CSS property
|
// clicking on element with :active::after CSS property
|
||||||
{'file': 'helper_bug1473108.html'},
|
{'file': 'helper_bug1473108.html'},
|
||||||
// Add new subtests here. If this starts timing out because it's taking too
|
// Add new subtests here. If this starts timing out because it's taking too
|
||||||
// long, create a test_group_touchevents-5.html file. Refer to 1423011#c57
|
// long, create a test_group_touchevents-5.html file. Refer to 1423011#c57
|
||||||
|
|
Загрузка…
Ссылка в новой задаче