sl@0
|
1 |
// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
//
|
sl@0
|
15 |
|
sl@0
|
16 |
/**
|
sl@0
|
17 |
@file
|
sl@0
|
18 |
@test
|
sl@0
|
19 |
@internalComponent - Internal Symbian test code
|
sl@0
|
20 |
*/
|
sl@0
|
21 |
|
sl@0
|
22 |
#include "egltest_endpointacquire.h"
|
sl@0
|
23 |
|
sl@0
|
24 |
|
sl@0
|
25 |
static const TTestCase KAcquirePositiveCases[] =
|
sl@0
|
26 |
{
|
sl@0
|
27 |
// Test "working case"
|
sl@0
|
28 |
{
|
sl@0
|
29 |
TESTIDS("547A"),
|
sl@0
|
30 |
CASETITLE("Functional: Positive: eglAcquireImageNOK with Valid Parameters: Basic Working case"),
|
sl@0
|
31 |
SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
|
sl@0
|
32 |
{
|
sl@0
|
33 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
34 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
35 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
36 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
37 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
38 |
{ EBeginStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
39 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
40 |
{ ECompareImageCase, 0, EGL_SUCCESS },
|
sl@0
|
41 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
42 |
{ EEndStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
43 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
44 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
45 |
{ EFinishedCase }
|
sl@0
|
46 |
},
|
sl@0
|
47 |
},
|
sl@0
|
48 |
// Positive: Acquire twice with release
|
sl@0
|
49 |
{
|
sl@0
|
50 |
TESTIDS("547B"),
|
sl@0
|
51 |
CASETITLE("Functional: Positive: eglAcquireImageNOK with Valid Parameters: Acquire twice (with release)"),
|
sl@0
|
52 |
SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
|
sl@0
|
53 |
{
|
sl@0
|
54 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
55 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
56 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
57 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
58 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
59 |
{ EBeginStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
60 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
61 |
{ ECompareImageCase, 0, EGL_SUCCESS },
|
sl@0
|
62 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
63 |
{ EContentUpdateCase, ENoSync, EGL_SUCCESS },
|
sl@0
|
64 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
65 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
66 |
{ ECompareImageCase, 0, EGL_SUCCESS },
|
sl@0
|
67 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
68 |
{ EEndStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
69 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
70 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
71 |
{ EFinishedCase }
|
sl@0
|
72 |
},
|
sl@0
|
73 |
},
|
sl@0
|
74 |
{
|
sl@0
|
75 |
TESTIDS("547C"),
|
sl@0
|
76 |
CASETITLE("Functional: Positive: eglAcquireImageNOK with Valid Parameters: Two endpoints, acquire from each of them"),
|
sl@0
|
77 |
SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
|
sl@0
|
78 |
{
|
sl@0
|
79 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
80 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface},
|
sl@0
|
81 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 1, EStandardSurface },
|
sl@0
|
82 |
{ ECreateEndpointCase, 0, EGL_SUCCESS, 0, 0}, // Endpoint 0, image(surface) 0
|
sl@0
|
83 |
{ ECreateEndpointCase, 0, EGL_SUCCESS, 1, 1}, // Endpoint 1, image(surface) 1
|
sl@0
|
84 |
{ EDrawContentCase, 0, EGL_SUCCESS, 0, 0 }, // Surface 0, Image 0
|
sl@0
|
85 |
{ EContentUpdateCase, 0, EGL_SUCCESS, 0 }, // Surface 0
|
sl@0
|
86 |
{ EDrawContentCase, 0, EGL_SUCCESS, 1, 1 }, // Surface 1, Image 1
|
sl@0
|
87 |
{ EContentUpdateCase, 0, EGL_SUCCESS, 1 }, // Surface 1
|
sl@0
|
88 |
{ EBeginStreamingCase, 0, EGL_SUCCESS, 0 }, // Endpoint 0.
|
sl@0
|
89 |
{ EBeginStreamingCase, 0, EGL_SUCCESS, 1 }, // Endpoint 1.
|
sl@0
|
90 |
{ EAcquireImageCase, 0, EGL_SUCCESS, 1 }, // Endpoint 1
|
sl@0
|
91 |
{ EAcquireImageCase, 0, EGL_SUCCESS, 0 }, // Endpoint 0
|
sl@0
|
92 |
{ ECompareImageCase, 0, EGL_SUCCESS, 0, 0 }, // eglImage 0, image 0
|
sl@0
|
93 |
{ ECompareImageCase, 0, EGL_SUCCESS, 1, 1 }, // eglImage 1, image 1
|
sl@0
|
94 |
{ EReleaseImageCase, 0, EGL_SUCCESS, 0, 0 }, // Endpoint 0, image 0
|
sl@0
|
95 |
{ EReleaseImageCase, 0, EGL_SUCCESS, 1, 1 }, // Endpoint 1, image 1
|
sl@0
|
96 |
{ EEndStreamingCase, 0, EGL_SUCCESS, 0 }, // Endpoint 0
|
sl@0
|
97 |
{ EEndStreamingCase, 0, EGL_SUCCESS, 1 }, // Endpoint 1
|
sl@0
|
98 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS, 0 }, // Endpoint 0
|
sl@0
|
99 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS, 1 }, // Endpoint 1
|
sl@0
|
100 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
101 |
{ EFinishedCase }
|
sl@0
|
102 |
},
|
sl@0
|
103 |
},
|
sl@0
|
104 |
// Positive: Acquire, early destroy...
|
sl@0
|
105 |
{
|
sl@0
|
106 |
TESTIDS("547D"),
|
sl@0
|
107 |
CASETITLE("Functional: Positive: eglAcquireImageNOK with Valid Parameters: Acquire and destroy without release"),
|
sl@0
|
108 |
SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
|
sl@0
|
109 |
{
|
sl@0
|
110 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
111 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
112 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
113 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
114 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
115 |
{ EBeginStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
116 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
117 |
{ ECompareImageCase, 0, EGL_SUCCESS },
|
sl@0
|
118 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
119 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
120 |
{ EFinishedCase }
|
sl@0
|
121 |
},
|
sl@0
|
122 |
},
|
sl@0
|
123 |
// Positive: Acquire, early endstreaming...
|
sl@0
|
124 |
{
|
sl@0
|
125 |
TESTIDS("547E"),
|
sl@0
|
126 |
CASETITLE("Functional: Positive: eglAcquireImageNOK with Valid Parameters: Acquire and endstreaming without release"),
|
sl@0
|
127 |
SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
|
sl@0
|
128 |
{
|
sl@0
|
129 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
130 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
131 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
132 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
133 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
134 |
{ EBeginStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
135 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
136 |
{ ECompareImageCase, 0, EGL_SUCCESS },
|
sl@0
|
137 |
{ EEndStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
138 |
{ EBeginStreamingCase, 0, EGL_SUCCESS }, // We need to acquire again to see that it actually works correctly.
|
sl@0
|
139 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
140 |
{ ECompareImageCase, 0, EGL_SUCCESS },
|
sl@0
|
141 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
142 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
143 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
144 |
{ EFinishedCase }
|
sl@0
|
145 |
},
|
sl@0
|
146 |
},
|
sl@0
|
147 |
};
|
sl@0
|
148 |
|
sl@0
|
149 |
|
sl@0
|
150 |
static const TTestCase KAcquireNegativeCases[] =
|
sl@0
|
151 |
{
|
sl@0
|
152 |
{
|
sl@0
|
153 |
TESTIDS("555A"),
|
sl@0
|
154 |
CASETITLE("Functional: Negative: eglAcquireImageNOK with Bad Parameters: Not ready"),
|
sl@0
|
155 |
SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
|
sl@0
|
156 |
{
|
sl@0
|
157 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
158 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
159 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
160 |
{ EAcquireImageCase, EExpectError, EGL_BAD_ACCESS },
|
sl@0
|
161 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
162 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
163 |
{ EFinishedCase }
|
sl@0
|
164 |
},
|
sl@0
|
165 |
},
|
sl@0
|
166 |
{
|
sl@0
|
167 |
TESTIDS("555B"),
|
sl@0
|
168 |
CASETITLE("Functional: Negative: eglAcquireImageNOK with Bad Parameters: Not streaming"),
|
sl@0
|
169 |
SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
|
sl@0
|
170 |
{
|
sl@0
|
171 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
172 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
173 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
174 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
175 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
176 |
{ EAcquireImageCase, EExpectError, EGL_BAD_ACCESS },
|
sl@0
|
177 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
178 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
179 |
{ EFinishedCase }
|
sl@0
|
180 |
},
|
sl@0
|
181 |
},
|
sl@0
|
182 |
// Negative: Acquire twice with no release
|
sl@0
|
183 |
{
|
sl@0
|
184 |
TESTIDS("555C"),
|
sl@0
|
185 |
CASETITLE("Functional: Negative: eglAcquireImageNOK with Bad Parameters: Acquire twice (no release)"),
|
sl@0
|
186 |
SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
|
sl@0
|
187 |
{
|
sl@0
|
188 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
189 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
190 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
191 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
192 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
193 |
{ EBeginStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
194 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
195 |
{ ECompareImageCase, 0, EGL_SUCCESS },
|
sl@0
|
196 |
// Note that when a bad acquire is done, the eglimage value is not stored.
|
sl@0
|
197 |
// so we can still use the same image slot for the release later on.
|
sl@0
|
198 |
{ EAcquireImageCase, EExpectError, EGL_BAD_ACCESS },
|
sl@0
|
199 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
200 |
{ EEndStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
201 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
202 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
203 |
{ EFinishedCase }
|
sl@0
|
204 |
},
|
sl@0
|
205 |
},
|
sl@0
|
206 |
// Negative: Release bad eglImage then release the proper one, and acquire another (to ensure all worked).
|
sl@0
|
207 |
{
|
sl@0
|
208 |
TESTIDS("555D"),
|
sl@0
|
209 |
CASETITLE("Functional: Negative: eglAcquireImageNOK with Bad Parameters: release bad image then release correct one"),
|
sl@0
|
210 |
SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
|
sl@0
|
211 |
{
|
sl@0
|
212 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
213 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
214 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
215 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
216 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
217 |
{ EBeginStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
218 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
219 |
{ ECompareImageCase, 0, EGL_SUCCESS },
|
sl@0
|
220 |
{ EReleaseImageCase, EUseBadEglImage, EGL_BAD_PARAMETER },
|
sl@0
|
221 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
222 |
{ EEndStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
223 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
224 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
225 |
{ EFinishedCase }
|
sl@0
|
226 |
},
|
sl@0
|
227 |
}
|
sl@0
|
228 |
};
|
sl@0
|
229 |
|
sl@0
|
230 |
static const TTestCase KAcquireBadParamCases[] =
|
sl@0
|
231 |
{
|
sl@0
|
232 |
{
|
sl@0
|
233 |
TESTIDS("555E"),
|
sl@0
|
234 |
CASETITLE("Functional: Negative: eglAcquireImageNOK with Bad Parameters: Various bad Parameters(Not Ready state)"),
|
sl@0
|
235 |
SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
|
sl@0
|
236 |
{
|
sl@0
|
237 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
238 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
239 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
240 |
{ EAcquireImageCase, EUseBadDisplay, EGL_BAD_DISPLAY },
|
sl@0
|
241 |
{ EAcquireImageCase, EUseBadDisplay | EUseBadEndpoint, EGL_BAD_DISPLAY },
|
sl@0
|
242 |
{ EAcquireImageCase, EUseBadEndpoint, EGL_BAD_ENDPOINT_NOK },
|
sl@0
|
243 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
244 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
245 |
{ EFinishedCase },
|
sl@0
|
246 |
},
|
sl@0
|
247 |
},
|
sl@0
|
248 |
{
|
sl@0
|
249 |
TESTIDS("555F"),
|
sl@0
|
250 |
CASETITLE("Functional: Negative: eglAcquireImageNOK with Bad Parameters: Various bad Parameters(Ready state)"),
|
sl@0
|
251 |
SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
|
sl@0
|
252 |
{
|
sl@0
|
253 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
254 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
255 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
256 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
257 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
258 |
{ EAcquireImageCase, EUseBadDisplay, EGL_BAD_DISPLAY },
|
sl@0
|
259 |
{ EAcquireImageCase, EUseBadDisplay | EUseBadEndpoint, EGL_BAD_DISPLAY },
|
sl@0
|
260 |
{ EAcquireImageCase, EUseBadEndpoint, EGL_BAD_ENDPOINT_NOK },
|
sl@0
|
261 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
262 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
263 |
{ EFinishedCase },
|
sl@0
|
264 |
},
|
sl@0
|
265 |
},
|
sl@0
|
266 |
{
|
sl@0
|
267 |
TESTIDS("555G"),
|
sl@0
|
268 |
CASETITLE("Functional: Negative: eglAcquireImageNOK with Bad Parameters: Various bad Parameters(Streaming state)"),
|
sl@0
|
269 |
SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
|
sl@0
|
270 |
{
|
sl@0
|
271 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
272 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
273 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
274 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
275 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
276 |
{ EBeginStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
277 |
{ EAcquireImageCase, EUseBadDisplay, EGL_BAD_DISPLAY },
|
sl@0
|
278 |
{ EAcquireImageCase, EUseBadDisplay | EUseBadEndpoint, EGL_BAD_DISPLAY },
|
sl@0
|
279 |
{ EAcquireImageCase, EUseBadEndpoint, EGL_BAD_ENDPOINT_NOK },
|
sl@0
|
280 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
281 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
282 |
{ EFinishedCase },
|
sl@0
|
283 |
},
|
sl@0
|
284 |
},
|
sl@0
|
285 |
{
|
sl@0
|
286 |
TESTIDS("555H"),
|
sl@0
|
287 |
CASETITLE("Functional: Negative: eglAcquireImageNOK with Bad Parameters: Various bad Parameters(Image Acquired state)"),
|
sl@0
|
288 |
SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
|
sl@0
|
289 |
{
|
sl@0
|
290 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
291 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
292 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
293 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
294 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
295 |
{ EBeginStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
296 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
297 |
{ EAcquireImageCase, EUseBadDisplay, EGL_BAD_DISPLAY },
|
sl@0
|
298 |
{ EAcquireImageCase, EUseBadDisplay | EUseBadEndpoint, EGL_BAD_DISPLAY },
|
sl@0
|
299 |
{ EAcquireImageCase, EUseBadEndpoint, EGL_BAD_ENDPOINT_NOK },
|
sl@0
|
300 |
{ ECompareImageCase, 0, EGL_SUCCESS },
|
sl@0
|
301 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
302 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
303 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
304 |
{ EFinishedCase },
|
sl@0
|
305 |
},
|
sl@0
|
306 |
},
|
sl@0
|
307 |
};
|
sl@0
|
308 |
|
sl@0
|
309 |
|
sl@0
|
310 |
static const TTestCase KReleaseBadParamCases[] =
|
sl@0
|
311 |
{
|
sl@0
|
312 |
{
|
sl@0
|
313 |
TESTIDS("556A"),
|
sl@0
|
314 |
CASETITLE("Functional: Negative: eglReleaseImageNOK with Bad Parameters: Various bad Parameters(Not Ready state)"),
|
sl@0
|
315 |
SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
|
sl@0
|
316 |
{
|
sl@0
|
317 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
318 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
319 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
320 |
{ EReleaseImageCase, EUseBadEglImage, EGL_BAD_PARAMETER },
|
sl@0
|
321 |
{ EReleaseImageCase, EUseBadEglImage | EUseBadDisplay, EGL_BAD_DISPLAY },
|
sl@0
|
322 |
{ EReleaseImageCase, EUseBadEglImage | EUseBadDisplay | EUseBadEndpoint, EGL_BAD_DISPLAY },
|
sl@0
|
323 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
324 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
325 |
{ EFinishedCase },
|
sl@0
|
326 |
},
|
sl@0
|
327 |
},
|
sl@0
|
328 |
{
|
sl@0
|
329 |
TESTIDS("556B"),
|
sl@0
|
330 |
CASETITLE("Functional: Negative: eglReleaseImageNOK with Bad Parameters: Various bad Parameters(Ready state)"),
|
sl@0
|
331 |
SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
|
sl@0
|
332 |
{
|
sl@0
|
333 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
334 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
335 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
336 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
337 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
338 |
{ EReleaseImageCase, EUseBadEglImage, EGL_BAD_PARAMETER },
|
sl@0
|
339 |
{ EReleaseImageCase, EUseBadEglImage | EUseBadDisplay, EGL_BAD_DISPLAY },
|
sl@0
|
340 |
{ EReleaseImageCase, EUseBadEglImage | EUseBadDisplay | EUseBadEndpoint, EGL_BAD_DISPLAY },
|
sl@0
|
341 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
342 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
343 |
{ EFinishedCase },
|
sl@0
|
344 |
},
|
sl@0
|
345 |
},
|
sl@0
|
346 |
{
|
sl@0
|
347 |
TESTIDS("556C"),
|
sl@0
|
348 |
CASETITLE("Functional: Negative: eglReleaseImageNOK with Bad Parameters: Bad Parameters(Streaming state)"),
|
sl@0
|
349 |
SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
|
sl@0
|
350 |
{
|
sl@0
|
351 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
352 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
353 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
354 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
355 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
356 |
{ EBeginStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
357 |
{ EReleaseImageCase, EUseBadEglImage, EGL_BAD_PARAMETER },
|
sl@0
|
358 |
{ EReleaseImageCase, EUseBadEglImage | EUseBadDisplay, EGL_BAD_DISPLAY },
|
sl@0
|
359 |
{ EReleaseImageCase, EUseBadEglImage | EUseBadDisplay | EUseBadEndpoint, EGL_BAD_DISPLAY },
|
sl@0
|
360 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
361 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
362 |
{ EFinishedCase },
|
sl@0
|
363 |
},
|
sl@0
|
364 |
},
|
sl@0
|
365 |
{
|
sl@0
|
366 |
TESTIDS("556D"),
|
sl@0
|
367 |
CASETITLE("Functional: Negative: eglReleaseImageNOK with Bad Parameters: Various bad Parameters(Image Acquired state)"),
|
sl@0
|
368 |
SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
|
sl@0
|
369 |
{
|
sl@0
|
370 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
371 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
372 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
373 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
374 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
375 |
{ EBeginStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
376 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
377 |
{ EReleaseImageCase, EUseBadDisplay, EGL_BAD_DISPLAY },
|
sl@0
|
378 |
{ EReleaseImageCase, EUseBadEndpoint, EGL_BAD_ENDPOINT_NOK },
|
sl@0
|
379 |
{ EReleaseImageCase, EUseBadEglImage, EGL_BAD_PARAMETER },
|
sl@0
|
380 |
{ EReleaseImageCase, EUseBadApi, EGL_BAD_PARAMETER },
|
sl@0
|
381 |
{ EReleaseImageCase, EUseBadDisplay | EUseBadEndpoint, EGL_BAD_DISPLAY },
|
sl@0
|
382 |
{ EReleaseImageCase, EUseBadDisplay | EUseBadEglImage, EGL_BAD_DISPLAY },
|
sl@0
|
383 |
{ EReleaseImageCase, EUseBadDisplay | EUseBadApi, EGL_BAD_DISPLAY },
|
sl@0
|
384 |
{ EReleaseImageCase, EUseBadEglImage | EUseBadApi, EGL_BAD_PARAMETER },
|
sl@0
|
385 |
{ EReleaseImageCase, EUseBadDisplay | EUseBadEndpoint | EUseBadEglImage, EGL_BAD_DISPLAY },
|
sl@0
|
386 |
{ EReleaseImageCase, EUseBadDisplay | EUseBadEndpoint | EUseBadApi, EGL_BAD_DISPLAY },
|
sl@0
|
387 |
{ EReleaseImageCase, EUseBadDisplay | EUseBadEglImage | EUseBadApi, EGL_BAD_DISPLAY },
|
sl@0
|
388 |
{ EReleaseImageCase, EUseBadDisplay | EUseBadEndpoint | EUseBadEglImage | EUseBadApi, EGL_BAD_DISPLAY },
|
sl@0
|
389 |
{ ECompareImageCase, 0, EGL_SUCCESS },
|
sl@0
|
390 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
391 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
392 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
393 |
{ EFinishedCase },
|
sl@0
|
394 |
},
|
sl@0
|
395 |
},
|
sl@0
|
396 |
};
|
sl@0
|
397 |
|
sl@0
|
398 |
|
sl@0
|
399 |
static const TTestCase KReleasePositiveCases[] =
|
sl@0
|
400 |
{
|
sl@0
|
401 |
{
|
sl@0
|
402 |
TESTIDS("548A"),
|
sl@0
|
403 |
CASETITLE("Functional: Positive: eglReleaseImageNOK with Valid Parameters: Simple acquire then release"),
|
sl@0
|
404 |
SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
|
sl@0
|
405 |
{
|
sl@0
|
406 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
407 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
408 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
409 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
410 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
411 |
{ EBeginStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
412 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
413 |
{ ECompareImageCase, 0, EGL_SUCCESS },
|
sl@0
|
414 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
415 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
416 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
417 |
{ EFinishedCase },
|
sl@0
|
418 |
},
|
sl@0
|
419 |
},
|
sl@0
|
420 |
{
|
sl@0
|
421 |
TESTIDS("548B"),
|
sl@0
|
422 |
CASETITLE("Functional: Positive: eglReleaseImageNOK with Valid Parameters: Acquire, release twice"),
|
sl@0
|
423 |
SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
|
sl@0
|
424 |
{
|
sl@0
|
425 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
426 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
427 |
{ ECreateEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
428 |
{ EDrawContentCase, 0, EGL_SUCCESS },
|
sl@0
|
429 |
{ EContentUpdateCase, 0, EGL_SUCCESS },
|
sl@0
|
430 |
{ EBeginStreamingCase, 0, EGL_SUCCESS },
|
sl@0
|
431 |
{ EAcquireImageCase, 0, EGL_SUCCESS },
|
sl@0
|
432 |
{ ECompareImageCase, 0, EGL_SUCCESS },
|
sl@0
|
433 |
{ EReleaseImageCase, 0, EGL_SUCCESS },
|
sl@0
|
434 |
// Should fail.
|
sl@0
|
435 |
{ EReleaseImageCase, EExpectError, EGL_BAD_PARAMETER },
|
sl@0
|
436 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS },
|
sl@0
|
437 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
438 |
{ EFinishedCase },
|
sl@0
|
439 |
},
|
sl@0
|
440 |
},
|
sl@0
|
441 |
};
|
sl@0
|
442 |
|
sl@0
|
443 |
static const TTestCase KReleaseNegativeCases[] =
|
sl@0
|
444 |
{
|
sl@0
|
445 |
{
|
sl@0
|
446 |
TESTIDS("548C"),
|
sl@0
|
447 |
CASETITLE("Functional: Negative: eglReleaseImageNOK with Valid Parameters: Two EPs, acquire, then release on wrong EP."),
|
sl@0
|
448 |
SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
|
sl@0
|
449 |
{
|
sl@0
|
450 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
451 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
452 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 1, EStandardSurface },
|
sl@0
|
453 |
{ ECreateEndpointCase, 0, EGL_SUCCESS, 0, 0 },
|
sl@0
|
454 |
{ ECreateEndpointCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
455 |
{ EDrawContentCase, 0, EGL_SUCCESS, 0, 0 },
|
sl@0
|
456 |
{ EContentUpdateCase, 0, EGL_SUCCESS, 0 },
|
sl@0
|
457 |
{ EDrawContentCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
458 |
{ EContentUpdateCase, 0, EGL_SUCCESS, 1 },
|
sl@0
|
459 |
{ EBeginStreamingCase, 0, EGL_SUCCESS, 0 },
|
sl@0
|
460 |
{ EBeginStreamingCase, 0, EGL_SUCCESS, 1 },
|
sl@0
|
461 |
{ EAcquireImageCase, 0, EGL_SUCCESS, 0, 0 },
|
sl@0
|
462 |
{ EAcquireImageCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
463 |
// Swapping the release of the image - should fail.
|
sl@0
|
464 |
{ EReleaseImageCase, EExpectError, EGL_BAD_PARAMETER, 0, 1 },
|
sl@0
|
465 |
{ EReleaseImageCase, EExpectError, EGL_BAD_PARAMETER, 1, 0 },
|
sl@0
|
466 |
// Check that the originally acquired images are still there...
|
sl@0
|
467 |
{ ECompareImageCase, 0, EGL_SUCCESS, 0, 0 },
|
sl@0
|
468 |
{ ECompareImageCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
469 |
// Now do it the right way around
|
sl@0
|
470 |
{ EReleaseImageCase, 0, EGL_SUCCESS, 1, 1 },
|
sl@0
|
471 |
{ EReleaseImageCase, 0, EGL_SUCCESS, 0, 0 },
|
sl@0
|
472 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS, 0 },
|
sl@0
|
473 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS, 1 },
|
sl@0
|
474 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
475 |
{ EFinishedCase },
|
sl@0
|
476 |
},
|
sl@0
|
477 |
},
|
sl@0
|
478 |
{
|
sl@0
|
479 |
TESTIDS("619"),
|
sl@0
|
480 |
CASETITLE("Functional: Negative: eglDestroyImageKHR can not be used for images acquired from endpoint."),
|
sl@0
|
481 |
SurfaceTypes2(ESurfTypeRaw, ESurfTypeEglWindow),
|
sl@0
|
482 |
{
|
sl@0
|
483 |
{ EInitializeCase, 0, EGL_SUCCESS },
|
sl@0
|
484 |
{ ECreateSurfaceCase, 0, EGL_SUCCESS, 0, EStandardSurface },
|
sl@0
|
485 |
{ ECreateEndpointCase, 0, EGL_SUCCESS, },
|
sl@0
|
486 |
{ EDrawContentCase, 0, EGL_SUCCESS, },
|
sl@0
|
487 |
{ EContentUpdateCase, 0, EGL_SUCCESS, },
|
sl@0
|
488 |
{ EBeginStreamingCase, 0, EGL_SUCCESS, },
|
sl@0
|
489 |
{ EAcquireImageCase, 0, EGL_SUCCESS, },
|
sl@0
|
490 |
{ EDestroyEglImageCase, EExpectError, EGL_BAD_ACCESS },
|
sl@0
|
491 |
// Compare Image to make sure it's still "there".
|
sl@0
|
492 |
{ ECompareImageCase, 0, EGL_SUCCESS, },
|
sl@0
|
493 |
{ EReleaseImageCase, 0, EGL_SUCCESS, },
|
sl@0
|
494 |
{ EDestroyEndpointCase, 0, EGL_SUCCESS, },
|
sl@0
|
495 |
{ ETerminateCase, 0, EGL_SUCCESS },
|
sl@0
|
496 |
{ EFinishedCase },
|
sl@0
|
497 |
},
|
sl@0
|
498 |
},
|
sl@0
|
499 |
|
sl@0
|
500 |
};
|
sl@0
|
501 |
|
sl@0
|
502 |
|
sl@0
|
503 |
static const TTestCases KTestCases[] =
|
sl@0
|
504 |
{
|
sl@0
|
505 |
TestCase(KAcquirePositiveCases),
|
sl@0
|
506 |
TestCase(KAcquireNegativeCases),
|
sl@0
|
507 |
TestCase(KAcquireBadParamCases),
|
sl@0
|
508 |
TestCase(KReleasePositiveCases),
|
sl@0
|
509 |
TestCase(KReleaseBadParamCases),
|
sl@0
|
510 |
TestCase(KReleaseNegativeCases),
|
sl@0
|
511 |
};
|
sl@0
|
512 |
|
sl@0
|
513 |
const TInt KNumberTestCases = sizeof(KTestCases) / sizeof(KTestCases[0]);
|
sl@0
|
514 |
|
sl@0
|
515 |
|
sl@0
|
516 |
CEglTest_LocalTestStep_EndpointAcquire::CEglTest_LocalTestStep_EndpointAcquire():
|
sl@0
|
517 |
CEgltest_Local_Engine(KTestCases, KNumberTestCases)
|
sl@0
|
518 |
{
|
sl@0
|
519 |
}
|