~ubuntu-branches/ubuntu/wily/mir/wily-proposed

« back to all changes in this revision

Viewing changes to tests/acceptance-tests/test_server_disconnect.cpp

  • Committer: Package Import Robot
  • Author(s): CI Train Bot
  • Date: 2015-05-12 13:12:55 UTC
  • mto: This revision was merged to the branch mainline in revision 96.
  • Revision ID: package-import@ubuntu.com-20150512131255-y7z12i8n4pbvo70x
Tags: upstream-0.13.0+15.10.20150512
ImportĀ upstreamĀ versionĀ 0.13.0+15.10.20150512

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#include "mir_toolkit/mir_client_library.h"
20
20
 
21
21
#include "mir_test_framework/interprocess_client_server_test.h"
22
 
#include "mir_test_framework/cross_process_sync.h"
 
22
#include "mir_test/cross_process_sync.h"
23
23
#include "mir_test_framework/process.h"
 
24
#include "mir_test_framework/using_stub_client_platform.h"
24
25
#include "mir_test_framework/any_surface.h"
25
26
#include "mir_test/cross_process_action.h"
26
27
 
41
42
        mtf::InterprocessClientServerTest::SetUp();
42
43
        run_in_server([]{});
43
44
    }
 
45
 
 
46
    mtf::UsingStubClientPlatform using_stub_client_platform;
44
47
};
45
48
 
46
49
struct MockEventHandler
60
63
 
61
64
TEST_F(ServerDisconnect, is_detected_by_client)
62
65
{
63
 
    mtf::CrossProcessSync sync;
 
66
    mt::CrossProcessSync sync;
64
67
 
65
68
    auto const client = new_client_process([&]
66
69
        {
83
86
 
84
87
            while (!signalled.load() && clock::now() < time_limit)
85
88
            {
86
 
                mir_surface_swap_buffers_sync(surface);
 
89
                mir_buffer_stream_swap_buffers_sync(
 
90
                    mir_surface_get_buffer_stream(surface));
87
91
            }
88
92
            mir_surface_release_sync(surface);
89
93
            mir_connection_release(connection);
154
158
TEST_F(ServerDisconnect, causes_client_to_terminate_by_default)
155
159
{
156
160
    mt::CrossProcessAction connect;
157
 
    mtf::CrossProcessSync create_surface_sync;
 
161
    mt::CrossProcessSync create_surface_sync;
158
162
 
159
163
    auto const client = new_client_process([&]
160
164
        {