mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 619623 - Disable Idle Service to check if it's related with the intermittent failure.
r=sdwilsh
This commit is contained in:
parent
00c605c6fc
commit
5bab90c7db
@ -37,6 +37,9 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsWidgetsCID.h"
|
||||
#include "nsIComponentRegistrar.h"
|
||||
|
||||
#ifndef TEST_NAME
|
||||
#error "Must #define TEST_NAME before including places_test_harness_tail.h"
|
||||
#endif
|
||||
@ -92,12 +95,31 @@ do_test_finished()
|
||||
gPendingTests--;
|
||||
}
|
||||
|
||||
void
|
||||
disable_idle_service()
|
||||
{
|
||||
(void)fprintf(stderr, TEST_INFO_STR "Disabling Idle Service.\n", TEST_FILE);
|
||||
static NS_DEFINE_IID(kIdleCID, NS_IDLE_SERVICE_CID);
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIFactory> idleFactory = do_GetClassObject(kIdleCID, &rv);
|
||||
do_check_success(rv);
|
||||
nsCOMPtr<nsIComponentRegistrar> registrar;
|
||||
rv = NS_GetComponentRegistrar(getter_AddRefs(registrar));
|
||||
do_check_success(rv);
|
||||
rv = registrar->UnregisterFactory(kIdleCID, idleFactory);
|
||||
do_check_success(rv);
|
||||
}
|
||||
|
||||
int
|
||||
main(int aArgc,
|
||||
char** aArgv)
|
||||
{
|
||||
ScopedXPCOM xpcom(TEST_NAME);
|
||||
|
||||
// Tinderboxes are constantly on idle. Since idle tasks can interact with
|
||||
// tests, causing random failures, disable the idle service.
|
||||
disable_idle_service();
|
||||
|
||||
do_test_pending();
|
||||
run_next_test();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user