~timo-jyrinki/bamf/ubuntu-0.2.124.1

« back to all changes in this revision

Viewing changes to tests/bamfdaemon/test-window.c

  • Committer: Timo Jyrinki
  • Date: 2012-11-14 07:15:04 UTC
  • mfrom: (235.1.49)
  • Revision ID: timo.jyrinki@canonical.com-20121114071504-s8umq349iaf7lwq6
* New upstream release.
  - Includes all previous cherry-picks
  - remerge libbamf, Makefile: don't export private symbols (factory 
    and matcher)
  - BamfMatcher: force a view as closed or not-closed on proper 
    signals. This avoids that a view that is opened is actually 
    marked as closed when really it's running. (LP: #925421)
  - Daemon, BamfApplication: Use the default icon if there is not 
    one defined in the desktop file. (LP: #886778)
  - BamfMatcher: don't reopen windows when iterating on view's 
    list, add tests.
  - Build fixes, including enabling introspection.
  - BamfMatcher: add support for libreoffice Base, and libreoffice 
    matching tests (LP: #1063862)

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
static void test_allocation    (void);
27
27
static void test_xid           (void);
 
28
static void test_hints         (void);
28
29
static void test_active        (void);
29
30
static void test_urgent        (void);
30
31
static void test_user_visible  (void);
43
44
 
44
45
  g_test_add_func (DOMAIN"/Allocation", test_allocation);
45
46
  g_test_add_func (DOMAIN"/Xid", test_xid);
 
47
  g_test_add_func (DOMAIN"/Hints", test_hints);
46
48
  g_test_add_func (DOMAIN"/Events/Active", test_active);
47
49
  g_test_add_func (DOMAIN"/Events/Urgent", test_urgent);
48
50
  g_test_add_func (DOMAIN"/Events/UserVisible", test_user_visible);
71
73
}
72
74
 
73
75
void
 
76
test_hints (void)
 
77
{
 
78
  BamfWindow *window;
 
79
  BamfLegacyWindowTest *test;
 
80
 
 
81
  test = bamf_legacy_window_test_new (20,"Window X", "class", "exec");
 
82
  window = bamf_window_new (BAMF_LEGACY_WINDOW (test));
 
83
 
 
84
  bamf_legacy_window_set_hint (BAMF_LEGACY_WINDOW (test), "HINT_NAME", "HINT_VALUE");
 
85
 
 
86
  g_assert_cmpstr (bamf_window_get_string_hint (window, "HINT_NAME"), ==, "HINT_VALUE");
 
87
  g_assert_cmpstr (bamf_window_get_string_hint (window, "INVALID_HINT_NAME"), ==, NULL);
 
88
 
 
89
  g_object_unref (window);
 
90
  g_object_unref (test);
 
91
}
 
92
 
 
93
void
74
94
test_xid (void)
75
95
{
76
96
  BamfWindow *window;