~nick-dedekind/mir/edid-configuration-update

« back to all changes in this revision

Viewing changes to tests/unit-tests/frontend/test_session_mediator.cpp

  • Committer: Tarmac
  • Author(s): Kevin DuBois
  • Date: 2017-02-10 05:33:44 UTC
  • mfrom: (4017.2.2 mir)
  • Revision ID: tarmac-20170210053344-wlbaov4o5zhlv3xn
fix the operation of mirscreencast by making sure the server sends enough information about pixel format so that mirclient can create screencast buffers.

fixes: LP: #1662997. Fixes: https://bugs.launchpad.net/bugs/1662997.

Approved by mir-ci-bot, Daniel van Vugt.

Show diffs side-by-side

added added

removed removed

Lines of Context:
573
573
    mp::ScreencastParameters screencast_parameters;
574
574
    mp::Screencast screencast;
575
575
    auto const& stub_buffer = stub_screencast->stub_buffer;
 
576
    screencast_parameters.set_pixel_format(stub_buffer.pixel_format());
576
577
 
577
578
    EXPECT_CALL(mock_ipc_operations, pack_buffer(_, Ref(stub_buffer), mg::BufferIpcMsgType::full_msg));
578
579
 
580
581
                               &screencast, null_callback.get());
581
582
    EXPECT_EQ(static_cast<int>(stub_buffer.id().as_value()),
582
583
              screencast.buffer_stream().buffer().buffer_id());
 
584
    //LP: #1662997
 
585
    EXPECT_THAT(screencast.buffer_stream().pixel_format(), Eq(stub_buffer.pixel_format()));
583
586
}
584
587
 
585
588
TEST_F(SessionMediator, eventually_partially_packs_screencast_buffer)