~ubuntu-branches/ubuntu/precise/libunity/precise

« back to all changes in this revision

Viewing changes to test/vala/test-remote-scope.vala

  • Committer: Package Import Robot
  • Author(s): Didier Roche
  • Date: 2012-02-17 13:30:27 UTC
  • mfrom: (1.1.12)
  • Revision ID: package-import@ubuntu.com-20120217133027-ge19wzs0n7q145ww
Tags: 5.4.0-0ubuntu1
* New upstream release.
  - Dash: very high latency responding to input (LP: #828582)
  - Adding an option to the Sources filter from a remote Python scope
    doesn't work (LP: #916758)
  - Dash - Genre filter category in the Music Lens should use a 3 column
    layout (LP: #841902)
* debian/libunity-dev.install:
  - install unity-tool test tool
* debian/libunity9.symbols:
  - updated symbols

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    Test.add_data_func ("/Integration/Scope/Export", test_scope_export);
29
29
    Test.add_data_func ("/Integration/Scope/Search", test_scope_search);
30
30
    Test.add_data_func ("/Integration/Scope/Search2", test_scope_search2);
 
31
    Test.add_data_func ("/Integration/Scope/SuccessiveSearches", test_scope_successive_searches);
31
32
    Test.add_data_func ("/Integration/Scope/TwoSearches", test_scope_two_searches);
32
33
    Test.add_data_func ("/Integration/Scope/ModelSync", test_scope_model_sync);
33
34
    Test.add_data_func ("/Integration/Scope/ReplyHint", test_scope_reply_hint);
113
114
    bus.flush_sync ();
114
115
  }
115
116
 
 
117
  public static void test_scope_successive_searches ()
 
118
  {
 
119
    // we expect that the lens will call the search method
 
120
    assert (exported_scope != null);
 
121
 
 
122
    var ml = new MainLoop ();
 
123
    bool got_search_changed = false;
 
124
 
 
125
    ulong sig_id = exported_scope.search_changed.connect ((lens_search, search_type, cancellable) =>
 
126
    {
 
127
      assert (lens_search.search_string == "successive-searches");
 
128
      got_search_changed = true;
 
129
      // wait a while to emit the finished signal
 
130
      Timeout.add (500, () =>
 
131
      {
 
132
        lens_search.finished ();
 
133
        ml.quit ();
 
134
        return false;
 
135
      });
 
136
    });
 
137
 
 
138
    Timeout.add (2000, () => { ml.quit (); return false; });
 
139
    ml.run ();
 
140
 
 
141
    // earlier searches need to cancelled if there's a newer search
 
142
    assert (got_search_changed == true);
 
143
 
 
144
    SignalHandler.disconnect (exported_scope, sig_id);
 
145
 
 
146
    var bus = Bus.get_sync (BusType.SESSION);
 
147
    bus.flush_sync ();
 
148
  }
 
149
 
116
150
  public static void test_scope_two_searches ()
117
151
  {
118
152
    // we expect that the lens will call the search method