>># 
>># 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: rszwdw.m,v 1.6 92/06/11 16:10:17 rws Exp $
>># 
>>#      SCCS:  @(#)  EWin.mc Rel 1.4	    (7/19/91)
>>#
>>TITLE XResizeWindow CH03
>>ASSERTION A XResizeWindow-1
A call to XResizeWindow changes the inside size of the
specified window to width and height.
>>STRATEGY
Create test window with background of W_FG.
Set width and height.
Call XResizeWindow.
Verify new size on screen with checkarea().
>>ASSERTION A XResizeWindow-2
When a call to XResizeWindow actually changes the size of
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 XResizeWindow to resize window.
  Verify window positions by pixel check.
  Verify ConfigureNotify on resized window.
  Verify ConfigureNotify on parent of resized window.
  If NorthWestGravity || StaticGravity
    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 XResizeWindow-3
When a call to XResizeWindow actually changes the size of
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 XResizeWindow 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 XResizeWindow-4
If the server uses the window's bit-gravity attribute: When
a call to XResizeWindow actually changes the size of the
window, then the contents of the window are repositioned or
discarded according to the bit-gravity attribute. Otherwise:
When a call to XResizeWindow actually changes the size of
the window, then the contents of the window are discarded.
>>STRATEGY
For each value of bit-gravity.
  Create window.
  Draw into window.
  Call XResizeWindow to resize window.
  Verify that either:
	Window is clear.
  else
	Contents have been repositioned correctly.
>>ASSERTION A XResizeWindow-5
When the window is a root window, then a call to
XResizeWindow has no effect.
>>STRATEGY
Call XResizeWindow on root window.
Touch test only.
>>ASSERTION A XResizeWindow-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 size is not changed.
>>STRATEGY
Create windows.
Set override-redirect to False.
Create second client.
Select SubstructureRedirectMask for second client on parent of window.
Call XResizeWindow.
Verify that a ConfigureRequest event is generated.
Verify that window configuration has not changed on the screen.
>>ASSERTION A XResizeWindow-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 XResizeWindow.
Verify that a ResizeRequest event is generated.
Verify that window has not changed size but that other changes have occurred.
>>ASSERTION A XResizeWindow-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 size 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 XResizeWindow.
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 XResizeWindow-9
When the size actually changes, then a ConfigureNotify
event is generated.
>>STRATEGY
Create windows.
Enable SubstructureNotify events.
Call XResizeWindow such that the window configuration changes.
Verify that a ConfigureNotify event is generated.
Call XResizeWindow again with the same parameters.
Verify that no ConfigureNotify event is generated.
>>ASSERTION A XResizeWindow-10
When a call to XResizeWindow actually 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 XResizeWindow.
Verify that correct expose events were received with exposecheck().
>>ASSERTION A XResizeWindow-11
When a call to XResizeWindow 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 window.
Call setforexpose() on unobscured window.
Create second window to partially obscure this window.
Create second client to receive events on.
Resize window with XResizeWindow, ensuring that first window is now unobscured.
Verify for correct expose or backing store behaviour with exposecheck().
>>ASSERTION A XResizeWindow-12
When width or height is zero, then a BadValue error occurs.
>>STRATEGY
Create a test window.
Call XResizeWindow with width of zero.
Verify a BadValue error occurred.
Call XResizeWindow with height of zero.
Verify a BadValue error occurred.
Call XResizeWindow with height and width of zero.
Verify a BadValue error occurred.
>>ASSERTION A XResizeWindow-13
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.
