~mir-team/qtmir/mir-0.16-rebuild

« back to all changes in this revision

Viewing changes to tests/mirserver/QtEventFeeder/qteventfeeder_test.cpp

  • Committer: Daniel d'Andrada
  • Date: 2015-05-21 18:48:59 UTC
  • mto: This revision was merged to the branch mainline in revision 340.
  • Revision ID: daniel.dandrada@canonical.com-20150521184859-362pnj4q1osoe63r
One include_directories(${APPLICATION_API_INCLUDE_DIRS}) to rule them all

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
                                                              Contains(AllOf(HasId(0),
119
119
                                                                             IsPressed()))),_)).Times(1);
120
120
 
121
 
    auto ev1 = mev::make_event(MirInputDeviceId(), std::chrono::milliseconds(123), 0);
 
121
    auto ev1 = mev::make_event(MirInputDeviceId(), 123*1000000, 0);
122
122
    mev::add_touch(*ev1, 0 /* touch ID */, mir_touch_action_down, mir_touch_tooltype_unknown,
123
123
                   10, 10, 10 /* x, y, pressure */,
124
124
                   1, 1, 10 /* touch major, minor, size */);
143
143
                                               ),_)).Times(1);
144
144
    }
145
145
 
146
 
    auto ev2 = mev::make_event(MirInputDeviceId(), std::chrono::milliseconds(125), 0);
 
146
    auto ev2 = mev::make_event(MirInputDeviceId(), 125*1000000, 0);
147
147
    mev::add_touch(*ev2, 1 /* touch ID */, mir_touch_action_down, mir_touch_tooltype_unknown,
148
148
                   20, 20, 10 /* x, y, pressure*/,
149
149
                   1, 1, 10 /* touch major, minor, size */);
157
157
 
158
158
    setIrrelevantMockWindowSystemExpectations();
159
159
 
160
 
    auto ev1 = mev::make_event(MirInputDeviceId(), std::chrono::milliseconds(123), 0);
 
160
    auto ev1 = mev::make_event(MirInputDeviceId(), 123*1000000, 0);
161
161
    mev::add_touch(*ev1, 0 /* touch ID */, mir_touch_action_down, mir_touch_tooltype_unknown,
162
162
                   10, 10, 10 /* x, y, pressure*/,
163
163
                   1, 1, 10 /* touch major, minor, size */);
173
173
 
174
174
    setIrrelevantMockWindowSystemExpectations();
175
175
 
176
 
    auto ev2 = mev::make_event(MirInputDeviceId(), std::chrono::milliseconds(124), 0);
 
176
    auto ev2 = mev::make_event(MirInputDeviceId(), 124*1000000, 0);
177
177
    mev::add_touch(*ev2, 0 /* touch ID */, mir_touch_action_change, mir_touch_tooltype_unknown,
178
178
                   10, 10, 10 /* x, y, pressure*/,
179
179
                   1, 1, 10 /* touch major, minor, size */);
195
195
    setIrrelevantMockWindowSystemExpectations();
196
196
 
197
197
    // touch 0 disappeared and touch 2 got pressed
198
 
    auto ev3 = mev::make_event(MirInputDeviceId(), std::chrono::milliseconds(125), 0);
 
198
    auto ev3 = mev::make_event(MirInputDeviceId(), 125*1000000, 0);
199
199
    mev::add_touch(*ev3, 1 /* touch ID */, mir_touch_action_change, mir_touch_tooltype_unknown,
200
200
                   20, 20, 10 /* x, y, pressure*/,
201
201
                   1, 1, 10 /* touch major, minor, size */);
235
235
                                                              Contains(AllOf(HasId(0),
236
236
                                                                             IsPressed()))),_)).Times(1);
237
237
 
238
 
    auto ev1 = mev::make_event(MirInputDeviceId(), std::chrono::milliseconds(123), 0);
 
238
    auto ev1 = mev::make_event(MirInputDeviceId(), 123*1000000, 0);
239
239
    mev::add_touch(*ev1, /* touch ID */ 0, mir_touch_action_down, mir_touch_tooltype_unknown,
240
240
                   10, 10, 10, 1, 1, 10);
241
241
    qtEventFeeder->dispatch(*ev1);
248
248
                                                              Contains(AllOf(HasId(0), StateIsMoved()))
249
249
                                                             ),_)).Times(1);
250
250
 
251
 
    auto ev2 = mev::make_event(MirInputDeviceId(), std::chrono::milliseconds(123), 0);
 
251
    auto ev2 = mev::make_event(MirInputDeviceId(), 123*1000000, 0);
252
252
    mev::add_touch(*ev2, /* touch ID */ 0, mir_touch_action_down, mir_touch_tooltype_unknown,
253
253
                   10, 10, 10, 1, 1, 10);
254
254
    qtEventFeeder->dispatch(*ev2);