Skip to content

Truly independent web browser

Tests/LibMedia: Set read_blocked before it is read by the test

Zaggy10240f66d49ee94d
diff --git a/Tests/LibMedia/TestIncrementallyPopulatedStream.cpp b/Tests/LibMedia/TestIncrementallyPopulatedStream.cpp
index 9ff9e110c75..5048cf8a96e 100644
--- a/Tests/LibMedia/TestIncrementallyPopulatedStream.cpp
+++ b/Tests/LibMedia/TestIncrementallyPopulatedStream.cpp
@@ -400,11 +400,11 @@ TEST_CASE(cursor_blocked_change_handler)
IGNORE_USE_IN_ESCAPING_LAMBDA Atomic<bool> read_succeeded { false };
cursor->set_blocked_change_handler([&](Media::ReadBlocked blocked) {
+ last_state = blocked == Media::ReadBlocked::Yes;
if (blocked == Media::ReadBlocked::Yes)
blocked_count++;
else
unblocked_count++;
- last_state = blocked == Media::ReadBlocked::Yes;
});
auto thread = Threading::Thread::construct("TestBlockHandler"sv, [&, cursor]() -> intptr_t {