Bug 1273654 - Reuse the apz test utils in a few more places. r=botond

MozReview-Commit-ID: 2mV0VzlrKh6
This commit is contained in:
Kartikaya Gupta 2016-05-25 15:31:52 -04:00
Родитель de9de05549
Коммит 52b50801d8
4 изменённых файлов: 12 добавлений и 24 удалений

Просмотреть файл

@ -42,19 +42,13 @@ function recordEvent(e) {
}
}
function registerListeners() {
window.addEventListener('touchstart', recordEvent, { passive: true, capture: true });
window.addEventListener('touchend', recordEvent, { passive: true, capture: true });
window.addEventListener('touchcancel', recordEvent, true);
window.addEventListener('contextmenu', recordEvent, true);
}
window.addEventListener('touchstart', recordEvent, { passive: true, capture: true });
window.addEventListener('touchend', recordEvent, { passive: true, capture: true });
window.addEventListener('touchcancel', recordEvent, true);
window.addEventListener('contextmenu', recordEvent, true);
window.onload = function() {
registerListeners();
waitForAllPaints(function() {
flushApzRepaints(longPressLink);
});
}
waitUntilApzStable()
.then(longPressLink);
</script>
</head>

Просмотреть файл

@ -48,17 +48,11 @@ function recordEvent(e) {
});
}
function registerListeners() {
window.addEventListener('touchstart', recordEvent, { passive: true, capture: true });
window.addEventListener('contextmenu', recordEvent, true);
}
window.addEventListener('touchstart', recordEvent, { passive: true, capture: true });
window.addEventListener('contextmenu', recordEvent, true);
window.onload = function() {
registerListeners();
waitForAllPaints(function() {
flushApzRepaints(longPressLink);
});
}
waitUntilApzStable()
.then(longPressLink);
</script>
</head>

Просмотреть файл

@ -19,7 +19,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1151663
// inside an iframe which means we have no control over the root APZC.
var w = null;
window.onload = function() {
SpecialPowers.pushPrefEnv({"set": [["apz.test.logging_enabled", true]]}, function() {
pushPrefs([["apz.test.logging_enabled", true]]).then(function() {
w = window.open("helper_bug1151663.html", "_blank");
});
};

Просмотреть файл

@ -19,7 +19,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=982141
// inside an iframe which means we have no control over the root APZC.
var w = null;
window.onload = function() {
SpecialPowers.pushPrefEnv({"set": [["apz.test.logging_enabled", true]]}, function() {
pushPrefs([["apz.test.logging_enabled", true]]).then(function() {
w = window.open("helper_bug982141.html", "_blank");
});
};