зеркало из https://github.com/mozilla/pjs.git
Bug 486502 - Dispatch test events only when running mochitest/chrome/browser-chrome, r+sr=roc
This commit is contained in:
Родитель
186f3fc8f1
Коммит
d9e11a8bce
|
@ -246,6 +246,7 @@ user_pref("browser.EULA.override", true);
|
|||
user_pref("javascript.options.jit.content", true);
|
||||
user_pref("gfx.color_management.force_srgb", true);
|
||||
user_pref("network.manage-offline-status", false);
|
||||
user_pref("test.mousescroll", true);
|
||||
user_pref("security.default_personal_cert", "Select Automatically"); // Need to client auth test be w/o any dialogs
|
||||
user_pref("network.http.prompt-temp-redirect", false);
|
||||
user_pref("svg.smil.enabled", true); // Needed for SMIL mochitests until bug 482402 lands
|
||||
|
|
|
@ -609,12 +609,15 @@ void
|
|||
nsMouseWheelTransaction::OnFailToScrollTarget()
|
||||
{
|
||||
NS_PRECONDITION(sTargetFrame, "We don't have mouse scrolling transaction");
|
||||
// This event is used for automated tests, see bug 442774.
|
||||
nsContentUtils::DispatchTrustedEvent(
|
||||
sTargetFrame->GetContent()->GetOwnerDoc(),
|
||||
sTargetFrame->GetContent(),
|
||||
NS_LITERAL_STRING("MozMouseScrollFailed"),
|
||||
PR_TRUE, PR_TRUE);
|
||||
|
||||
if (nsContentUtils::GetBoolPref("test.mousescroll", PR_FALSE)) {
|
||||
// This event is used for automated tests, see bug 442774.
|
||||
nsContentUtils::DispatchTrustedEvent(
|
||||
sTargetFrame->GetContent()->GetOwnerDoc(),
|
||||
sTargetFrame->GetContent(),
|
||||
NS_LITERAL_STRING("MozMouseScrollFailed"),
|
||||
PR_TRUE, PR_TRUE);
|
||||
}
|
||||
// The target frame might be destroyed in the event handler, at that time,
|
||||
// we need to finish the current transaction
|
||||
if (!sTargetFrame)
|
||||
|
@ -634,12 +637,15 @@ nsMouseWheelTransaction::OnTimeout(nsITimer* aTimer, void* aClosure)
|
|||
// We need to finish current transaction before DOM event firing. Because
|
||||
// the next DOM event might create strange situation for us.
|
||||
EndTransaction();
|
||||
// This event is used for automated tests, see bug 442774.
|
||||
nsContentUtils::DispatchTrustedEvent(
|
||||
frame->GetContent()->GetOwnerDoc(),
|
||||
frame->GetContent(),
|
||||
NS_LITERAL_STRING("MozMouseScrollTransactionTimeout"),
|
||||
PR_TRUE, PR_TRUE);
|
||||
|
||||
if (nsContentUtils::GetBoolPref("test.mousescroll", PR_FALSE)) {
|
||||
// This event is used for automated tests, see bug 442774.
|
||||
nsContentUtils::DispatchTrustedEvent(
|
||||
frame->GetContent()->GetOwnerDoc(),
|
||||
frame->GetContent(),
|
||||
NS_LITERAL_STRING("MozMouseScrollTransactionTimeout"),
|
||||
PR_TRUE, PR_TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче