~ted/ubuntu-app-launch/snappy-backend-no-snap

« back to all changes in this revision

Viewing changes to tests/libual-cpp-test.cc

Updating to trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
#include <algorithm>
21
21
#include <functional>
 
22
#include <fcntl.h>
22
23
#include <future>
23
24
#include <numeric>
24
25
#include <thread>
25
 
 
26
 
#include "eventually-fixture.h"
27
 
#include "mir-mock.h"
28
26
#include <gio/gio.h>
29
27
#include <glib/gstdio.h>
30
28
#include <gtest/gtest.h>
 
29
#include <libdbustest/dbus-test.h>
 
30
#include <thread>
31
31
#include <zeitgeist.h>
32
32
 
33
33
#include "application.h"
34
34
#include "glib-thread.h"
35
35
#include "helper.h"
36
36
#include "registry.h"
37
 
 
38
 
extern "C" {
39
 
#include "libdbustest/dbus-test.h"
40
37
#include "ubuntu-app-launch.h"
41
 
#include <fcntl.h>
42
 
}
 
38
 
 
39
#include "eventually-fixture.h"
 
40
#include "mir-mock.h"
43
41
 
44
42
class LibUAL : public EventuallyFixture
45
43
{
1060
1058
 
1061
1059
    ASSERT_TRUE(dbus_test_dbus_mock_object_clear_method_calls(mock, obj, NULL));
1062
1060
 
1063
 
    /* Not sure why, but this makes this test better, hopefully we can
1064
 
       clean this up when we move to the C++ API can use a cancellable */
 
1061
    /* Needed as we still haven't ported second-exec.c to use the registry
 
1062
       thread and inherit its cancellable, we need to ensure all the extra
 
1063
       DBus messages error out before ending the test, or otherwise they'll
 
1064
       keep a reference to the DBus bus object. */
1065
1065
    pause(100);
1066
1066
 
1067
1067
    return;
1108
1108
 
1109
1109
    ASSERT_TRUE(dbus_test_dbus_mock_object_clear_method_calls(mock, obj, NULL));
1110
1110
 
1111
 
    /* Not sure why, but this makes this test better, hopefully we can
1112
 
       clean this up when we move to the C++ API can use a cancellable */
 
1111
    /* Needed as we still haven't ported second-exec.c to use the registry
 
1112
       thread and inherit its cancellable, we need to ensure all the extra
 
1113
       DBus messages error out before ending the test, or otherwise they'll
 
1114
       keep a reference to the DBus bus object. */
1113
1115
    pause(100);
1114
1116
 
1115
1117
    return;