[gimp/soc-2010-cage] app/tests: Make "create_new_image_via_dialog" result more useful
- From: Michael Muré <mmure src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/soc-2010-cage] app/tests: Make "create_new_image_via_dialog" result more useful
- Date: Wed, 30 Jun 2010 22:18:17 +0000 (UTC)
commit 9e28a198507e9e8e957ad7b39934a3df7a89a48a
Author: Martin Nordholts <martinn src gnome org>
Date: Sun Jun 27 13:16:36 2010 +0200
app/tests: Make "create_new_image_via_dialog" result more useful
Also add a layer in "create_new_image_via_dialog" so the created
image is more useful in following tests.
app/tests/test-ui.c | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/app/tests/test-ui.c b/app/tests/test-ui.c
index 9efe1fd..9a4259b 100644
--- a/app/tests/test-ui.c
+++ b/app/tests/test-ui.c
@@ -51,6 +51,7 @@
#include "core/gimpchannel.h"
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
+#include "core/gimplayer.h"
#include "core/gimptoolinfo.h"
#include "core/gimptooloptions.h"
@@ -241,6 +242,8 @@ create_new_image_via_dialog (GimpTestFixture *fixture,
guint n_initial_images = g_list_length (gimp_get_image_iter (gimp));
guint n_images = -1;
gint tries_left = 100;
+ GimpImage *image;
+ GimpLayer *layer;
/* Bring up the new image dialog */
gimp_ui_manager_activate_action (ui_manager,
@@ -272,6 +275,19 @@ create_new_image_via_dialog (GimpTestFixture *fixture,
g_assert_cmpint (n_images,
==,
n_initial_images + 1);
+
+ /* Add a layer to the image to make it more useful in later tests */
+ image = GIMP_IMAGE (gimp_get_image_iter (gimp)->data);
+ layer = gimp_layer_new (image,
+ gimp_image_get_width (image),
+ gimp_image_get_height (image),
+ gimp_image_base_type_with_alpha (image),
+ "Layer for testing",
+ GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE);
+
+ gimp_image_add_layer (image, layer,
+ GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
+ gimp_test_run_mainloop_until_idle ();
}
static void
@@ -362,7 +378,7 @@ alt_click_is_layer_to_selection (GimpTestFixture *fixture,
* start to layout layers in the GtkTreeView differently
*/
assumed_layer_x = 96;
- assumed_layer_y = 16;
+ assumed_layer_y = 42;
/* First make sure there is no selection */
g_assert (! gimp_channel_bounds (selection,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]