>># 
>># Copyright 1990, 1991 by the Massachusetts Institute of Technology and
>># UniSoft Group Limited.
>># 
>># Permission to use, copy, modify, distribute, and sell this software and
>># its documentation for any purpose is hereby granted without fee,
>># provided that the above copyright notice appear in all copies and that
>># both that copyright notice and this permission notice appear in
>># supporting documentation, and that the names of MIT and UniSoft not be
>># used in advertising or publicity pertaining to distribution of the
>># software without specific, written prior permission.  MIT and UniSoft
>># make no representations about the suitability of this software for any
>># purpose.  It is provided "as is" without express or implied warranty.
>># 
>># $XConsortium: sync.m,v 1.9 92/06/11 17:25:59 rws Exp $
>># 
>>#
>>TITLE XSync CH08
>>ASSERTION B XSync-1
A call to XSync flushes the output buffer and waits until
all requests have been received and processed by the X
server.
>>STRATEGY
Report UNTESTED
>>ASSERTION A XSync-2
A call to XSync calls the client's error handling routine
for each error event received.
>>STRATEGY
Create client1.
Create pixmap with client1.
Create client2.
Call XFreePixmap from client2.
Call XSync from client2 to insure all potential errors arrive.
Verify that an error was received.
>>ASSERTION A XSync-3
During a call to XSync, any events generated by the X
server are enqueued into the client's event queue.
>>STRATEGY
Create client1.
Create window with client1.
Select MapNotify events with client1 on this window.
Create client2.
Select MapNotify events with client2 on this window.
Call XFlush with client1 to insure server has received create
window request before client2 requests which reference the window.
Call XFlush with client2 to insure server has received select
request before the event is generated.
Map window.
Call XSync for client1.
Verify that there are no errors.
Verify that client1 was delivered expected event.
Call XSync for client2.
Verify that there are no errors.
Verify that client2 was delivered expected event.
>>ASSERTION - XSync-4
A call to XSync with discard set to False does not discard
the events in the queue.
>>ASSERTION A XSync-5
A call to XSync with discard set to True discards all
events in the queue.
>>STRATEGY
Create client1.
Create window with client1.
Select MapNotify events with client1 on this window.
Create client2.
Select MapNotify events with client2 on this window.
Map window.
Call XSync for client1.
Verify that client1 was not delivered MapNotify event.
Call XSync for client2.
Verify that client2 was not delivered MapNotify event.
