Launch the stub helper through the view; it publishes one frame. Verify the view connects, paints the copied frame, and does not prematurely end the session.
| 25 | // Launch the stub helper through the view; it publishes one frame. Verify the |
| 26 | // view connects, paints the copied frame, and does not prematurely end the session. |
| 27 | TEST(RasterStreamView, ReceivesAStubFrameAndStaysAlive) { |
| 28 | PJ::RasterStreamView view; |
| 29 | view.resize(320, 200); |
| 30 | QSignalSpy ended(&view, &PJ::RasterStreamView::sessionEnded); |
| 31 | view.start(QStringLiteral(PJ_STUB_HELPER_PATH), QStringLiteral("/dev/null")); |
| 32 | |
| 33 | bool received_frame = false; |
| 34 | for (int attempt = 0; attempt < 60 && !received_frame; ++attempt) { |
| 35 | QTest::qWait(50); |
| 36 | received_frame = hasPaintedStubFrame(view); |
| 37 | } |
| 38 | |
| 39 | EXPECT_TRUE(received_frame); |
| 40 | EXPECT_EQ(ended.count(), 0); |
| 41 | } |
| 42 | |
| 43 | } // namespace |
| 44 |
nothing calls this directly
no test coverage detected