>># 
>># 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: mvrszwdw.m,v 1.8 92/06/11 16:09:07 rws Exp $
>># 
>>#      SCCS:  @(#)  EWin.mc Rel 1.4	    (7/19/91)
>>#
>>TITLE XMoveResizeWindow CH03
>>ASSERTION A XMoveResizeWindow-1
A call to XMoveResizeWindow moves the window so that the
coordinates of the upper-left outer corner of the window are
x, y relative to the origin of the parent window, and
changes the inside size of the window to width and height.
>>STRATEGY
Create window.
Move and resize with XMoveResizeWindow.
Verify correct size and position with checkarea().
>>ASSERTION A XMoveResizeWindow-2
When a call to XMoveResizeWindow resizes the window, then
the subwindows of the window are repositioned according to
their win-gravity attribute and a GravityNotify event is
generated for each repositioned subwindow after the
ConfigureNotify event.
>>STRATEGY
For each win-gravity attribute (apart from UnmapGravity)
  Create window with subwindows.
  Enable SubstructureNotify|StructureNotify events on all windows.
  Set win-gravity on window.
  Call XMoveResizeWindow to move and resize window.
  Verify window positions by pixel check.
  Verify ConfigureNotify on resized window.
  Verify ConfigureNotify on parent of resized window.
  If NorthWestGravity
    Verify that no gravity events are received.
  else
    Verify GravityNotify events received on each repositioned subwindow.
    Verify gravity events are received on the parent of each subwindow.
  Verify that configure events arrive before gravity events.
>>ASSERTION A XMoveResizeWindow-3
When a call to XMoveResizeWindow resizes the window and the
win-gravity of a subwindow is UnmapGravity and the subwindow
is already mapped, then the subwindow is unmapped without
being moved and an UnmapNotify event is generated.
>>STRATEGY
Create window with subwindows.
Enable events on all subwindows.
Enable events on window.
Set win-gravity to UnmapGravity.
Call XMoveResizeWindow to resize window.
Verify windows are removed from screen.
Verify window positions are unchanged.
Verify that UnmapNotify events received on each subwindow.
Verify that UnmapNotify events received on parent of each subwindow.
>>ASSERTION A XMoveResizeWindow-4
If the server uses the window's bit-gravity attribute: When
a call to XMoveResizeWindow resizes the window, then the
contents of the window are repositioned or discarded
according to the bit-gravity attribute. Otherwise: When a
call to XMoveResizeWindow resizes the window, then contents
of the window are discarded.
>>STRATEGY
For each value of bit-gravity.
  Create window.
  Draw into window.
  Call XMoveResizeWindow to resize window.
  Verify that either:
	Window is clear.
  else
	Contents have been repositioned correctly.
>>ASSERTION A XMoveResizeWindow-5
When the window is a root window, then a call to
XMoveResizeWindow has no effect.
>>STRATEGY
Call XMoveResizeWindow on root window.
Touch test only.
>>ASSERTION A XMoveResizeWindow-6
When the override-redirect attribute of the window is False
and some other client has selected SubstructureRedirectMask
on the parent window, then a ConfigureRequest event is
generated, and the window configuration is not changed.
>>STRATEGY
Create windows.
Set override-redirect to False.
Create second client.
Select SubstructureRedirectMask for second client on parent of window.
Set some parameters.
Call XMoveResizeWindow.
Verify that a ConfigureRequest event is generated.
Verify that window configuration has not changed on the screen.
>>ASSERTION A XMoveResizeWindow-7
When another client has selected ResizeRedirectMask on the
window and the size would be changed, then a ResizeRequest
event is generated and the size is not changed.
>>STRATEGY
Create windows.
Set override-redirect to False.
Create second client.
Select ResizeRedirectMask for second client on window.
Set parameters to move and resize window.
Call XMoveResizeWindow.
Verify that a ResizeRequest event is generated.
Verify that window has not changed size but that other changes have occurred.
>>ASSERTION A XMoveResizeWindow-8
When another client has selected ResizeRedirectMask on the
window and another client has selected
SubstructureRedirectMask on the parent window and the
override-redirect attribute of the window is False, then a
ConfigureRequest event is generated, and the window
configuration is not changed.
>>STRATEGY
Create windows.
Set override-redirect to False.
Create second client.
Select ResizeRedirectMask for second client on window.
Create third client.
Select SubstructureRedirectMask for third client on parent of window.
Call XMoveResizeWindow.
Verify that a ConfigureRequest event is generated for client 3.
Verify that no ResizeRequest event is generated for client 2.
Verify that window configuration is not changed.
>>ASSERTION A XMoveResizeWindow-9
When the configuration actually changes, then a
ConfigureNotify event is generated.
>>STRATEGY
Create windows.
Enable SubstructureNotify events.
Call XMoveResizeWindow such that the window configuration changes.
Verify that a ConfigureNotify event is generated.
Call XMoveResizeWindow again with the same parameters.
Verify that no ConfigureNotify event is generated.
>>ASSERTION A XMoveResizeWindow-10
When a call to XMoveResizeWindow changes the size of the
window, then Expose events are generated for regions that
are newly visible or for which the contents have been lost.
>>STRATEGY
Create windows.
Set test window background to W_BG.
Set up window with setforexpose().
Enable expose events.
Resize window with XMoveResizeWindow.
Verify that correct expose events were received with exposecheck().
>>ASSERTION A XMoveResizeWindow-11
When a call to XMoveResizeWindow uncovers part of any
window that was formerly obscured, then either Expose events
are generated or the contents are restored from backing
store.
>>STRATEGY
Create windows.
Create second client to receive events on.
Call setforexpose() on unobscured window.
Create other windows to partially obscure this window.
Reconfigure window with XMoveResizeWindow, ensuring that first window is now unobscured.
Verify for correct expose or backing store behaviour with exposecheck().
>>ASSERTION A XMoveResizeWindow-12
When the window is moved without changing its size and the
window is mapped and the window is not obscured by non-child
windows, then the current window contents are not lost.
>>STRATEGY
Create window.
Draw pattern in window.
Move window without a size change.
Verify that window contents are unchanged.
>>ASSERTION D XMoveResizeWindow-13
When the window is moved without changing its size and the
window is mapped and backing store is being maintained for
the window, then the current window contents are not lost.
>>STRATEGY
Report UNTESTED
>>ASSERTION A XMoveResizeWindow-14
When width or height is zero, then a BadValue error occurs.
>>STRATEGY
Set width to zero.
Call XMoveResizeWindow.
Verify BadValue error.
Set height to zero.
Call XMoveResizeWindow.
Verify BadValue error.
Set both width and height to zero.
Call XMoveResizeWindow.
Verify BadValue error.
>>ASSERTION A XMoveResizeWindow-15
When a window argument does not name a valid Window, then a
BadWindow error occurs.
>>STRATEGY
Create a bad window by creating and destroying a window.
Call test function using bad window as the window argument.
Verify that a BadWindow error occurs.
