graphicsapitest/graphicssvs/wserv/scripts/GRAPHICS-WSERV-WsGraphicBitmap-PublicApi.script
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 //
       
     2 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 // All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of "Eclipse Public License v1.0"
       
     6 // which accompanies this distribution, and is available
       
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 //
       
     9 // Initial Contributors:
       
    10 // Nokia Corporation - initial contribution.
       
    11 //
       
    12 // Contributors:
       
    13 //
       
    14 // Description:
       
    15 //
       
    16 //! @file
       
    17 //! @SYMTestSuiteName		GRAPHICS-WSERV-WsGraphicBitmap-PublicApi
       
    18 //! @SYMScriptTestEnvironment	This test script requires a basic ROM.
       
    19 
       
    20 ///////////////////////////////////////////////////////////////////////////////
       
    21 // GRAPHICS-WSERV-WsGraphicBitmap-PublicApi.script
       
    22 //
       
    23 // Tests all public elements of the CWsGraphic class
       
    24 // as a means of confidence that the API works as expected.
       
    25 //
       
    26 // The purpose is to provide a regression test suite of PublishedAll APIs for
       
    27 // CWsGraphicBitmap related classes.
       
    28 // Negative testing is performed to confirm that correct errors are returned
       
    29 // when incorrect parameters are given.
       
    30 //
       
    31 // The tests are fully automated.
       
    32 ///////////////////////////////////////////////////////////////////////////////
       
    33 
       
    34 
       
    35 LOAD_SUITE	T_GraphicsWservAPI
       
    36 
       
    37 
       
    38 // ****************************************************************************
       
    39 // CWsGraphicBitmap
       
    40 // ****************************************************************************
       
    41 
       
    42 
       
    43 START_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0001
       
    44 //! @SYMTestCaseID		GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0001
       
    45 //! @SYMAPI			CWsGraphicBitmap
       
    46 //! @SYMAuthor			Victor Liu
       
    47 //! @SYMCreationDate		06/02/2007
       
    48 //! @SYMTestCaseDesc		NewL(const CFbsBitmap *aBitmap, const CFbsBitmap *aMask): to construct a piece of transient graphic artwork
       
    49 //!				Uses API elements: RWsSession:Connect, CFbsBitmap::Load, CWsGraphic::Id
       
    50 //! @SYMTestActions		1.	Create and connect a RWsSession
       
    51 //!				2.	Create and load CFbsBitmap for both the source bitmap and the mask bitmap
       
    52 //!				3.	Execute CWsGraphicBitmap::NewL() to construct a piece of transient graphic artwork
       
    53 //!				4.	Use Id() to check the constructed CWsGraphic object with non-zero transient
       
    54 //!				5.	Destruct and close all objects used
       
    55 //! @SYMTestStatus		Implemented
       
    56 //! @SYMTestPriority		Medium
       
    57 //! @SYMTestExpectedResults	1.	Transient CWsGraphic object was constructed without causing panic
       
    58 //!				2.	The constructed CWsGraphic object with transient id != 0
       
    59 //! @SYMTestType		CIT
       
    60 	START_TEST_BLOCK	10			T_GraphicsWservAPI	\graphics\GRAPHICS-WSERV-WsGraphicBitmap-PublicApi.ini
       
    61 		CREATE_OBJECT	RWsSession		ws
       
    62 		CREATE_OBJECT	CFbsBitmap		fbsbmp
       
    63 		CREATE_OBJECT	CFbsBitmap		fbsmaskbmp
       
    64 		CREATE_OBJECT	CWsGraphicBitmap	wsgraph
       
    65 		COMMAND		ws			new
       
    66 		COMMAND		ws			Connect
       
    67 		COMMAND		fbsbmp			new
       
    68 		COMMAND		fbsbmp			Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0001-0001-Load_command05
       
    69 		COMMAND		fbsmaskbmp		new
       
    70 		COMMAND		fbsmaskbmp		Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0001-0001-Load_command08
       
    71 		COMMAND		wsgraph			NewL			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0001-0001-NewL_command10
       
    72 		COMMAND		wsgraph			Id			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0001-0001-Id_command11
       
    73 		COMMAND		wsgraph			~
       
    74 		COMMAND		fbsmaskbmp		~
       
    75 		COMMAND		fbsbmp			~
       
    76 		COMMAND		ws			Close
       
    77 	END_TEST_BLOCK
       
    78 END_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0001
       
    79 
       
    80 
       
    81 START_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0002
       
    82 //! @SYMTestCaseID		GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0002
       
    83 //! @SYMAPI			CWsGraphicBitmap
       
    84 //! @SYMAuthor			Victor Liu
       
    85 //! @SYMCreationDate		14/02/2007
       
    86 //! @SYMTestCaseDesc		NewL(TUid aUid, const CFbsBitmap *aBitmap, const CFbsBitmap *aMask) to construct a piece of non-transient graphic artwork
       
    87 //!				Uses API elements: RWsSession:Connect, CFbsBitmap::Load, CWsGraphic::Id
       
    88 //! @SYMTestActions		1.	Create and connect a RWsSession
       
    89 //!				2.	Create and load CFbsBitmap for both the source bitmap and the mask bitmap
       
    90 //!				3.	Execute CWsGraphicBitmap::NewL() to construct a piece of non-transient graphic artwork
       
    91 //!				4.	Use Id() to check the uid of the CWsGraphic object as specified in construction
       
    92 //!				5.	Destruct and close all objects used
       
    93 //! @SYMTestStatus		Implemented
       
    94 //! @SYMTestPriority		Medium
       
    95 //! @SYMTestExpectedResults	1.	Non-transient CWsGraphic object was created without causing panic
       
    96 //!				2.	The constructed CWsGraphic object with uid (non-transient id) as specified (98765)
       
    97 //! @SYMTestType		CIT
       
    98 	START_TEST_BLOCK	10			T_GraphicsWservAPI	\graphics\GRAPHICS-WSERV-WsGraphicBitmap-PublicApi.ini
       
    99 		CREATE_OBJECT	RWsSession		ws
       
   100 		CREATE_OBJECT	CFbsBitmap		fbsbmp
       
   101 		CREATE_OBJECT	CFbsBitmap		fbsmaskbmp
       
   102 		CREATE_OBJECT	CWsGraphicBitmap	wsgraph
       
   103 		COMMAND		ws			new
       
   104 		COMMAND		ws			Connect
       
   105 		COMMAND		fbsbmp			new
       
   106 		COMMAND		fbsbmp			Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0002-0001-Load_command05
       
   107 		COMMAND		fbsmaskbmp		new
       
   108 		COMMAND		fbsmaskbmp		Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0002-0001-Load_command08
       
   109 		COMMAND		wsgraph			NewL			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0002-0001-NewL_command10
       
   110 		COMMAND		wsgraph			Id			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0002-0001-Id_command11
       
   111 		COMMAND		wsgraph			~
       
   112 		COMMAND		fbsmaskbmp		~
       
   113 		COMMAND		fbsbmp			~
       
   114 		COMMAND		ws			Close
       
   115 	END_TEST_BLOCK
       
   116 END_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0002
       
   117 
       
   118 
       
   119 START_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0003
       
   120 //! @SYMTestCaseID		GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0003
       
   121 //! @SYMAPI			CWsGraphicBitmap
       
   122 //! @SYMAuthor			Victor Liu
       
   123 //! @SYMCreationDate		18/05/2007
       
   124 //! @SYMTestCaseDesc		NewL(const TWsGraphicId &aReplace, const CFbsBitmap *aBitmap, const CFbsBitmap *aMask): to replace a non-transient artwork with new data/bitmap
       
   125 //!				Uses API elements: RWsSession:Connect, CFbsBitmap::Load, CWsGraphic::Id, CWsGraphicBitmap::NewL
       
   126 //! @SYMTestActions		1.	Create and connect a RWsSession
       
   127 //!				2.	Create and load CFbsBitmap for both the source bitmap and the mask bitmap
       
   128 //!				3.	Use NewL() to construct a non-transient graphic artwork
       
   129 //!				4.	Use Id to check if the graphic artwork is created with the uid as specified
       
   130 //!				5.	Create and load another CFbsBitmap for the new source bitmap (to replace the old one)
       
   131 //!				6.	Execute CWsGraphicBitmap::NewL() to replace the non-transient graphic artwork with the new source bitmap
       
   132 //!				7.	Use Id to check its uid keeps the same as specified
       
   133 //!				8.	Destruct and close all objects used
       
   134 //! @SYMTestStatus		Implemented
       
   135 //! @SYMTestPriority		Medium
       
   136 //! @SYMTestExpectedResults	1.	Non-transient CWsGraphic object was replaced without causing panic
       
   137 //!							2.	The constructed CWsGraphic object  keeps uid (non-transient id) as specified (98765) and active
       
   138 //! @SYMTestType			CIT
       
   139 	START_TEST_BLOCK	10			T_GraphicsWservAPI	\graphics\GRAPHICS-WSERV-WsGraphicBitmap-PublicApi.ini
       
   140 		CREATE_OBJECT	RWsSession		ws
       
   141 		CREATE_OBJECT	CFbsBitmap		fbsbmp
       
   142 		CREATE_OBJECT	CFbsBitmap		fbsmaskbmp
       
   143 		CREATE_OBJECT	CWsGraphicBitmap	wsgraph
       
   144 		CREATE_OBJECT	CWsGraphicBitmap	wsgraph2
       
   145 		CREATE_OBJECT	CFbsBitmap		fbsbmp2
       
   146 		COMMAND		ws			new
       
   147 		COMMAND		ws			Connect
       
   148 		COMMAND		fbsbmp			new
       
   149 		COMMAND		fbsbmp			Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0003-0001-Load_command05
       
   150 		COMMAND		fbsmaskbmp		new
       
   151 		COMMAND		fbsmaskbmp		Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0003-0001-Load_command08
       
   152 		COMMAND		wsgraph			NewL			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0003-0001-NewL_command10
       
   153 		COMMAND		wsgraph			Id			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0003-0001-Id_command11
       
   154 		COMMAND		fbsbmp2			new
       
   155 		COMMAND		fbsbmp2			Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0003-0001-Load_command14
       
   156 		COMMAND		wsgraph2		NewL			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0003-0001-NewL_command16
       
   157 		COMMAND		wsgraph2		Id			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0003-0001-Id_command17
       
   158 		COMMAND		wsgraph2		~
       
   159 		COMMAND		wsgraph			~
       
   160 		COMMAND		fbsmaskbmp		~
       
   161 		COMMAND		fbsbmp2			~
       
   162 		COMMAND		fbsbmp			~
       
   163 		COMMAND		ws			Close
       
   164 	END_TEST_BLOCK
       
   165 END_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0003
       
   166 
       
   167 
       
   168 START_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0004
       
   169 //! @SYMTestCaseID		GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0004
       
   170 //! @SYMAPI			CWsGraphicBitmap
       
   171 //! @SYMAuthor			Victor Liu
       
   172 //! @SYMCreationDate		06/02/2007
       
   173 //! @SYMTestCaseDesc		~CWsGraphicBitmap(): destruct a CWsGraphicBitmap object
       
   174 //!				Uses API elements: RWsSession:Connect, CFbsBitmap::Load, CWsGraphicBitmap::NewL
       
   175 //! @SYMTestActions		1.	Create and connect a RWsSession
       
   176 //!				2.	Create and load CFbsBitmap for both the source bitmap and the mask bitmap
       
   177 //!				3.	Use CWsGraphicBitmap::NewL() to construct a piece of transient graphic artwork
       
   178 //!				4.	Execute ~CWsGraphicBitmap to destruct the created transient graphic artwork
       
   179 //!				5.	Destruct and close all objects used
       
   180 //! @SYMTestStatus		Implemented
       
   181 //! @SYMTestPriority		Medium
       
   182 //! @SYMTestExpectedResults	CWsGraphicBitmap destructs without causing panic
       
   183 //! @SYMTestType		CIT
       
   184 	START_TEST_BLOCK	10			T_GraphicsWservAPI	\graphics\GRAPHICS-WSERV-WsGraphicBitmap-PublicApi.ini
       
   185 		CREATE_OBJECT	RWsSession		ws
       
   186 		CREATE_OBJECT	CFbsBitmap		fbsbmp
       
   187 		CREATE_OBJECT	CFbsBitmap		fbsmaskbmp
       
   188 		CREATE_OBJECT	CWsGraphicBitmap	wsgraph
       
   189 		COMMAND		ws			new
       
   190 		COMMAND		ws			Connect
       
   191 		COMMAND		fbsbmp			new
       
   192 		COMMAND		fbsbmp			Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0004-0001-Load_command05
       
   193 		COMMAND		fbsmaskbmp		new
       
   194 		COMMAND		fbsmaskbmp		Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0004-0001-Load_command08
       
   195 		COMMAND		wsgraph			NewL			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0004-0001-NewL_command10
       
   196 		COMMAND		wsgraph			~
       
   197 		COMMAND		fbsmaskbmp		~
       
   198 		COMMAND		fbsbmp			~
       
   199 		COMMAND		ws			Close
       
   200 	END_TEST_BLOCK
       
   201 END_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0004
       
   202 
       
   203 
       
   204 START_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005
       
   205 //! @SYMTestCaseID		GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005
       
   206 //! @SYMAPI			CWsGraphicBitmap
       
   207 //! @SYMAuthor			Victor Liu
       
   208 //! @SYMCreationDate		26/04/2007
       
   209 //! @SYMTestCaseDesc		TInt ShareGlobally(): share the graphic artwork with all the client sessions (test in CWsGraphicBitmap)
       
   210 //!				Uses API elements: RWsSession:Connect, CFbsBitmap::Load, CWsGraphic::Id
       
   211 //! @SYMTestActions		1.	Create and connect a RWsSession
       
   212 //!				2.	Create and load CFbsBitmap for both the source bitmap and the mask bitmap
       
   213 //!				3.	Use NewL() to construct a piece of non-transient graphic artwork
       
   214 //!				4.	Use Id() to check the uid of the CWsGraphicBitmap object as specified in construction
       
   215 //!				5.	Execute ShareGlobally() and check if it returns KErrNone
       
   216 //!				6.	Destruct and close all objects used
       
   217 //! @SYMTestStatus		Implemented
       
   218 //! @SYMTestPriority		High
       
   219 //! @SYMTestExpectedResults	ShareGlobally returns KErrNone without causing panic
       
   220 //! @SYMTestType		CIT
       
   221 	START_TEST_BLOCK	10			T_GraphicsWservAPI	\graphics\GRAPHICS-WSERV-WsGraphicBitmap-PublicApi.ini
       
   222 		CREATE_OBJECT	RWsSession		ws
       
   223 		CREATE_OBJECT	CFbsBitmap		fbsbmp
       
   224 		CREATE_OBJECT	CFbsBitmap		fbsmaskbmp
       
   225 		CREATE_OBJECT	CWsGraphicBitmap	wsgraph
       
   226 		COMMAND		ws			new
       
   227 		COMMAND		ws			Connect
       
   228 		COMMAND		fbsbmp			new
       
   229 		COMMAND		fbsbmp			Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005-0001-Load_command05
       
   230 		COMMAND		fbsmaskbmp		new
       
   231 		COMMAND		fbsmaskbmp		Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005-0001-Load_command08
       
   232 		COMMAND		wsgraph			NewL			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005-0001-NewL_command10
       
   233 		COMMAND		wsgraph			Id			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005-0001-Id_command11
       
   234 		COMMAND		wsgraph			ShareGlobally
       
   235 		COMMAND		wsgraph			~
       
   236 		COMMAND		fbsmaskbmp		~
       
   237 		COMMAND		fbsbmp			~
       
   238 		COMMAND		ws			Close
       
   239 	END_TEST_BLOCK
       
   240 END_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005
       
   241 
       
   242 
       
   243 START_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0006
       
   244 //! @SYMTestCaseID		GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0006
       
   245 //! @SYMAPI			CWsGraphicBitmap
       
   246 //! @SYMAuthor			Victor Liu
       
   247 //! @SYMCreationDate		26/04/2007
       
   248 //! @SYMTestCaseDesc		TInt Share(TSecureId aClientId): explicitly share this graphic artwork with client sessions with the specified Secure ID (test in CWsGraphicBitmap)
       
   249 //!				Uses API elements: RWsSession:Connect, CFbsBitmap::Load, CWsGraphic::Id
       
   250 //! @SYMTestActions		1.	Create and connect a RWsSession
       
   251 //!				2.	Create and load CFbsBitmap for both the source bitmap and the mask bitmap
       
   252 //!				3.	Use NewL() to construct a piece of non-transient graphic artwork
       
   253 //!				4.	Use Id() to check the uid of the CWsGraphicBitmap object as specified in construction
       
   254 //!				5.	Execute Share() with TSecureId of the specified client and check if it returns KErrNone
       
   255 //!				6.	Destruct and close all objects used
       
   256 //! @SYMTestStatus		Implemented
       
   257 //! @SYMTestPriority		High
       
   258 //! @SYMTestExpectedResults	Share returns KErrNone without causing panic
       
   259 //! @SYMTestType		CIT
       
   260 	START_TEST_BLOCK	10			T_GraphicsWservAPI	\graphics\GRAPHICS-WSERV-WsGraphicBitmap-PublicApi.ini
       
   261 		CREATE_OBJECT	RWsSession		ws
       
   262 		CREATE_OBJECT	CFbsBitmap		fbsbmp
       
   263 		CREATE_OBJECT	CFbsBitmap		fbsmaskbmp
       
   264 		CREATE_OBJECT	CWsGraphicBitmap	wsgraph
       
   265 		COMMAND		ws			new
       
   266 		COMMAND		ws			Connect
       
   267 		COMMAND		fbsbmp			new
       
   268 		COMMAND		fbsbmp			Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0006-0001-Load_command05
       
   269 		COMMAND		fbsmaskbmp		new
       
   270 		COMMAND		fbsmaskbmp		Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0006-0001-Load_command08
       
   271 		COMMAND		wsgraph			NewL			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0006-0001-NewL_command10
       
   272 		COMMAND		wsgraph			Id			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0006-0001-Id_command11
       
   273 		COMMAND		wsgraph			Share			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0006-0001-Share_command12
       
   274 		COMMAND		wsgraph			~
       
   275 		COMMAND		fbsmaskbmp		~
       
   276 		COMMAND		fbsbmp			~
       
   277 		COMMAND		ws			Close
       
   278 	END_TEST_BLOCK
       
   279 END_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0006
       
   280 
       
   281 
       
   282 START_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0007
       
   283 //! @SYMTestCaseID		GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0007
       
   284 //! @SYMAPI			CWsGraphicBitmap
       
   285 //! @SYMAuthor			Victor Liu
       
   286 //! @SYMCreationDate		26/04/2007
       
   287 //! @SYMTestCaseDesc		TInt UnShare(TSecureId aClientId): stop this graphic artwork from being shared with all client sessions with the specific Secure ID (test in CWsGraphicBitmap)
       
   288 //!				Uses API elements: RWsSession:Connect, CFbsBitmap::Load, CWsGraphic::Id
       
   289 //! @SYMTestActions		1.	Create and connect a RWsSession
       
   290 //!				2.	Create and load CFbsBitmap for both the source bitmap and the mask bitmap
       
   291 //!				3.	Use NewL() to construct a piece of non-transient graphic artwork
       
   292 //!				4.	Use Id() to check the uid of the CWsGraphicBitmap object as specified in construction
       
   293 //!				5.	Use Share() to share the artwork for the TSecureId of the specified client
       
   294 //!				6.	Execute UnShare() with TSecureId of the specified client and check if it returns KErrNone
       
   295 //!				7.	Destruct and close all objects used
       
   296 //! @SYMTestStatus		Implemented
       
   297 //! @SYMTestPriority		High
       
   298 //! @SYMTestExpectedResults	UnShare returns KErrNone without causing panic
       
   299 //! @SYMTestType		CIT
       
   300 	START_TEST_BLOCK	10			T_GraphicsWservAPI	\graphics\GRAPHICS-WSERV-WsGraphicBitmap-PublicApi.ini
       
   301 		CREATE_OBJECT	RWsSession		ws
       
   302 		CREATE_OBJECT	CFbsBitmap		fbsbmp
       
   303 		CREATE_OBJECT	CFbsBitmap		fbsmaskbmp
       
   304 		CREATE_OBJECT	CWsGraphicBitmap	wsgraph
       
   305 		COMMAND		ws			new
       
   306 		COMMAND		ws			Connect
       
   307 		COMMAND		fbsbmp			new
       
   308 		COMMAND		fbsbmp			Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0007-0001-Load_command05
       
   309 		COMMAND		fbsmaskbmp		new
       
   310 		COMMAND		fbsmaskbmp		Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0007-0001-Load_command08
       
   311 		COMMAND		wsgraph			NewL			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0007-0001-NewL_command10
       
   312 		COMMAND		wsgraph			Id			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0007-0001-Id_command11
       
   313 		COMMAND		wsgraph			Share			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0007-0001-Share_command12
       
   314 		COMMAND		wsgraph			UnShare			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0007-0001-UnShare_command13
       
   315 		COMMAND		wsgraph			~
       
   316 		COMMAND		fbsmaskbmp		~
       
   317 		COMMAND		fbsbmp			~
       
   318 		COMMAND		ws			Close
       
   319 	END_TEST_BLOCK
       
   320 END_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0007
       
   321 
       
   322 
       
   323 START_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0008
       
   324 //! @SYMTestCaseID		GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0008
       
   325 //! @SYMAPI			CWsGraphicBitmap
       
   326 //! @SYMAuthor			Victor Liu
       
   327 //! @SYMCreationDate		26/04/2007
       
   328 //! @SYMTestCaseDesc		TInt UnShareGlobally(): prevent this graphic artwork from being shared with all the client sessions (test in CWsGraphicBitmap)
       
   329 //!				Uses API elements: RWsSession:Connect, CFbsBitmap::Load, CWsGraphic::Id
       
   330 //! @SYMTestActions		1.	Create and connect a RWsSession
       
   331 //!				2.	Create and load CFbsBitmap for both the source bitmap and the mask bitmap
       
   332 //!				3.	Use NewL() to construct a piece of non-transient graphic artwork
       
   333 //!				4.	Use Id() to check the uid of the CWsGraphicBitmap object as specified in construction
       
   334 //!				5.	Use ShareGlobally() to share the graphic artwork
       
   335 //!				6.	Execute UnShareGlobally() and check if it returns KErrNone
       
   336 //!				7.	Destruct and close all objects used
       
   337 //! @SYMTestStatus		Implemented
       
   338 //! @SYMTestPriority		High
       
   339 //! @SYMTestExpectedResults	UnShareGlobally returns KErrNone without causing panic
       
   340 //! @SYMTestType		CIT
       
   341 	START_TEST_BLOCK	10			T_GraphicsWservAPI	\graphics\GRAPHICS-WSERV-WsGraphicBitmap-PublicApi.ini
       
   342 		CREATE_OBJECT	RWsSession		ws
       
   343 		CREATE_OBJECT	CFbsBitmap		fbsbmp
       
   344 		CREATE_OBJECT	CFbsBitmap		fbsmaskbmp
       
   345 		CREATE_OBJECT	CWsGraphicBitmap	wsgraph
       
   346 		COMMAND		ws			new
       
   347 		COMMAND		ws			Connect
       
   348 		COMMAND		fbsbmp			new
       
   349 		COMMAND		fbsbmp			Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0008-0001-Load_command05
       
   350 		COMMAND		fbsmaskbmp		new
       
   351 		COMMAND		fbsmaskbmp		Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0008-0001-Load_command08
       
   352 		COMMAND		wsgraph			NewL			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0008-0001-NewL_command10
       
   353 		COMMAND		wsgraph			Id			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0008-0001-Id_command11
       
   354 		COMMAND		wsgraph			ShareGlobally
       
   355 		COMMAND		wsgraph			UnShareGlobally
       
   356 		COMMAND		wsgraph			~
       
   357 		COMMAND		fbsmaskbmp		~
       
   358 		COMMAND		fbsbmp			~
       
   359 		COMMAND		ws			Close
       
   360 	END_TEST_BLOCK
       
   361 END_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0008
       
   362 
       
   363 
       
   364 
       
   365 
       
   366 
       
   367 
       
   368 // ****************************************************************************
       
   369 // CWsGraphicBitmap Public APIs inherited from CWsGraphic
       
   370 // ****************************************************************************
       
   371 
       
   372 
       
   373 START_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0101
       
   374 //! @SYMTestCaseID		GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0101
       
   375 //! @SYMAPI			CWsGraphicBitmap
       
   376 //! @SYMAuthor			Victor Liu
       
   377 //! @SYMCreationDate		06/02/2007
       
   378 //! @SYMTestCaseDesc		~CWsGraphic(): destruct a CWsGraphicBitmap object
       
   379 //!				Uses API elements: RWsSession:Connect, CFbsBitmap::Load, CWsGraphicBitmap::NewL
       
   380 //! @SYMTestActions		1.	Create and connect a RWsSession
       
   381 //!				2.	Create and load CFbsBitmap for both the source bitmap and the mask bitmap
       
   382 //!				3.	Use CWsGraphicBitmap::NewL() to construct a piece of transient graphic artwork
       
   383 //!				4.	Execute ~CWsGraphic to destruct the created transient graphic artwork
       
   384 //!				5.	Destruct and close all objects used
       
   385 //! @SYMTestStatus		Implemented
       
   386 //! @SYMTestPriority		Medium
       
   387 //! @SYMTestExpectedResults	CWsGraphicBitmap destructs without causing panic
       
   388 //! @SYMTestType		CIT
       
   389 	START_TEST_BLOCK	10			T_GraphicsWservAPI	\graphics\GRAPHICS-WSERV-WsGraphicBitmap-PublicApi.ini
       
   390 		CREATE_OBJECT	RWsSession		ws
       
   391 		CREATE_OBJECT	CFbsBitmap		fbsbmp
       
   392 		CREATE_OBJECT	CFbsBitmap		fbsmaskbmp
       
   393 		CREATE_OBJECT	CWsGraphicBitmap	wsgraph
       
   394 		COMMAND		ws			new
       
   395 		COMMAND		ws			Connect
       
   396 		COMMAND		fbsbmp			new
       
   397 		COMMAND		fbsbmp			Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0101-0001-Load_command05
       
   398 		COMMAND		fbsmaskbmp		new
       
   399 		COMMAND		fbsmaskbmp		Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0101-0001-Load_command08
       
   400 		COMMAND		wsgraph			NewL			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0101-0001-NewL_command10
       
   401 		COMMAND		wsgraph			~CWsGraphic
       
   402 		COMMAND		fbsmaskbmp		~
       
   403 		COMMAND		fbsbmp			~
       
   404 		COMMAND		ws			Close
       
   405 	END_TEST_BLOCK
       
   406 END_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0101
       
   407 
       
   408 
       
   409 START_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0102
       
   410 //! @SYMTestCaseID		GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0102
       
   411 //! @SYMAPI			CWsGraphic
       
   412 //! @SYMAuthor			Victor Liu
       
   413 //! @SYMCreationDate		06/02/2007
       
   414 //! @SYMTestCaseDesc		Id(): get the CWsGraphic artwork id
       
   415 //!				Uses API elements: RWsSession:Connect, CFbsBitmap::Load, CWsGraphicBitmap::NewL
       
   416 //! @SYMTestActions		1.	Create and connect a RWsSession
       
   417 //!				2.	Create and load CFbsBitmap for both the source bitmap and the mask bitmap
       
   418 //!				3.	Use NewL() to construct a piece of transient graphic artwork
       
   419 //!				4.	Execute Id() and check if it returns non-zero for the transient graphic artwork
       
   420 //!				5.	Destruct and close all objects used
       
   421 //! @SYMTestStatus		Implemented
       
   422 //! @SYMTestPriority		High
       
   423 //! @SYMTestExpectedResults	Id() is executed without causing panic, and returns id not 0 after construction of transient graphic artwork
       
   424 //! @SYMTestType		CIT
       
   425 	START_TEST_BLOCK	10			T_GraphicsWservAPI	\graphics\GRAPHICS-WSERV-WsGraphicBitmap-PublicApi.ini
       
   426 		CREATE_OBJECT	RWsSession		ws
       
   427 		CREATE_OBJECT	CFbsBitmap		fbsbmp
       
   428 		CREATE_OBJECT	CFbsBitmap		fbsmaskbmp
       
   429 		CREATE_OBJECT	CWsGraphicBitmap	wsgraph
       
   430 		COMMAND		ws			new
       
   431 		COMMAND		ws			Connect
       
   432 		COMMAND		fbsbmp			new
       
   433 		COMMAND		fbsbmp			Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0102-0001-Load_command05
       
   434 		COMMAND		fbsmaskbmp		new
       
   435 		COMMAND		fbsmaskbmp		Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0102-0001-Load_command08
       
   436 		COMMAND		wsgraph			NewL			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0102-0001-NewL_command10
       
   437 		COMMAND		wsgraph			Id			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0102-0001-Id_command11
       
   438 		COMMAND		wsgraph			~
       
   439 		COMMAND		fbsmaskbmp		~
       
   440 		COMMAND		fbsbmp			~
       
   441 		COMMAND		ws			Close
       
   442 	END_TEST_BLOCK
       
   443 END_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0102
       
   444 
       
   445 
       
   446 START_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0103
       
   447 //! @SYMTestCaseID		GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0103
       
   448 //! @SYMAPI			CWsGraphic
       
   449 //! @SYMAuthor			Victor Liu
       
   450 //! @SYMCreationDate		07/02/2007
       
   451 //! @SYMTestCaseDesc		IsActive(): check whether a peer of this graphic artwork has been fully constructed on the server
       
   452 //!				Uses API elements: RWsSession:Connect, CFbsBitmap::Load, CWsGraphicBitmap::NewL
       
   453 //! @SYMTestActions		1.	Create and connect a RWsSession
       
   454 //!				2.	Create and load CFbsBitmap for both the source bitmap and the mask bitmap
       
   455 //!				3.	Use NewL() to construct a piece of transient graphic artwork
       
   456 //!				4.	Execute IsActive() and check if it returns TRUE for the transient graphic artwork
       
   457 //!				5.	Close the used objects: CWsGraphic, CFbsBitmap, RWsSession
       
   458 //! @SYMTestStatus		Implemented
       
   459 //! @SYMTestPriority		High
       
   460 //! @SYMTestExpectedResults	IsActive() is executed without causing panic, and returns TRUE after construction of graphic artwork
       
   461 //! @SYMTestType		CIT
       
   462 	START_TEST_BLOCK	10			T_GraphicsWservAPI	\graphics\GRAPHICS-WSERV-WsGraphicBitmap-PublicApi.ini
       
   463 		CREATE_OBJECT	RWsSession		ws
       
   464 		CREATE_OBJECT	CFbsBitmap		fbsbmp
       
   465 		CREATE_OBJECT	CFbsBitmap		fbsmaskbmp
       
   466 		CREATE_OBJECT	CWsGraphicBitmap	wsgraph
       
   467 		COMMAND		ws			new
       
   468 		COMMAND		ws			Connect
       
   469 		COMMAND		fbsbmp			new
       
   470 		COMMAND		fbsbmp			Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0103-0001-Load_command05
       
   471 		COMMAND		fbsmaskbmp		new
       
   472 		COMMAND		fbsmaskbmp		Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0103-0001-Load_command08
       
   473 		COMMAND		wsgraph			NewL			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0103-0001-NewL_command10
       
   474 		COMMAND		wsgraph			IsActive		GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0103-0001-IsActive_command11
       
   475 		COMMAND		wsgraph			~
       
   476 		COMMAND		fbsmaskbmp		~
       
   477 		COMMAND		fbsbmp			~
       
   478 		COMMAND		ws			Close
       
   479 	END_TEST_BLOCK
       
   480 END_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0103
       
   481 
       
   482 
       
   483 START_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0104
       
   484 //! @SYMTestCaseID		GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0104
       
   485 //! @SYMAPI			CWsGraphic
       
   486 //! @SYMAuthor			Victor Liu
       
   487 //! @SYMCreationDate		07/02/2007
       
   488 //! @SYMTestCaseDesc		Destroy(): destroy the corresponding CWsGraphicDrawer instance on the server
       
   489 //!				Uses API elements: RWsSession:Connect, CFbsBitmap::Load, CWsGraphic::Id & IsActive, CWsGraphicBitmap::NewL
       
   490 //! @SYMTestActions		1.	Create and connect a RWsSession
       
   491 //!				2.	Create and load CFbsBitmap for both the source bitmap and the mask bitmap
       
   492 //!				3.	Use CWsGraphicBitmap::NewL() to construct a piece of transient graphic artwork
       
   493 //!				4.	Check CWsGraphic object after construction: IsActive()=TRUE and Id() is not 0
       
   494 //!				5.	Execute to destroy the corresponding CWsGraphicDrawer of the CWsGraphic object
       
   495 //!				6.	Check CWsGraphic object after destroy: IsActive()=FALSE and Id() is 0
       
   496 //!				7.	Close the used objects: CWsGraphic, CFbsBitmap, RWsSession
       
   497 //! @SYMTestStatus		Implemented
       
   498 //! @SYMTestPriority		High
       
   499 //! @SYMTestExpectedResults	1.	CWsGraphic was destroyed without causing panic
       
   500 //!				2.	After construction of transient graphic artwork, IsActive()=TRUE and Id() is not 0
       
   501 //!				3.	After destroy the transient graphic artwork, IsActive()=FALSE and Id() is 0
       
   502 //! @SYMTestType		CIT
       
   503 	START_TEST_BLOCK	10			T_GraphicsWservAPI	\graphics\GRAPHICS-WSERV-WsGraphicBitmap-PublicApi.ini
       
   504 		CREATE_OBJECT	RWsSession		ws
       
   505 		CREATE_OBJECT	CFbsBitmap		fbsbmp
       
   506 		CREATE_OBJECT	CFbsBitmap		fbsmaskbmp
       
   507 		CREATE_OBJECT	CWsGraphicBitmap	wsgraph
       
   508 		COMMAND		ws			new
       
   509 		COMMAND		ws			Connect
       
   510 		COMMAND		fbsbmp			new
       
   511 		COMMAND		fbsbmp			Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0104-0001-Load_command05
       
   512 		COMMAND		fbsmaskbmp		new
       
   513 		COMMAND		fbsmaskbmp		Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0104-0001-Load_command08
       
   514 		COMMAND		wsgraph			NewL			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0104-0001-NewL_command10
       
   515 		COMMAND		wsgraph			IsActive		GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0104-0001-IsActive_command11
       
   516 		COMMAND		wsgraph			Id			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0104-0001-Id_command12
       
   517 		COMMAND		wsgraph			Destroy
       
   518 		COMMAND		wsgraph			IsActive		GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0104-0001-IsActive_command14
       
   519 		COMMAND		wsgraph			Id			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0104-0001-Id_command15
       
   520 		COMMAND		wsgraph			~
       
   521 		COMMAND		fbsmaskbmp		~
       
   522 		COMMAND		fbsbmp			~
       
   523 		Command		ws			Close
       
   524 	END_TEST_BLOCK
       
   525 END_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0104
       
   526 
       
   527 
       
   528 
       
   529 
       
   530 
       
   531 // ****************************************************************************
       
   532 // Negative testcases of CWsGraphicBitmap
       
   533 // ****************************************************************************
       
   534 
       
   535 START_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-1001
       
   536 //! @SYMTestCaseID		GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-1001
       
   537 //! @SYMAPI			CWsGraphicBitmap
       
   538 //! @SYMAuthor			Victor Liu
       
   539 //! @SYMCreationDate		01/11/2007
       
   540 //! @SYMTestCaseDesc		NewL(TUid aUid, const CFbsBitmap *aBitmap, const CFbsBitmap *aMask) to construct a piece of non-transient graphic artwork with the uid already in use
       
   541 //!				Uses API elements: RWsSession:Connect, CFbsBitmap::Load
       
   542 //! @SYMTestActions		1.	Create and connect a RWsSession
       
   543 //!				2.	Create and load CFbsBitmap for both the source bitmap and the mask bitmap
       
   544 //!				3.	Execute CWsGraphicBitmap::NewL() to construct a piece of non-transient graphic artwork
       
   545 //!				4.	Execute CWsGraphicBitmap::NewL() to construct another piece of non-transient graphic artwork and with the same uid as the above
       
   546 //! @SYMTestStatus		Implemented
       
   547 //! @SYMTestPriority		Medium
       
   548 //! @SYMTestExpectedResults	get panic WSERV code=66 (this panic code is not yet documented in Symbian Library)
       
   549 //! @SYMTestType		CIT
       
   550 	START_TEST_BLOCK	10			T_GraphicsWservAPI	\graphics\GRAPHICS-WSERV-WsGraphicBitmap-PublicApi.ini
       
   551 		CREATE_OBJECT	RWsSession		ws
       
   552 		CREATE_OBJECT	CFbsBitmap		fbsbmp
       
   553 		CREATE_OBJECT	CFbsBitmap		fbsmaskbmp
       
   554 		CREATE_OBJECT	CWsGraphicBitmap	wsgraph
       
   555 		CREATE_OBJECT	CWsGraphicBitmap	wsgraph2
       
   556 		COMMAND		ws			new
       
   557 		COMMAND		ws			Connect
       
   558 		COMMAND		fbsbmp			new
       
   559 		COMMAND		fbsbmp			Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0002-0001-Load_command05
       
   560 		COMMAND		fbsmaskbmp		new
       
   561 		COMMAND		fbsmaskbmp		Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0002-0001-Load_command08
       
   562 		COMMAND		wsgraph			NewL			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0002-0001-NewL_command10
       
   563 		COMMAND		wsgraph2		NewL			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0002-0001-NewL_command10
       
   564 	END_TEST_BLOCK	!PanicString=WSERV	!PanicCode=66
       
   565 	RUN_TEST_STEP	100	T_GraphicsWservAPI	utilityClearPanicDlg
       
   566 END_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-1001
       
   567 
       
   568 
       
   569 START_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-1002
       
   570 //! @SYMTestCaseID		GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-1002
       
   571 //! @SYMAPI			CWsGraphicBitmap
       
   572 //! @SYMAuthor			Victor Liu
       
   573 //! @SYMCreationDate		03/10/2007
       
   574 //! @SYMTestCaseDesc		NewL(TUid aUid, const CFbsBitmap *aBitmap, const CFbsBitmap *aMask) to replace a non-transient graphic artwork with non-existed uid
       
   575 //!				Uses API elements: RWsSession:Connect, CFbsBitmap::Load
       
   576 //! @SYMTestActions		1.	Create and connect a RWsSession
       
   577 //!				2.	Create and load CFbsBitmap for both the source bitmap and the mask bitmap
       
   578 //!				3.	Execute CWsGraphicBitmap::NewL() to replace a non-transient graphic artwork but with non-existed uid
       
   579 //! @SYMTestStatus		Implemented
       
   580 //! @SYMTestPriority		Medium
       
   581 //! @SYMTestExpectedResults	get panic W32 code=14
       
   582 //! @SYMTestType		CIT
       
   583 	START_TEST_BLOCK	10			T_GraphicsWservAPI	\graphics\GRAPHICS-WSERV-WsGraphicBitmap-PublicApi.ini
       
   584 		CREATE_OBJECT	RWsSession		ws
       
   585 		CREATE_OBJECT	CFbsBitmap		fbsbmp
       
   586 		CREATE_OBJECT	CFbsBitmap		fbsmaskbmp
       
   587 		CREATE_OBJECT	CWsGraphicBitmap	wsgraph
       
   588 		COMMAND		ws			new
       
   589 		COMMAND		ws			Connect
       
   590 		COMMAND		fbsbmp			new
       
   591 		COMMAND		fbsbmp			Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0002-0001-Load_command05
       
   592 		COMMAND		fbsmaskbmp		new
       
   593 		COMMAND		fbsmaskbmp		Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0002-0001-Load_command08
       
   594 		COMMAND		wsgraph			NewL			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-1002-0001-NewL_command01
       
   595 	END_TEST_BLOCK	!PanicString=W32	!PanicCode=14
       
   596 	RUN_TEST_STEP	100	T_GraphicsWservAPI	utilityClearPanicDlg
       
   597 END_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-1002
       
   598 
       
   599 
       
   600 START_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-1003
       
   601 //! @SYMTestCaseID		GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-1003
       
   602 //! @SYMAPI			CWsGraphicBitmap
       
   603 //! @SYMAuthor			Victor Liu
       
   604 //! @SYMCreationDate		06/11/2007
       
   605 //! @SYMTestCaseDesc		TInt ShareGlobally(): share globally a graphic artwork that already been shared globally
       
   606 //!				Uses API elements: RWsSession:Connect, CFbsBitmap::Load, CWsGraphic::Id
       
   607 //! @SYMTestActions		1.	Create and connect a RWsSession
       
   608 //!				2.	Create and load CFbsBitmap for both the source bitmap and the mask bitmap
       
   609 //!				3.	Use NewL() to construct a piece of non-transient graphic artwork
       
   610 //!				4.	Use Id() to check the uid of the CWsGraphicBitmap object as specified in construction
       
   611 //!				5.	Execute ShareGlobally() and check if it returns KErrNone
       
   612 //!				6.	Execute ShareGlobally() again to share the graphic artwork globally and check if it returns KErrNone
       
   613 //!				7.	Destruct and close all objects used
       
   614 //! @SYMTestStatus		Implemented
       
   615 //! @SYMTestPriority		High
       
   616 //! @SYMTestExpectedResults	ShareGlobally() again on a graphic artwork that already ShareGlobally would not generate any error (return KErrNone)
       
   617 //! @SYMTestType		CIT
       
   618 	START_TEST_BLOCK	10			T_GraphicsWservAPI	\graphics\GRAPHICS-WSERV-WsGraphicBitmap-PublicApi.ini
       
   619 		CREATE_OBJECT	RWsSession		ws
       
   620 		CREATE_OBJECT	CFbsBitmap		fbsbmp
       
   621 		CREATE_OBJECT	CFbsBitmap		fbsmaskbmp
       
   622 		CREATE_OBJECT	CWsGraphicBitmap	wsgraph
       
   623 		COMMAND		ws			new
       
   624 		COMMAND		ws			Connect
       
   625 		COMMAND		fbsbmp			new
       
   626 		COMMAND		fbsbmp			Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005-0001-Load_command05
       
   627 		COMMAND		fbsmaskbmp		new
       
   628 		COMMAND		fbsmaskbmp		Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005-0001-Load_command08
       
   629 		COMMAND		wsgraph			NewL			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005-0001-NewL_command10
       
   630 		COMMAND		wsgraph			Id			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005-0001-Id_command11
       
   631 		COMMAND		wsgraph			ShareGlobally
       
   632 		COMMAND		wsgraph			ShareGlobally
       
   633 		COMMAND		wsgraph			~
       
   634 		COMMAND		fbsmaskbmp		~
       
   635 		COMMAND		fbsbmp			~
       
   636 		COMMAND		ws			Close
       
   637 	END_TEST_BLOCK
       
   638 END_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-1003
       
   639 
       
   640 
       
   641 START_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-1004
       
   642 //! @SYMTestCaseID		GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-1004
       
   643 //! @SYMAPI			CWsGraphicBitmap
       
   644 //! @SYMAuthor			Victor Liu
       
   645 //! @SYMCreationDate		05/11/2007
       
   646 //! @SYMTestCaseDesc		TInt Share(TSecureId aClientId): share a graphic artwork to a Secure ID that already been shared to explicitly
       
   647 //!				Uses API elements: RWsSession:Connect, CFbsBitmap::Load, CWsGraphic::Id
       
   648 //! @SYMTestActions		1.	Create and connect a RWsSession
       
   649 //!				2.	Create and load CFbsBitmap for both the source bitmap and the mask bitmap
       
   650 //!				3.	Use NewL() to construct a piece of non-transient graphic artwork
       
   651 //!				4.	Use Id() to check the uid of the CWsGraphicBitmap object as specified in construction
       
   652 //!				5.	Execute Share() with TSecureId of the specified client and check if it returns KErrNone
       
   653 //!				6.	Execute Share() again to share the graphic artwork with the same TSecureId and check if it returns the expected error code
       
   654 //!				7.	Destruct and close all objects used
       
   655 //! @SYMTestStatus		Implemented
       
   656 //! @SYMTestPriority		High
       
   657 //! @SYMTestExpectedResults	Share() a graphic artwork to a Secure ID that already been shared to would generate KErrAlreadyExists (-11)
       
   658 //! @SYMTestType		CIT
       
   659 	START_TEST_BLOCK	10			T_GraphicsWservAPI	\graphics\GRAPHICS-WSERV-WsGraphicBitmap-PublicApi.ini
       
   660 		CREATE_OBJECT	RWsSession		ws
       
   661 		CREATE_OBJECT	CFbsBitmap		fbsbmp
       
   662 		CREATE_OBJECT	CFbsBitmap		fbsmaskbmp
       
   663 		CREATE_OBJECT	CWsGraphicBitmap	wsgraph
       
   664 		COMMAND		ws			new
       
   665 		COMMAND		ws			Connect
       
   666 		COMMAND		fbsbmp			new
       
   667 		COMMAND		fbsbmp			Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005-0001-Load_command05
       
   668 		COMMAND		fbsmaskbmp		new
       
   669 		COMMAND		fbsmaskbmp		Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005-0001-Load_command08
       
   670 		COMMAND		wsgraph			NewL			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005-0001-NewL_command10
       
   671 		COMMAND		wsgraph			Id			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005-0001-Id_command11
       
   672 		COMMAND		wsgraph			Share			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0007-0001-Share_command12
       
   673 		COMMAND		!Error=-11	wsgraph			Share			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0007-0001-Share_command12
       
   674 		COMMAND		wsgraph			~
       
   675 		COMMAND		fbsmaskbmp		~
       
   676 		COMMAND		fbsbmp			~
       
   677 		COMMAND		ws			Close
       
   678 	END_TEST_BLOCK
       
   679 END_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-1004
       
   680 
       
   681 
       
   682 START_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-1005
       
   683 //! @SYMTestCaseID		GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-1005
       
   684 //! @SYMAPI			CWsGraphicBitmap
       
   685 //! @SYMAuthor			Victor Liu
       
   686 //! @SYMCreationDate		05/11/2007
       
   687 //! @SYMTestCaseDesc		TInt UnShare(TSecureId aClientId): stop this graphic artwork from being shared to a Secure ID before execute Share() to it first
       
   688 //!				Uses API elements: RWsSession:Connect, CFbsBitmap::Load, CWsGraphic::Id
       
   689 //! @SYMTestActions		1.	Create and connect a RWsSession
       
   690 //!				2.	Create and load CFbsBitmap for both the source bitmap and the mask bitmap
       
   691 //!				3.	Use NewL() to construct a piece of non-transient graphic artwork
       
   692 //!				4.	Use Id() to check the uid of the CWsGraphicBitmap object as specified in construction
       
   693 //!				5.	Execute UnShare() with TSecureId that not yet shared and check if it returns expected error
       
   694 //!				6.	Destruct and close all objects used
       
   695 //! @SYMTestStatus		Implemented
       
   696 //! @SYMTestPriority		High
       
   697 //! @SYMTestExpectedResults	UnShare() a graphic artwork to a Secure ID before shared to it would generate KErrNotFound (-1)
       
   698 //! @SYMTestType		CIT
       
   699 	START_TEST_BLOCK	10			T_GraphicsWservAPI	\graphics\GRAPHICS-WSERV-WsGraphicBitmap-PublicApi.ini
       
   700 		CREATE_OBJECT	RWsSession		ws
       
   701 		CREATE_OBJECT	CFbsBitmap		fbsbmp
       
   702 		CREATE_OBJECT	CFbsBitmap		fbsmaskbmp
       
   703 		CREATE_OBJECT	CWsGraphicBitmap	wsgraph
       
   704 		COMMAND		ws			new
       
   705 		COMMAND		ws			Connect
       
   706 		COMMAND		fbsbmp			new
       
   707 		COMMAND		fbsbmp			Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005-0001-Load_command05
       
   708 		COMMAND		fbsmaskbmp		new
       
   709 		COMMAND		fbsmaskbmp		Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005-0001-Load_command08
       
   710 		COMMAND		wsgraph			NewL			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005-0001-NewL_command10
       
   711 		COMMAND		wsgraph			Id			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005-0001-Id_command11
       
   712 		COMMAND		!Error=-1	wsgraph			UnShare			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0007-0001-UnShare_command13
       
   713 		COMMAND		wsgraph			~
       
   714 		COMMAND		fbsmaskbmp		~
       
   715 		COMMAND		fbsbmp			~
       
   716 		COMMAND		ws			Close
       
   717 	END_TEST_BLOCK
       
   718 END_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-1005
       
   719 
       
   720 
       
   721 START_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-1006
       
   722 //! @SYMTestCaseID		GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-1006
       
   723 //! @SYMAPI			CWsGraphicBitmap
       
   724 //! @SYMAuthor			Victor Liu
       
   725 //! @SYMCreationDate		06/11/2007
       
   726 //! @SYMTestCaseDesc		TInt UnShareGlobally(): prevent this graphic artwork from being shared with all the client sessions before execute ShareGlobally() on it first
       
   727 //!				Uses API elements: RWsSession:Connect, CFbsBitmap::Load, CWsGraphic::Id
       
   728 //! @SYMTestActions		1.	Create and connect a RWsSession
       
   729 //!				2.	Create and load CFbsBitmap for both the source bitmap and the mask bitmap
       
   730 //!				3.	Use NewL() to construct a piece of non-transient graphic artwork
       
   731 //!				4.	Use Id() to check the uid of the CWsGraphicBitmap object as specified in construction
       
   732 //!				5.	Execute UnShareGlobally() the graphic artwork before ShareGlobally() it first and check if it returns KErrNone
       
   733 //!				6.	Destruct and close all objects used
       
   734 //! @SYMTestStatus		Implemented
       
   735 //! @SYMTestPriority		High
       
   736 //! @SYMTestExpectedResults	UnShareGlobally() a graphic artwork before execute ShareGlobally() on it first would not generate any error (returns KErrNone)
       
   737 //! @SYMTestType		CIT
       
   738 	START_TEST_BLOCK	10			T_GraphicsWservAPI	\graphics\GRAPHICS-WSERV-WsGraphicBitmap-PublicApi.ini
       
   739 		CREATE_OBJECT	RWsSession		ws
       
   740 		CREATE_OBJECT	CFbsBitmap		fbsbmp
       
   741 		CREATE_OBJECT	CFbsBitmap		fbsmaskbmp
       
   742 		CREATE_OBJECT	CWsGraphicBitmap	wsgraph
       
   743 		COMMAND		ws			new
       
   744 		COMMAND		ws			Connect
       
   745 		COMMAND		fbsbmp			new
       
   746 		COMMAND		fbsbmp			Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005-0001-Load_command05
       
   747 		COMMAND		fbsmaskbmp		new
       
   748 		COMMAND		fbsmaskbmp		Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005-0001-Load_command08
       
   749 		COMMAND		wsgraph			NewL			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005-0001-NewL_command10
       
   750 		COMMAND		wsgraph			Id			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005-0001-Id_command11
       
   751 		COMMAND		wsgraph			UnShareGlobally
       
   752 		COMMAND		wsgraph			~
       
   753 		COMMAND		fbsmaskbmp		~
       
   754 		COMMAND		fbsbmp			~
       
   755 		COMMAND		ws			Close
       
   756 	END_TEST_BLOCK
       
   757 END_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-1006
       
   758 
       
   759 
       
   760 START_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-1007
       
   761 //! @SYMTestCaseID		GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-1007
       
   762 //! @SYMAPI			CWsGraphicBitmap
       
   763 //! @SYMAuthor			Victor Liu
       
   764 //! @SYMCreationDate		08/11/2007
       
   765 //! @SYMTestCaseDesc		ShareGlobally() a graphic artwork then UnShare() it to a Secure ID
       
   766 //!				Uses API elements: RWsSession:Connect, CFbsBitmap::Load, CWsGraphic::Id
       
   767 //! @SYMTestActions		1.	Create and connect a RWsSession
       
   768 //!				2.	Create and load CFbsBitmap for both the source bitmap and the mask bitmap
       
   769 //!				3.	Use NewL() to construct a piece of non-transient graphic artwork
       
   770 //!				4.	Use Id() to check the uid of the CWsGraphicBitmap object as specified in construction
       
   771 //!				5.	Execute ShareGlobally() and check if it returns KErrNone
       
   772 //!				6.	Execute UnShare() it to a Secure ID and check if it returns expected error code
       
   773 //!				7.	Destruct and close all objects used
       
   774 //! @SYMTestStatus		Implemented
       
   775 //! @SYMTestPriority		High
       
   776 //! @SYMTestExpectedResults	UnShare() a graphic artwork that shared globally would generate KErrNotFound (-1)
       
   777 //! @SYMTestType		CIT
       
   778 	START_TEST_BLOCK	10			T_GraphicsWservAPI	\graphics\GRAPHICS-WSERV-WsGraphicBitmap-PublicApi.ini
       
   779 		CREATE_OBJECT	RWsSession		ws
       
   780 		CREATE_OBJECT	CFbsBitmap		fbsbmp
       
   781 		CREATE_OBJECT	CFbsBitmap		fbsmaskbmp
       
   782 		CREATE_OBJECT	CWsGraphicBitmap	wsgraph
       
   783 		COMMAND		ws			new
       
   784 		COMMAND		ws			Connect
       
   785 		COMMAND		fbsbmp			new
       
   786 		COMMAND		fbsbmp			Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005-0001-Load_command05
       
   787 		COMMAND		fbsmaskbmp		new
       
   788 		COMMAND		fbsmaskbmp		Load			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005-0001-Load_command08
       
   789 		COMMAND		wsgraph			NewL			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005-0001-NewL_command10
       
   790 		COMMAND		wsgraph			Id			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0005-0001-Id_command11
       
   791 		COMMAND		wsgraph			ShareGlobally
       
   792 		COMMAND		!Error=-1	wsgraph			UnShare			GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-0007-0001-UnShare_command13
       
   793 		COMMAND		wsgraph			~
       
   794 		COMMAND		fbsmaskbmp		~
       
   795 		COMMAND		fbsbmp			~
       
   796 		COMMAND		ws			Close
       
   797 	END_TEST_BLOCK
       
   798 END_TESTCASE	GRAPHICS-WSERV-WsGraphicBitmap-PublicApi-1007
       
   799 
       
   800 
       
   801 
       
   802 
       
   803 // ****************************************************************************
       
   804 // Negative testcases of CWsGraphicBitmap inherited from CWsGraphic
       
   805 // ****************************************************************************
       
   806