Commit Graph

387 Commits

Author SHA1 Message Date
58481ffabf tests: make GtkMenu test more flexible
We were using gtk_menu_item_get_label() from a testcase to determine the
label associated with a menu item.  Future changes to GtkModelMenuItem
will cause this to stop working, so try a bit harder to find a label
inside of the item.
2013-05-13 16:33:42 -04:00
31fd014c93 Add more window-size related tests 2013-05-10 13:55:00 -04:00
e9122eca68 Add more test cases
These are taken from
https://bugzilla.gnome.org/show_bug.cgi?id=696882
2013-05-07 08:54:05 -04:00
1391a0be1c Add a testcase for the dnd window breakage 2013-05-07 06:11:42 -04:00
96e0d9db72 Some window size test tweaks
Draw a checkerboard pattern, and add an interactive mode that
waits for events before moving on. This makes it easier to see
when a size is wrong.
2013-05-04 16:16:20 -04:00
7fd0836567 Add some more GtkWindow tests
These tests check that a toplevel window ends up with the expected
size after setting default sizes or resizing. It currently passes
on X, but fails with client-side decorations under X and Wayland.
2013-05-04 16:16:11 -04:00
c15a7877e9 treemodelsort: destroy the root only if we are removing the latest row of the level
GtkIconView doesn't ref the rows of the model so we have to make sure that a
level is actually empty before destroying it.

https://bugzilla.gnome.org/show_bug.cgi?id=698846
2013-05-03 13:06:08 +02:00
c538bdc7dc GtkInvisible behaves like GtkWindow
As far as refcounting is concerned, invisibles are like
windows: you have to destroy them.
2013-05-02 20:43:34 -04:00
b980057764 Only check for finalization after a grace period
This makes the file chooser pass this test
2013-05-02 20:42:24 -04:00
4dc01aca43 Fix build 2013-05-02 05:37:58 -04:00
e399798da8 Revert "Disable the filechooser template tests"
This reverts commit 17b9733372.
2013-05-01 22:22:22 -04:00
8eeb379f7c Revert "Disable the object-finalize test for now"
This reverts commit a021dc793c.
2013-05-01 22:22:09 -04:00
0d49b97fce Silence a compiler warning 2013-05-01 21:35:39 -04:00
61f47829ba tests: Comment out unused functions 2013-05-01 17:46:50 +02:00
17b9733372 Disable the filechooser template tests
The places sidebar breaks the finalization checks in these tests
https://bugzilla.gnome.org/show_bug.cgi?id=699393
2013-05-01 10:28:53 -04:00
a021dc793c Disable the object-finalize test for now
GtkPlacesSidebar breaks this:
https://bugzilla.gnome.org/show_bug.cgi?id=699393
2013-05-01 10:28:03 -04:00
1f17efb81c Add some tests for GtkWindow
These tests may have some assumptions on reasonable window manager
behaviour.  For now, we just test that the default size of the
window ends up as the allocated size of the content. This test
currently fails with client-side decorations, because we are
not properly discriminating between overall window size and
content size.
2013-04-27 13:41:17 -04:00
a6f9ef0d3a Load the file chooser's widgets from the .ui file
This is Tristan's *excellent* work, minus the old code for the shortcuts bar - that is all done
in GtkPlacesSidebar now.

The UI gets loaded from a Glade resource; most of the old code to create the UI by hand is gone.

There is still code for save_widgets_create(); this needs to be moved into the UI file, but it
is not a big deal.

gtk_file_chooser_default_init() calls a new post_process_ui() that takes care of all the things
that cannot be done directly in Glade.
2013-04-15 19:29:12 -05:00
9a3bc21dc9 Don't include gtkfilechooserprivate.h from the file chooser's tests
We will make that file a fully private header; the tests have no
business poking inside the file chooser's internals at this point.
2013-04-11 20:40:05 -05:00
21083978f0 Revert "GtkFileChooserDefault: Define children with a GtkBuilder template"
Having the changes for composite widget templates makes it impossible
to merge the places-sidebar branch.  So, we will merge that branch,
and *then* apply the changes for composite templates.

This reverts commit bf909f5615.
2013-04-11 16:47:38 -05:00
5e7df8bf14 build: Fix srcdir != builddir 2013-04-08 10:16:58 -04:00
92a8c76b31 GtkVolumeButton: Define children with a GtkBuilder template 2013-04-08 21:19:29 +09:00
36bacc4674 GtkFontButton: Define children with a GtkBuilder template 2013-04-08 21:19:29 +09:00
4c81151a20 GtkFileChooserButton: Define children with a GtkBuilder template 2013-04-08 21:19:29 +09:00
42f53ab58e GtkPathBar: Define children with a GtkBuilder template 2013-04-08 21:19:29 +09:00
0f3ef7eea6 GtkColorEditor: Define children with a GtkBuilder template 2013-04-08 21:19:29 +09:00
9accb95b9f GtkPrintUnixDialog: Define children with a GtkBuilder template 2013-04-08 21:19:29 +09:00
0f16d7c6d5 GtkPageSetupUnixDialog: Define children with a GtkBuilder template 2013-04-08 21:19:29 +09:00
a58412027f GtkRecentChooserDefault: Define children with a GtkBuilder template 2013-04-08 21:19:29 +09:00
6f8162a2e1 GtkFontChooserDialog: Define children with a GtkBuilder template 2013-04-08 21:19:29 +09:00
21391027c4 GtkFontChooserWidget: Define children with a GtkBuilder template 2013-04-08 21:19:28 +09:00
b537e1badd GtkFileChooserDialog: Define children with a GtkBuilder template 2013-04-08 21:19:28 +09:00
bf909f5615 GtkFileChooserDefault: Define children with a GtkBuilder template 2013-04-08 21:19:28 +09:00
09b44d7ab5 GtkColorChooserDialog: Define children with a GtkBuilder template 2013-04-08 21:19:28 +09:00
d50516ebd7 GtkAppChooserDialog: Define children with a GtkBuilder template 2013-04-08 21:19:28 +09:00
ae690479a0 GtkAppChooserWidget: Define children with a GtkBuilder template 2013-04-08 21:19:28 +09:00
c6aa7cc92d GtkStatusbar: Define children with a GtkBuilder template 2013-04-08 21:19:28 +09:00
b9fd422aca GtkScaleButton: Define children with a GtkBuilder template 2013-04-08 21:19:28 +09:00
90cd240c6d GtkAssistant: Define children with a GtkBuilder template 2013-04-08 21:19:28 +09:00
3c39c388c9 GtkLockButton: Define children with a GtkBuilder template 2013-04-08 21:19:28 +09:00
67a2cdb303 GtkAboutDialog: Define children with a GtkBuilder template 2013-04-08 21:19:28 +09:00
56167944e5 GtkInfoBar: Define children with a GtkBuilder template 2013-04-08 21:19:28 +09:00
671871b43e GtkMessageDialog: Define children with a GtkBuilder template 2013-04-08 21:19:27 +09:00
33f6195d0e GtkDialog: Define children with a GtkBuilder template
As the first composite widget in GTK+, this patch also
adds some Makefile mechanics to list the ui files as
dependencies of the global GTK+ resources, and adds the
initial test case where composite classes should be tested.
2013-04-08 21:19:27 +09:00
4ec6d6006e Work around access to global resources without calling gtk_init()
Some utilities such as GIR and gtk-doc, initialize class vtables without
initializing GTK+, with composite templates accessing resources this
causes a hand full of unneeded warnings.

The workaround for now is the use a private function _gtk_ensure_resources()
which is both called while initializing GTK+, and at the beginning of
gtk_widget_class_set_template_from_resource() (the private function
ensures that the resource will only ever be registered GOnce).
2013-04-08 21:19:27 +09:00
c771a8a3a6 objects-finalize test: Blacklist gdk_pixbuf_simple_anim_iter_get_type() 2013-04-05 21:11:13 +09:00
33b9865651 Added test case to assert all object types finalize properly.
The test case uses a weak ref to assert objects can finalize,
and then spins the main loop shortly after finalizing to assert
that the finalized object did not leak GSources into the main context
causing latent crashes.
2013-04-05 20:14:38 +09:00
45a94ccc88 tests: improve gtkmenu testcase
Don't just create a menushell and populate it with random data -- verify that
the resulting menu layout is actually correct.

This is introduced in a separate commit because the old code was failing this
part of the test.

https://bugzilla.gnome.org/show_bug.cgi?id=696468
2013-04-01 16:45:20 -04:00
e250e52175 tests: add a test for gtk_menu_shell_bind()
Borrow the RandomMenu code from the GLib testsuite and hook it up to
gtk_menu_shell_bind().

https://bugzilla.gnome.org/show_bug.cgi?id=696468
2013-04-01 16:45:19 -04:00
563eb60666 filechooserbutton: Duh, remove all the timeouts after tests
Otherwise tests may start failing if they start after an old timeout triggers.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-12 14:31:48 -06:00