/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
// Make sure to run any events just dispatched from mTarget to main thread // before continuing on to the next test.
NS_ProcessPendingEvents(nullptr);
}
TEST_F(StateMirroringTest, MirrorInitiatedEventOrdering) { // Note that this requires the tail dispatcher, which is not available until // we are processing events.
ASSERT_FALSE(AbstractThread::GetCurrent()->IsTailDispatcherAvailable());
// This will ensure the tail dispatcher fires to dispatch the group // runnable holding the Mirror::Connect task, before we continue the // test.
MOZ_ALWAYS_SUCCEEDS(NS_DispatchAndSpinEventLoopUntilComplete( "NeedTailDispatcher"_ns, GetCurrentSerialEventTarget(),
NS_NewRunnableFunction(__func__, [&] { // Show that mirroring does not take effect until async init is // done.
TEST_F(StateMirroringTest, CanonicalInitiatedEventOrdering) { // Note that this requires the tail dispatcher, which is not available until // we are processing events.
ASSERT_FALSE(AbstractThread::GetCurrent()->IsTailDispatcherAvailable());
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.