tests: Support injecting hook functions during pad load

This commit is contained in:
Richard Hansen 2021-10-28 17:36:41 -04:00
parent c8e544ec8d
commit e28c9ffc97
3 changed files with 28 additions and 1 deletions

View file

@ -478,6 +478,10 @@
plugins.baseURL = baseURL;
plugins.update(function () {
// Mechanism for tests to register hook functions (install fake plugins).
window._postPluginUpdateForTestingDone = false;
if (window._postPluginUpdateForTesting != null) window._postPluginUpdateForTesting();
window._postPluginUpdateForTestingDone = true;
// Call documentReady hook
$(function() {
hooks.aCallAll('documentReady');