2015-03-27 12:55:21 +03:00
|
|
|
/*
|
|
|
|
* Copyright © 2013 DENSO CORPORATION
|
|
|
|
* Copyright © 2015 Collabora, Ltd.
|
|
|
|
*
|
2015-06-12 01:39:40 +03:00
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining
|
|
|
|
* a copy of this software and associated documentation files (the
|
|
|
|
* "Software"), to deal in the Software without restriction, including
|
|
|
|
* without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
|
|
* permit persons to whom the Software is furnished to do so, subject to
|
|
|
|
* the following conditions:
|
2015-03-27 12:55:21 +03:00
|
|
|
*
|
2015-06-12 01:39:40 +03:00
|
|
|
* The above copyright notice and this permission notice (including the
|
|
|
|
* next paragraph) shall be included in all copies or substantial
|
|
|
|
* portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
|
|
|
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
|
|
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
|
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
* SOFTWARE.
|
2015-03-27 12:55:21 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <signal.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
2015-06-16 01:37:07 +03:00
|
|
|
#include "src/compositor.h"
|
|
|
|
#include "ivi-shell/ivi-layout-export.h"
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
#include "ivi-shell/ivi-layout-private.h"
|
2015-06-22 09:34:18 +03:00
|
|
|
#include "ivi-test.h"
|
2015-03-27 12:55:21 +03:00
|
|
|
|
|
|
|
struct test_context {
|
|
|
|
struct weston_compositor *compositor;
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *layout_interface;
|
2015-06-22 09:36:11 +03:00
|
|
|
uint32_t user_flags;
|
2015-03-27 12:55:21 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
static void
|
|
|
|
iassert_fail(const char *cond, const char *file, int line,
|
|
|
|
const char *func, struct test_context *ctx)
|
|
|
|
{
|
|
|
|
weston_log("Assert failure in %s:%d, %s: '%s'\n",
|
|
|
|
file, line, func, cond);
|
|
|
|
weston_compositor_exit_with_code(ctx->compositor, EXIT_FAILURE);
|
|
|
|
}
|
|
|
|
|
|
|
|
#define iassert(cond) ({ \
|
|
|
|
bool b_ = (cond); \
|
|
|
|
if (!b_) \
|
|
|
|
iassert_fail(#cond, __FILE__, __LINE__, __func__, ctx); \
|
|
|
|
b_; \
|
|
|
|
})
|
|
|
|
|
|
|
|
/************************ tests begin ******************************/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* These are all internal ivi_layout API tests that do not require
|
|
|
|
* any client objects.
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
test_surface_bad_visibility(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-03-27 12:55:21 +03:00
|
|
|
bool visibility;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->surface_set_visibility(NULL, true) == IVI_FAILED);
|
2015-03-27 12:55:21 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->commit_changes();
|
2015-03-27 12:55:21 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
visibility = lyt->surface_get_visibility(NULL);
|
2015-03-27 12:55:21 +03:00
|
|
|
iassert(visibility == false);
|
|
|
|
}
|
|
|
|
|
2015-06-22 09:33:59 +03:00
|
|
|
static void
|
|
|
|
test_surface_bad_destination_rectangle(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:33:59 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->surface_set_destination_rectangle(NULL, 20, 30, 200, 300) == IVI_FAILED);
|
2015-06-22 09:33:59 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_surface_bad_orientation(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:33:59 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->surface_set_orientation(NULL, WL_OUTPUT_TRANSFORM_90) == IVI_FAILED);
|
2015-06-22 09:33:59 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->surface_get_orientation(NULL) == WL_OUTPUT_TRANSFORM_NORMAL);
|
2015-06-22 09:33:59 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_surface_bad_dimension(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:33:59 +03:00
|
|
|
struct ivi_layout_surface *ivisurf = NULL;
|
|
|
|
int32_t dest_width;
|
|
|
|
int32_t dest_height;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->surface_set_dimension(NULL, 200, 300) == IVI_FAILED);
|
2015-06-22 09:33:59 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->commit_changes();
|
2015-06-22 09:33:59 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->surface_get_dimension(NULL, &dest_width, &dest_height) == IVI_FAILED);
|
|
|
|
iassert(lyt->surface_get_dimension(ivisurf, NULL, &dest_height) == IVI_FAILED);
|
|
|
|
iassert(lyt->surface_get_dimension(ivisurf, &dest_width, NULL) == IVI_FAILED);
|
2015-06-22 09:33:59 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_surface_bad_position(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:33:59 +03:00
|
|
|
struct ivi_layout_surface *ivisurf = NULL;
|
|
|
|
int32_t dest_x;
|
|
|
|
int32_t dest_y;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->surface_set_position(NULL, 20, 30) == IVI_FAILED);
|
2015-06-22 09:33:59 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->commit_changes();
|
2015-06-22 09:33:59 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->surface_get_position(NULL, &dest_x, &dest_y) == IVI_FAILED);
|
|
|
|
iassert(lyt->surface_get_position(ivisurf, NULL, &dest_y) == IVI_FAILED);
|
|
|
|
iassert(lyt->surface_get_position(ivisurf, &dest_x, NULL) == IVI_FAILED);
|
2015-06-22 09:33:59 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_surface_bad_source_rectangle(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:33:59 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->surface_set_source_rectangle(NULL, 20, 30, 200, 300) == IVI_FAILED);
|
2015-06-22 09:33:59 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_surface_bad_properties(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:33:59 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->get_properties_of_surface(NULL) == NULL);
|
2015-06-22 09:33:59 +03:00
|
|
|
}
|
|
|
|
|
2015-06-22 09:34:18 +03:00
|
|
|
static void
|
|
|
|
test_layer_create(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:34:18 +03:00
|
|
|
uint32_t id1;
|
|
|
|
uint32_t id2;
|
|
|
|
struct ivi_layout_layer *ivilayer;
|
|
|
|
struct ivi_layout_layer *new_ivilayer;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
2015-06-22 09:34:18 +03:00
|
|
|
iassert(ivilayer != NULL);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(IVI_TEST_LAYER_ID(0) == lyt->get_id_of_layer(ivilayer));
|
2015-06-22 09:34:18 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
new_ivilayer = lyt->get_layer_from_id(IVI_TEST_LAYER_ID(0));
|
2015-06-22 09:34:18 +03:00
|
|
|
iassert(ivilayer == new_ivilayer);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
id1 = lyt->get_id_of_layer(ivilayer);
|
|
|
|
id2 = lyt->get_id_of_layer(new_ivilayer);
|
2015-06-22 09:34:18 +03:00
|
|
|
iassert(id1 == id2);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayer);
|
|
|
|
iassert(lyt->get_layer_from_id(IVI_TEST_LAYER_ID(0)) == NULL);
|
2015-06-22 09:34:18 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_layer_visibility(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:34:18 +03:00
|
|
|
struct ivi_layout_layer *ivilayer;
|
|
|
|
const struct ivi_layout_layer_properties *prop;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
2015-06-22 09:34:18 +03:00
|
|
|
iassert(ivilayer != NULL);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_get_visibility(ivilayer) == false);
|
2015-06-22 09:34:18 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_visibility(ivilayer, true) == IVI_SUCCEEDED);
|
2015-06-22 09:34:18 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_get_visibility(ivilayer) == false);
|
2015-06-22 09:34:18 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->commit_changes();
|
2015-06-22 09:34:18 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_get_visibility(ivilayer) == true);
|
2015-06-22 09:34:18 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
prop = lyt->get_properties_of_layer(ivilayer);
|
2015-06-22 09:34:18 +03:00
|
|
|
iassert(prop->visibility == true);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayer);
|
2015-06-22 09:34:18 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_layer_opacity(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:34:18 +03:00
|
|
|
struct ivi_layout_layer *ivilayer;
|
|
|
|
const struct ivi_layout_layer_properties *prop;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
2015-06-22 09:34:18 +03:00
|
|
|
iassert(ivilayer != NULL);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_get_opacity(ivilayer) == wl_fixed_from_double(1.0));
|
2015-06-22 09:34:18 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_opacity(
|
2015-06-22 09:34:18 +03:00
|
|
|
ivilayer, wl_fixed_from_double(0.5)) == IVI_SUCCEEDED);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_get_opacity(ivilayer) == wl_fixed_from_double(1.0));
|
2015-06-22 09:34:18 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->commit_changes();
|
2015-06-22 09:34:18 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_get_opacity(ivilayer) == wl_fixed_from_double(0.5));
|
2015-06-22 09:34:18 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
prop = lyt->get_properties_of_layer(ivilayer);
|
2015-06-22 09:34:18 +03:00
|
|
|
iassert(prop->opacity == wl_fixed_from_double(0.5));
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayer);
|
2015-06-22 09:34:18 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_layer_orientation(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:34:18 +03:00
|
|
|
struct ivi_layout_layer *ivilayer;
|
|
|
|
const struct ivi_layout_layer_properties *prop;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
2015-06-22 09:34:18 +03:00
|
|
|
iassert(ivilayer != NULL);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_get_orientation(ivilayer) == WL_OUTPUT_TRANSFORM_NORMAL);
|
2015-06-22 09:34:18 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_orientation(
|
2015-06-22 09:34:18 +03:00
|
|
|
ivilayer, WL_OUTPUT_TRANSFORM_90) == IVI_SUCCEEDED);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_get_orientation(ivilayer) == WL_OUTPUT_TRANSFORM_NORMAL);
|
2015-06-22 09:34:18 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->commit_changes();
|
2015-06-22 09:34:18 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_get_orientation(ivilayer) == WL_OUTPUT_TRANSFORM_90);
|
2015-06-22 09:34:18 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
prop = lyt->get_properties_of_layer(ivilayer);
|
2015-06-22 09:34:18 +03:00
|
|
|
iassert(prop->orientation == WL_OUTPUT_TRANSFORM_90);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayer);
|
2015-06-22 09:34:18 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_layer_dimension(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:34:18 +03:00
|
|
|
struct ivi_layout_layer *ivilayer;
|
|
|
|
const struct ivi_layout_layer_properties *prop;
|
|
|
|
int32_t dest_width;
|
|
|
|
int32_t dest_height;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
2015-06-22 09:34:18 +03:00
|
|
|
iassert(ivilayer != NULL);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_get_dimension(
|
2015-06-22 09:34:18 +03:00
|
|
|
ivilayer, &dest_width, &dest_height) == IVI_SUCCEEDED);
|
|
|
|
iassert(dest_width == 200);
|
|
|
|
iassert(dest_height == 300);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_dimension(ivilayer, 400, 600) == IVI_SUCCEEDED);
|
2015-06-22 09:34:18 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_get_dimension(
|
2015-06-22 09:34:18 +03:00
|
|
|
ivilayer, &dest_width, &dest_height) == IVI_SUCCEEDED);
|
|
|
|
iassert(dest_width == 200);
|
|
|
|
iassert(dest_height == 300);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->commit_changes();
|
2015-06-22 09:34:18 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(IVI_SUCCEEDED == lyt->layer_get_dimension(
|
2015-06-22 09:34:18 +03:00
|
|
|
ivilayer, &dest_width, &dest_height));
|
|
|
|
iassert(dest_width == 400);
|
|
|
|
iassert(dest_height == 600);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
prop = lyt->get_properties_of_layer(ivilayer);
|
2015-06-22 09:34:18 +03:00
|
|
|
iassert(prop->dest_width == 400);
|
|
|
|
iassert(prop->dest_height == 600);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayer);
|
2015-06-22 09:34:18 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_layer_position(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:34:18 +03:00
|
|
|
struct ivi_layout_layer *ivilayer;
|
|
|
|
const struct ivi_layout_layer_properties *prop;
|
|
|
|
int32_t dest_x;
|
|
|
|
int32_t dest_y;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
2015-06-22 09:34:18 +03:00
|
|
|
iassert(ivilayer != NULL);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_get_position(
|
2015-06-22 09:34:18 +03:00
|
|
|
ivilayer, &dest_x, &dest_y) == IVI_SUCCEEDED);
|
|
|
|
iassert(dest_x == 0);
|
|
|
|
iassert(dest_y == 0);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_position(ivilayer, 20, 30) == IVI_SUCCEEDED);
|
2015-06-22 09:34:18 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_get_position(
|
2015-06-22 09:34:18 +03:00
|
|
|
ivilayer, &dest_x, &dest_y) == IVI_SUCCEEDED);
|
|
|
|
iassert(dest_x == 0);
|
|
|
|
iassert(dest_y == 0);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->commit_changes();
|
2015-06-22 09:34:18 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_get_position(
|
2015-06-22 09:34:18 +03:00
|
|
|
ivilayer, &dest_x, &dest_y) == IVI_SUCCEEDED);
|
|
|
|
iassert(dest_x == 20);
|
|
|
|
iassert(dest_y == 30);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
prop = lyt->get_properties_of_layer(ivilayer);
|
2015-06-22 09:34:18 +03:00
|
|
|
iassert(prop->dest_x == 20);
|
|
|
|
iassert(prop->dest_y == 30);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayer);
|
2015-06-22 09:34:18 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_layer_destination_rectangle(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:34:18 +03:00
|
|
|
struct ivi_layout_layer *ivilayer;
|
|
|
|
const struct ivi_layout_layer_properties *prop;
|
|
|
|
int32_t dest_width;
|
|
|
|
int32_t dest_height;
|
|
|
|
int32_t dest_x;
|
|
|
|
int32_t dest_y;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
2015-06-22 09:34:18 +03:00
|
|
|
iassert(ivilayer != NULL);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
prop = lyt->get_properties_of_layer(ivilayer);
|
2015-06-22 09:34:18 +03:00
|
|
|
iassert(prop->dest_width == 200);
|
|
|
|
iassert(prop->dest_height == 300);
|
|
|
|
iassert(prop->dest_x == 0);
|
|
|
|
iassert(prop->dest_y == 0);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_destination_rectangle(
|
2015-06-22 09:34:18 +03:00
|
|
|
ivilayer, 20, 30, 400, 600) == IVI_SUCCEEDED);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
prop = lyt->get_properties_of_layer(ivilayer);
|
2015-06-22 09:34:18 +03:00
|
|
|
iassert(prop->dest_width == 200);
|
|
|
|
iassert(prop->dest_height == 300);
|
|
|
|
iassert(prop->dest_x == 0);
|
|
|
|
iassert(prop->dest_y == 0);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->commit_changes();
|
2015-06-22 09:34:18 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_get_dimension(
|
2015-06-22 09:34:18 +03:00
|
|
|
ivilayer, &dest_width, &dest_height) == IVI_SUCCEEDED);
|
|
|
|
iassert(dest_width == 400);
|
|
|
|
iassert(dest_height == 600);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_get_position(
|
2015-06-22 09:34:18 +03:00
|
|
|
ivilayer, &dest_x, &dest_y) == IVI_SUCCEEDED);
|
|
|
|
iassert(dest_x == 20);
|
|
|
|
iassert(dest_y == 30);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
prop = lyt->get_properties_of_layer(ivilayer);
|
2015-06-22 09:34:18 +03:00
|
|
|
iassert(prop->dest_width == 400);
|
|
|
|
iassert(prop->dest_height == 600);
|
|
|
|
iassert(prop->dest_x == 20);
|
|
|
|
iassert(prop->dest_y == 30);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayer);
|
2015-06-22 09:34:18 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_layer_source_rectangle(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:34:18 +03:00
|
|
|
struct ivi_layout_layer *ivilayer;
|
|
|
|
const struct ivi_layout_layer_properties *prop;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
2015-06-22 09:34:18 +03:00
|
|
|
iassert(ivilayer != NULL);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
prop = lyt->get_properties_of_layer(ivilayer);
|
2015-06-22 09:34:18 +03:00
|
|
|
iassert(prop->source_width == 200);
|
|
|
|
iassert(prop->source_height == 300);
|
|
|
|
iassert(prop->source_x == 0);
|
|
|
|
iassert(prop->source_y == 0);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_source_rectangle(
|
2015-06-22 09:34:18 +03:00
|
|
|
ivilayer, 20, 30, 400, 600) == IVI_SUCCEEDED);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
prop = lyt->get_properties_of_layer(ivilayer);
|
2015-06-22 09:34:18 +03:00
|
|
|
iassert(prop->source_width == 200);
|
|
|
|
iassert(prop->source_height == 300);
|
|
|
|
iassert(prop->source_x == 0);
|
|
|
|
iassert(prop->source_y == 0);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->commit_changes();
|
2015-06-22 09:34:18 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
prop = lyt->get_properties_of_layer(ivilayer);
|
2015-06-22 09:34:18 +03:00
|
|
|
iassert(prop->source_width == 400);
|
|
|
|
iassert(prop->source_height == 600);
|
|
|
|
iassert(prop->source_x == 20);
|
|
|
|
iassert(prop->source_y == 30);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayer);
|
2015-06-22 09:34:18 +03:00
|
|
|
}
|
|
|
|
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
static void
|
|
|
|
test_layer_bad_remove(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
|
|
|
lyt->layer_destroy(NULL);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_layer_bad_visibility(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_visibility(NULL, true) == IVI_FAILED);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->commit_changes();
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_get_visibility(NULL) == false);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_layer_bad_opacity(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
struct ivi_layout_layer *ivilayer;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
iassert(ivilayer != NULL);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_opacity(
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
NULL, wl_fixed_from_double(0.3)) == IVI_FAILED);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_opacity(
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
ivilayer, wl_fixed_from_double(0.3)) == IVI_SUCCEEDED);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_opacity(
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
ivilayer, wl_fixed_from_double(-1)) == IVI_FAILED);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->commit_changes();
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_get_opacity(ivilayer) == wl_fixed_from_double(0.3));
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_opacity(
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
ivilayer, wl_fixed_from_double(1.1)) == IVI_FAILED);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->commit_changes();
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_get_opacity(ivilayer) == wl_fixed_from_double(0.3));
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_opacity(
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
NULL, wl_fixed_from_double(0.5)) == IVI_FAILED);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->commit_changes();
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_get_opacity(NULL) == wl_fixed_from_double(0.0));
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayer);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_layer_bad_destination_rectangle(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_destination_rectangle(
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
NULL, 20, 30, 200, 300) == IVI_FAILED);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_layer_bad_orientation(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_orientation(
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
NULL, WL_OUTPUT_TRANSFORM_90) == IVI_FAILED);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->commit_changes();
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_get_orientation(NULL) == WL_OUTPUT_TRANSFORM_NORMAL);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_layer_bad_dimension(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
struct ivi_layout_layer *ivilayer;
|
|
|
|
int32_t dest_width;
|
|
|
|
int32_t dest_height;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
iassert(ivilayer != NULL);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_dimension(NULL, 200, 300) == IVI_FAILED);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->commit_changes();
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_get_dimension(
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
NULL, &dest_width, &dest_height) == IVI_FAILED);
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_get_dimension(
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
ivilayer, NULL, &dest_height) == IVI_FAILED);
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_get_dimension(
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
ivilayer, &dest_width, NULL) == IVI_FAILED);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayer);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_layer_bad_position(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
struct ivi_layout_layer *ivilayer;
|
|
|
|
int32_t dest_x;
|
|
|
|
int32_t dest_y;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
iassert(ivilayer != NULL);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_position(NULL, 20, 30) == IVI_FAILED);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->commit_changes();
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_get_position(NULL, &dest_x, &dest_y) == IVI_FAILED);
|
|
|
|
iassert(lyt->layer_get_position(ivilayer, NULL, &dest_y) == IVI_FAILED);
|
|
|
|
iassert(lyt->layer_get_position(ivilayer, &dest_x, NULL) == IVI_FAILED);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayer);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_layer_bad_source_rectangle(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_source_rectangle(
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
NULL, 20, 30, 200, 300) == IVI_FAILED);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_layer_bad_properties(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->get_properties_of_layer(NULL) == NULL);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_commit_changes_after_visibility_set_layer_destroy(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
struct ivi_layout_layer *ivilayer;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
iassert(ivilayer != NULL);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_visibility(ivilayer, true) == IVI_SUCCEEDED);
|
|
|
|
lyt->layer_destroy(ivilayer);
|
|
|
|
lyt->commit_changes();
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_commit_changes_after_opacity_set_layer_destroy(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
struct ivi_layout_layer *ivilayer;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
iassert(ivilayer != NULL);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_opacity(
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
ivilayer, wl_fixed_from_double(0.5)) == IVI_SUCCEEDED);
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayer);
|
|
|
|
lyt->commit_changes();
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_commit_changes_after_orientation_set_layer_destroy(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
struct ivi_layout_layer *ivilayer;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
iassert(ivilayer != NULL);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_orientation(
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
ivilayer, WL_OUTPUT_TRANSFORM_90) == IVI_SUCCEEDED);
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayer);
|
|
|
|
lyt->commit_changes();
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_commit_changes_after_dimension_set_layer_destroy(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
struct ivi_layout_layer *ivilayer;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
iassert(ivilayer != NULL);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_dimension(ivilayer, 200, 300) == IVI_SUCCEEDED);
|
|
|
|
lyt->layer_destroy(ivilayer);
|
|
|
|
lyt->commit_changes();
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_commit_changes_after_position_set_layer_destroy(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
struct ivi_layout_layer *ivilayer;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
iassert(ivilayer != NULL);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_position(ivilayer, 20, 30) == IVI_SUCCEEDED);
|
|
|
|
lyt->layer_destroy(ivilayer);
|
|
|
|
lyt->commit_changes();
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_commit_changes_after_source_rectangle_set_layer_destroy(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
struct ivi_layout_layer *ivilayer;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
iassert(ivilayer != NULL);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_source_rectangle(
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
ivilayer, 20, 30, 200, 300) == IVI_SUCCEEDED);
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayer);
|
|
|
|
lyt->commit_changes();
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_commit_changes_after_destination_rectangle_set_layer_destroy(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
struct ivi_layout_layer *ivilayer;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
iassert(ivilayer != NULL);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_destination_rectangle(
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
ivilayer, 20, 30, 200, 300) == IVI_SUCCEEDED);
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayer);
|
|
|
|
lyt->commit_changes();
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_layer_create_duplicate(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
struct ivi_layout_layer *ivilayer;
|
|
|
|
struct ivi_layout_layer *duplicatelayer;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
iassert(ivilayer != NULL);
|
|
|
|
|
|
|
|
if (ivilayer != NULL)
|
|
|
|
iassert(ivilayer->ref_count == 1);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
duplicatelayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
iassert(ivilayer == duplicatelayer);
|
|
|
|
|
|
|
|
if (ivilayer != NULL)
|
|
|
|
iassert(ivilayer->ref_count == 2);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayer);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
|
|
|
|
if (ivilayer != NULL)
|
|
|
|
iassert(ivilayer->ref_count == 1);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayer);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_get_layer_after_destory_layer(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
struct ivi_layout_layer *ivilayer;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
iassert(ivilayer != NULL);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayer);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayer = lyt->get_layer_from_id(IVI_TEST_LAYER_ID(0));
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
iassert(ivilayer == NULL);
|
|
|
|
}
|
|
|
|
|
2015-06-22 09:35:25 +03:00
|
|
|
static void
|
|
|
|
test_screen_id(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:35:25 +03:00
|
|
|
struct ivi_layout_screen **iviscrns;
|
|
|
|
int32_t screen_length = 0;
|
|
|
|
uint32_t id_screen;
|
|
|
|
int32_t i;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->get_screens(&screen_length, &iviscrns) == IVI_SUCCEEDED);
|
2015-06-22 09:35:25 +03:00
|
|
|
iassert(screen_length > 0);
|
|
|
|
|
|
|
|
for (i = 0; i < screen_length; ++i) {
|
2015-10-15 17:51:41 +03:00
|
|
|
id_screen = lyt->get_id_of_screen(iviscrns[i]);
|
|
|
|
iassert(lyt->get_screen_from_id(id_screen) == iviscrns[i]);
|
2015-06-22 09:35:25 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
if (screen_length > 0)
|
|
|
|
free(iviscrns);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_screen_resolution(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:35:25 +03:00
|
|
|
struct ivi_layout_screen **iviscrns;
|
|
|
|
int32_t screen_length = 0;
|
|
|
|
struct weston_output *output;
|
|
|
|
int32_t width;
|
|
|
|
int32_t height;
|
|
|
|
int32_t i;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->get_screens(&screen_length, &iviscrns) == IVI_SUCCEEDED);
|
2015-06-22 09:35:25 +03:00
|
|
|
iassert(screen_length > 0);
|
|
|
|
|
|
|
|
for (i = 0; i < screen_length; ++i) {
|
2015-10-15 17:51:41 +03:00
|
|
|
output = lyt->screen_get_output(iviscrns[i]);
|
2015-06-22 09:35:25 +03:00
|
|
|
iassert(output != NULL);
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->get_screen_resolution(
|
2015-06-22 09:35:25 +03:00
|
|
|
iviscrns[i], &width, &height) == IVI_SUCCEEDED);
|
|
|
|
iassert(width == output->current_mode->width);
|
|
|
|
iassert(height == output->current_mode->height);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (screen_length > 0)
|
|
|
|
free(iviscrns);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_screen_render_order(struct test_context *ctx)
|
|
|
|
{
|
|
|
|
#define LAYER_NUM (3)
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:35:25 +03:00
|
|
|
struct ivi_layout_screen **iviscrns;
|
|
|
|
int32_t screen_length = 0;
|
|
|
|
struct ivi_layout_screen *iviscrn;
|
|
|
|
struct ivi_layout_layer *ivilayers[LAYER_NUM] = {};
|
|
|
|
struct ivi_layout_layer **array;
|
|
|
|
int32_t length = 0;
|
|
|
|
uint32_t i;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->get_screens(&screen_length, &iviscrns) == IVI_SUCCEEDED);
|
2015-06-22 09:35:25 +03:00
|
|
|
iassert(screen_length > 0);
|
|
|
|
|
|
|
|
if (screen_length <= 0)
|
|
|
|
return;
|
|
|
|
|
|
|
|
iviscrn = iviscrns[0];
|
|
|
|
|
|
|
|
for (i = 0; i < LAYER_NUM; i++)
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayers[i] = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(i), 200, 300);
|
2015-06-22 09:35:25 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->screen_set_render_order(iviscrn, ivilayers, LAYER_NUM) == IVI_SUCCEEDED);
|
2015-06-22 09:35:25 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->commit_changes();
|
2015-06-22 09:35:25 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->get_layers_on_screen(iviscrn, &length, &array) == IVI_SUCCEEDED);
|
2015-06-22 09:35:25 +03:00
|
|
|
iassert(length == LAYER_NUM);
|
|
|
|
for (i = 0; i < LAYER_NUM; i++)
|
|
|
|
iassert(array[i] == ivilayers[i]);
|
|
|
|
|
|
|
|
if (length > 0)
|
|
|
|
free(array);
|
|
|
|
|
|
|
|
array = NULL;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->screen_set_render_order(iviscrn, NULL, 0) == IVI_SUCCEEDED);
|
2015-06-22 09:35:25 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->commit_changes();
|
2015-06-22 09:35:25 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->get_layers_on_screen(iviscrn, &length, &array) == IVI_SUCCEEDED);
|
2015-06-22 09:35:25 +03:00
|
|
|
iassert(length == 0 && array == NULL);
|
|
|
|
|
|
|
|
for (i = 0; i < LAYER_NUM; i++)
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayers[i]);
|
2015-06-22 09:35:25 +03:00
|
|
|
|
|
|
|
free(iviscrns);
|
|
|
|
#undef LAYER_NUM
|
|
|
|
}
|
|
|
|
|
2015-06-22 09:35:39 +03:00
|
|
|
static void
|
|
|
|
test_screen_bad_resolution(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:35:39 +03:00
|
|
|
struct ivi_layout_screen **iviscrns;
|
|
|
|
int32_t screen_length = 0;
|
|
|
|
struct ivi_layout_screen *iviscrn;
|
|
|
|
int32_t width;
|
|
|
|
int32_t height;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->get_screens(&screen_length, &iviscrns) == IVI_SUCCEEDED);
|
2015-06-22 09:35:39 +03:00
|
|
|
iassert(screen_length > 0);
|
|
|
|
|
|
|
|
if (screen_length <= 0)
|
|
|
|
return;
|
|
|
|
|
|
|
|
iviscrn = iviscrns[0];
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->get_screen_resolution(NULL, &width, &height) == IVI_FAILED);
|
|
|
|
iassert(lyt->get_screen_resolution(iviscrn, NULL, &height) == IVI_FAILED);
|
|
|
|
iassert(lyt->get_screen_resolution(iviscrn, &width, NULL) == IVI_FAILED);
|
2015-06-22 09:35:39 +03:00
|
|
|
free(iviscrns);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_screen_bad_render_order(struct test_context *ctx)
|
|
|
|
{
|
|
|
|
#define LAYER_NUM (3)
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:35:39 +03:00
|
|
|
struct ivi_layout_screen **iviscrns;
|
|
|
|
int32_t screen_length;
|
|
|
|
struct ivi_layout_screen *iviscrn;
|
|
|
|
struct ivi_layout_layer *ivilayers[LAYER_NUM] = {};
|
|
|
|
struct ivi_layout_layer **array;
|
|
|
|
int32_t length = 0;
|
|
|
|
uint32_t i;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->get_screens(&screen_length, &iviscrns) == IVI_SUCCEEDED);
|
2015-06-22 09:35:39 +03:00
|
|
|
iassert(screen_length > 0);
|
|
|
|
|
|
|
|
if (screen_length <= 0)
|
|
|
|
return;
|
|
|
|
|
|
|
|
iviscrn = iviscrns[0];
|
|
|
|
|
|
|
|
for (i = 0; i < LAYER_NUM; i++)
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayers[i] = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(i), 200, 300);
|
2015-06-22 09:35:39 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->screen_set_render_order(NULL, ivilayers, LAYER_NUM) == IVI_FAILED);
|
2015-06-22 09:35:39 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->commit_changes();
|
2015-06-22 09:35:39 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->get_layers_on_screen(NULL, &length, &array) == IVI_FAILED);
|
|
|
|
iassert(lyt->get_layers_on_screen(iviscrn, NULL, &array) == IVI_FAILED);
|
|
|
|
iassert(lyt->get_layers_on_screen(iviscrn, &length, NULL) == IVI_FAILED);
|
2015-06-22 09:35:39 +03:00
|
|
|
|
|
|
|
for (i = 0; i < LAYER_NUM; i++)
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayers[i]);
|
2015-06-22 09:35:39 +03:00
|
|
|
|
|
|
|
free(iviscrns);
|
|
|
|
#undef LAYER_NUM
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_commit_changes_after_render_order_set_layer_destroy(
|
|
|
|
struct test_context *ctx)
|
|
|
|
{
|
|
|
|
#define LAYER_NUM (3)
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:35:39 +03:00
|
|
|
struct ivi_layout_screen **iviscrns;
|
|
|
|
int32_t screen_length;
|
|
|
|
struct ivi_layout_screen *iviscrn;
|
|
|
|
struct ivi_layout_layer *ivilayers[LAYER_NUM] = {};
|
|
|
|
uint32_t i;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->get_screens(&screen_length, &iviscrns) == IVI_SUCCEEDED);
|
2015-06-22 09:35:39 +03:00
|
|
|
iassert(screen_length > 0);
|
|
|
|
|
|
|
|
if (screen_length <= 0)
|
|
|
|
return;
|
|
|
|
|
|
|
|
iviscrn = iviscrns[0];
|
|
|
|
|
|
|
|
for (i = 0; i < LAYER_NUM; i++)
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayers[i] = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(i), 200, 300);
|
2015-06-22 09:35:39 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->screen_set_render_order(iviscrn, ivilayers, LAYER_NUM) == IVI_SUCCEEDED);
|
2015-06-22 09:35:39 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayers[1]);
|
2015-06-22 09:35:39 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->commit_changes();
|
2015-06-22 09:35:39 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayers[0]);
|
|
|
|
lyt->layer_destroy(ivilayers[2]);
|
2015-06-22 09:35:39 +03:00
|
|
|
|
|
|
|
free(iviscrns);
|
|
|
|
#undef LAYER_NUM
|
|
|
|
}
|
|
|
|
|
2015-06-22 09:36:11 +03:00
|
|
|
static void
|
|
|
|
test_layer_properties_changed_notification_callback(struct ivi_layout_layer *ivilayer,
|
|
|
|
const struct ivi_layout_layer_properties *prop,
|
|
|
|
enum ivi_layout_notification_mask mask,
|
|
|
|
void *userdata)
|
|
|
|
{
|
|
|
|
struct test_context *ctx = userdata;
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:36:11 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->get_id_of_layer(ivilayer) == IVI_TEST_LAYER_ID(0));
|
2015-06-22 09:36:11 +03:00
|
|
|
iassert(prop->source_width == 200);
|
|
|
|
iassert(prop->source_height == 300);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
if (lyt->get_id_of_layer(ivilayer) == IVI_TEST_LAYER_ID(0) &&
|
2015-06-22 09:36:11 +03:00
|
|
|
prop->source_width == 200 && prop->source_height == 300)
|
|
|
|
ctx->user_flags = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_layer_properties_changed_notification(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:36:11 +03:00
|
|
|
struct ivi_layout_layer *ivilayer;
|
|
|
|
|
|
|
|
ctx->user_flags = 0;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
2015-06-22 09:36:11 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_add_notification(ivilayer, test_layer_properties_changed_notification_callback, ctx) == IVI_SUCCEEDED);
|
2015-06-22 09:36:11 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->commit_changes();
|
2015-06-22 09:36:11 +03:00
|
|
|
|
|
|
|
iassert(ctx->user_flags == 0);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_destination_rectangle(
|
2015-06-22 09:36:11 +03:00
|
|
|
ivilayer, 20, 30, 200, 300) == IVI_SUCCEEDED);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->commit_changes();
|
2015-06-22 09:36:11 +03:00
|
|
|
|
|
|
|
iassert(ctx->user_flags == 1);
|
|
|
|
|
|
|
|
ctx->user_flags = 0;
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_set_destination_rectangle(
|
2015-06-22 09:36:11 +03:00
|
|
|
ivilayer, 20, 30, 200, 300) == IVI_SUCCEEDED);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->commit_changes();
|
2015-06-22 09:36:11 +03:00
|
|
|
|
|
|
|
iassert(ctx->user_flags == 0);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_remove_notification(ivilayer);
|
2015-06-22 09:36:11 +03:00
|
|
|
|
|
|
|
ctx->user_flags = 0;
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->commit_changes();
|
2015-06-22 09:36:11 +03:00
|
|
|
|
|
|
|
iassert(ctx->user_flags == 0);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayer);
|
2015-06-22 09:36:11 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_layer_create_notification_callback(struct ivi_layout_layer *ivilayer,
|
|
|
|
void *userdata)
|
|
|
|
{
|
|
|
|
struct test_context *ctx = userdata;
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
|
|
|
const struct ivi_layout_layer_properties *prop = lyt->get_properties_of_layer(ivilayer);
|
2015-06-22 09:36:11 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->get_id_of_layer(ivilayer) == IVI_TEST_LAYER_ID(0));
|
2015-06-22 09:36:11 +03:00
|
|
|
iassert(prop->source_width == 200);
|
|
|
|
iassert(prop->source_height == 300);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
if (lyt->get_id_of_layer(ivilayer) == IVI_TEST_LAYER_ID(0) &&
|
2015-06-22 09:36:11 +03:00
|
|
|
prop->source_width == 200 && prop->source_height == 300)
|
|
|
|
ctx->user_flags = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_layer_create_notification(struct test_context *ctx)
|
|
|
|
{
|
|
|
|
#define LAYER_NUM (2)
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:36:11 +03:00
|
|
|
static const uint32_t layers[LAYER_NUM] = {IVI_TEST_LAYER_ID(0), IVI_TEST_LAYER_ID(1)};
|
|
|
|
struct ivi_layout_layer *ivilayers[LAYER_NUM] = {};
|
|
|
|
|
|
|
|
ctx->user_flags = 0;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->add_notification_create_layer(
|
2015-06-22 09:36:11 +03:00
|
|
|
test_layer_create_notification_callback, ctx) == IVI_SUCCEEDED);
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayers[0] = lyt->layer_create_with_dimension(layers[0], 200, 300);
|
2015-06-22 09:36:11 +03:00
|
|
|
|
|
|
|
iassert(ctx->user_flags == 1);
|
|
|
|
|
|
|
|
ctx->user_flags = 0;
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->remove_notification_create_layer(test_layer_create_notification_callback, ctx);
|
2015-06-22 09:36:11 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayers[1] = lyt->layer_create_with_dimension(layers[1], 400, 500);
|
2015-06-22 09:36:11 +03:00
|
|
|
|
|
|
|
iassert(ctx->user_flags == 0);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayers[0]);
|
|
|
|
lyt->layer_destroy(ivilayers[1]);
|
2015-06-22 09:36:11 +03:00
|
|
|
#undef LAYER_NUM
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_layer_remove_notification_callback(struct ivi_layout_layer *ivilayer,
|
|
|
|
void *userdata)
|
|
|
|
{
|
|
|
|
struct test_context *ctx = userdata;
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:36:11 +03:00
|
|
|
const struct ivi_layout_layer_properties *prop =
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->get_properties_of_layer(ivilayer);
|
2015-06-22 09:36:11 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->get_id_of_layer(ivilayer) == IVI_TEST_LAYER_ID(0));
|
2015-06-22 09:36:11 +03:00
|
|
|
iassert(prop->source_width == 200);
|
|
|
|
iassert(prop->source_height == 300);
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
if (lyt->get_id_of_layer(ivilayer) == IVI_TEST_LAYER_ID(0) &&
|
2015-06-22 09:36:11 +03:00
|
|
|
prop->source_width == 200 && prop->source_height == 300)
|
|
|
|
ctx->user_flags = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_layer_remove_notification(struct test_context *ctx)
|
|
|
|
{
|
|
|
|
#define LAYER_NUM (2)
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:36:11 +03:00
|
|
|
static const uint32_t layers[LAYER_NUM] = {IVI_TEST_LAYER_ID(0), IVI_TEST_LAYER_ID(1)};
|
|
|
|
struct ivi_layout_layer *ivilayers[LAYER_NUM] = {};
|
|
|
|
|
|
|
|
ctx->user_flags = 0;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayers[0] = lyt->layer_create_with_dimension(layers[0], 200, 300);
|
|
|
|
iassert(lyt->add_notification_remove_layer(
|
2015-06-22 09:36:11 +03:00
|
|
|
test_layer_remove_notification_callback, ctx) == IVI_SUCCEEDED);
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayers[0]);
|
2015-06-22 09:36:11 +03:00
|
|
|
|
|
|
|
iassert(ctx->user_flags == 1);
|
|
|
|
|
|
|
|
ctx->user_flags = 0;
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayers[1] = lyt->layer_create_with_dimension(layers[1], 250, 350);
|
|
|
|
lyt->remove_notification_remove_layer(test_layer_remove_notification_callback, ctx);
|
|
|
|
lyt->layer_destroy(ivilayers[1]);
|
2015-06-22 09:36:11 +03:00
|
|
|
|
|
|
|
iassert(ctx->user_flags == 0);
|
|
|
|
#undef LAYER_NUM
|
|
|
|
}
|
|
|
|
|
2015-06-22 09:37:41 +03:00
|
|
|
static void
|
|
|
|
test_layer_bad_properties_changed_notification_callback(struct ivi_layout_layer *ivilayer,
|
|
|
|
const struct ivi_layout_layer_properties *prop,
|
|
|
|
enum ivi_layout_notification_mask mask,
|
|
|
|
void *userdata)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_layer_bad_properties_changed_notification(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:37:41 +03:00
|
|
|
struct ivi_layout_layer *ivilayer;
|
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
ivilayer = lyt->layer_create_with_dimension(IVI_TEST_LAYER_ID(0), 200, 300);
|
2015-06-22 09:37:41 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_add_notification(
|
2015-06-22 09:37:41 +03:00
|
|
|
NULL, test_layer_bad_properties_changed_notification_callback, NULL) == IVI_FAILED);
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->layer_add_notification(ivilayer, NULL, NULL) == IVI_FAILED);
|
2015-06-22 09:37:41 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
lyt->layer_destroy(ivilayer);
|
2015-06-22 09:37:41 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_surface_bad_configure_notification(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:37:41 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->add_notification_configure_surface(NULL, NULL) == IVI_FAILED);
|
2015-06-22 09:37:41 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_layer_bad_create_notification(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:37:41 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->add_notification_create_layer(NULL, NULL) == IVI_FAILED);
|
2015-06-22 09:37:41 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_surface_bad_create_notification(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:37:41 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->add_notification_create_surface(NULL, NULL) == IVI_FAILED);
|
2015-06-22 09:37:41 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_layer_bad_remove_notification(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:37:41 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->add_notification_remove_layer(NULL, NULL) == IVI_FAILED);
|
2015-06-22 09:37:41 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
test_surface_bad_remove_notification(struct test_context *ctx)
|
|
|
|
{
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *lyt = ctx->layout_interface;
|
2015-06-22 09:37:41 +03:00
|
|
|
|
2015-10-15 17:51:41 +03:00
|
|
|
iassert(lyt->add_notification_remove_surface(NULL, NULL) == IVI_FAILED);
|
2015-06-22 09:37:41 +03:00
|
|
|
}
|
|
|
|
|
2015-03-27 12:55:21 +03:00
|
|
|
/************************ tests end ********************************/
|
|
|
|
|
|
|
|
static void
|
|
|
|
run_internal_tests(void *data)
|
|
|
|
{
|
|
|
|
struct test_context *ctx = data;
|
|
|
|
|
|
|
|
test_surface_bad_visibility(ctx);
|
2015-06-22 09:33:59 +03:00
|
|
|
test_surface_bad_destination_rectangle(ctx);
|
|
|
|
test_surface_bad_orientation(ctx);
|
|
|
|
test_surface_bad_dimension(ctx);
|
|
|
|
test_surface_bad_position(ctx);
|
|
|
|
test_surface_bad_source_rectangle(ctx);
|
|
|
|
test_surface_bad_properties(ctx);
|
2015-03-27 12:55:21 +03:00
|
|
|
|
2015-06-22 09:34:18 +03:00
|
|
|
test_layer_create(ctx);
|
|
|
|
test_layer_visibility(ctx);
|
|
|
|
test_layer_opacity(ctx);
|
|
|
|
test_layer_orientation(ctx);
|
|
|
|
test_layer_dimension(ctx);
|
|
|
|
test_layer_position(ctx);
|
|
|
|
test_layer_destination_rectangle(ctx);
|
|
|
|
test_layer_source_rectangle(ctx);
|
tests: test set for ivi-layer with bad condition in server side
These tests are implemented on test suite framework, which provides
internal method validation.
Following features are tested for ivi-layer,
- create with bad parameter
- visibility with bad parameter
- opacity with bad parameter
- destination rectangle with bad parameter
- orientation with bad parameter
- dimension with bad parameter
- position with bad parameter
- source rectangle with bad parameter
- properties with bad parameter
- destroy ivi-layer and call set_visibility_commit_changes
- destroy ivi-layer, call set_opacity, and commit_changes
- destroy ivi-layer, call set_orientation, and commit_changes
- destroy ivi-layer, call set_dimension, and commit_changes
- call set_position, destroy ivi-layer, and commit_changes
- call set_source_rectangle, destroy ivi-layer, and commit_changes
- call set_destination_rectangle, destroy ivi-layer, and commit_changes
- create duplicate
- destroy ivi-layer and call get_layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-06-22 09:35:12 +03:00
|
|
|
test_layer_bad_remove(ctx);
|
|
|
|
test_layer_bad_visibility(ctx);
|
|
|
|
test_layer_bad_opacity(ctx);
|
|
|
|
test_layer_bad_destination_rectangle(ctx);
|
|
|
|
test_layer_bad_orientation(ctx);
|
|
|
|
test_layer_bad_dimension(ctx);
|
|
|
|
test_layer_bad_position(ctx);
|
|
|
|
test_layer_bad_source_rectangle(ctx);
|
|
|
|
test_layer_bad_properties(ctx);
|
|
|
|
test_commit_changes_after_visibility_set_layer_destroy(ctx);
|
|
|
|
test_commit_changes_after_opacity_set_layer_destroy(ctx);
|
|
|
|
test_commit_changes_after_orientation_set_layer_destroy(ctx);
|
|
|
|
test_commit_changes_after_dimension_set_layer_destroy(ctx);
|
|
|
|
test_commit_changes_after_position_set_layer_destroy(ctx);
|
|
|
|
test_commit_changes_after_source_rectangle_set_layer_destroy(ctx);
|
|
|
|
test_commit_changes_after_destination_rectangle_set_layer_destroy(ctx);
|
|
|
|
test_layer_create_duplicate(ctx);
|
|
|
|
test_get_layer_after_destory_layer(ctx);
|
2015-06-22 09:34:18 +03:00
|
|
|
|
2015-06-22 09:35:25 +03:00
|
|
|
test_screen_id(ctx);
|
|
|
|
test_screen_resolution(ctx);
|
|
|
|
test_screen_render_order(ctx);
|
2015-06-22 09:35:39 +03:00
|
|
|
test_screen_bad_resolution(ctx);
|
|
|
|
test_screen_bad_render_order(ctx);
|
|
|
|
test_commit_changes_after_render_order_set_layer_destroy(ctx);
|
|
|
|
|
2015-06-22 09:36:11 +03:00
|
|
|
test_layer_properties_changed_notification(ctx);
|
|
|
|
test_layer_create_notification(ctx);
|
|
|
|
test_layer_remove_notification(ctx);
|
2015-06-22 09:37:41 +03:00
|
|
|
test_layer_bad_properties_changed_notification(ctx);
|
|
|
|
test_surface_bad_configure_notification(ctx);
|
|
|
|
test_layer_bad_create_notification(ctx);
|
|
|
|
test_surface_bad_create_notification(ctx);
|
|
|
|
test_layer_bad_remove_notification(ctx);
|
|
|
|
test_surface_bad_remove_notification(ctx);
|
2015-06-22 09:35:25 +03:00
|
|
|
|
2015-03-27 12:55:21 +03:00
|
|
|
weston_compositor_exit_with_code(ctx->compositor, EXIT_SUCCESS);
|
|
|
|
free(ctx);
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
controller_module_init(struct weston_compositor *compositor,
|
|
|
|
int *argc, char *argv[],
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *iface,
|
2015-03-27 12:55:21 +03:00
|
|
|
size_t iface_version);
|
|
|
|
|
|
|
|
WL_EXPORT int
|
|
|
|
controller_module_init(struct weston_compositor *compositor,
|
|
|
|
int *argc, char *argv[],
|
2015-10-15 17:51:41 +03:00
|
|
|
const struct ivi_layout_interface *iface,
|
2015-03-27 12:55:21 +03:00
|
|
|
size_t iface_version)
|
|
|
|
{
|
|
|
|
struct wl_event_loop *loop;
|
|
|
|
struct test_context *ctx;
|
|
|
|
|
|
|
|
/* strict check, since this is an internal test module */
|
|
|
|
if (iface_version != sizeof(*iface)) {
|
|
|
|
weston_log("fatal: controller interface mismatch\n");
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = zalloc(sizeof(*ctx));
|
|
|
|
if (!ctx)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
ctx->compositor = compositor;
|
2015-10-15 17:51:41 +03:00
|
|
|
ctx->layout_interface = iface;
|
2015-03-27 12:55:21 +03:00
|
|
|
|
|
|
|
loop = wl_display_get_event_loop(compositor->wl_display);
|
|
|
|
wl_event_loop_add_idle(loop, run_internal_tests, ctx);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|