~vanvugt/mir/ddouble

« back to all changes in this revision

Viewing changes to tests/unit-tests/scene/test_abstract_shell.cpp

  • Committer: Daniel van Vugt
  • Date: 2015-05-13 03:09:17 UTC
  • mfrom: (2094.3.475 development-branch)
  • Revision ID: daniel.van.vugt@canonical.com-20150513030917-xduzl43wetz7nr46
Merge latest trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
132
132
        ON_CALL(surface_factory, create_surface(_,_))
133
133
            .WillByDefault(Return(mt::fake_shared(mock_surface)));
134
134
    }
 
135
 
 
136
    std::chrono::nanoseconds const event_timestamp = std::chrono::nanoseconds(0);
135
137
};
136
138
}
137
139
 
239
241
 
240
242
TEST_F(AbstractShell, key_input_events_are_handled_by_window_manager)
241
243
{
242
 
    int64_t const timestamp{0};
243
244
    MirKeyboardAction const action{mir_keyboard_action_down};
244
245
    xkb_keysym_t const key_code{0};
245
246
    int const scan_code{0};
247
248
 
248
249
    auto const event = mir::events::make_event(
249
250
        mir_input_event_type_key,
250
 
        timestamp,
 
251
        event_timestamp,
251
252
        action,
252
253
        key_code,
253
254
        scan_code,
263
264
 
264
265
TEST_F(AbstractShell, touch_input_events_are_handled_by_window_manager)
265
266
{
266
 
    int64_t const timestamp{0};
267
267
    MirInputEventModifiers const modifiers{mir_input_event_modifier_none};
268
268
 
269
269
    auto const event = mir::events::make_event(
270
270
        mir_input_event_type_touch,
271
 
        timestamp,
 
271
        event_timestamp,
272
272
        modifiers);
273
273
 
274
274
    EXPECT_CALL(*wm, handle_touch_event(_))
281
281
 
282
282
TEST_F(AbstractShell, pointer_input_events_are_handled_by_window_manager)
283
283
{
284
 
    int64_t const timestamp{0};
285
284
    MirInputEventModifiers const modifiers{mir_input_event_modifier_none};
286
285
    MirPointerAction const action{mir_pointer_action_button_down};
287
286
    std::vector<MirPointerButton> const buttons_pressed{mir_pointer_button_primary};
292
291
 
293
292
    auto const event = mir::events::make_event(
294
293
        mir_input_event_type_pointer,
295
 
        timestamp,
 
294
        event_timestamp,
296
295
        modifiers,
297
296
        action,
298
297
        buttons_pressed,