Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FrameSubmission: Expand test for Firefox frame storm. #350

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RAOF
Copy link
Contributor

@RAOF RAOF commented Feb 7, 2025

The existing test checks that we don't generate a frame storm, but does not check that we actually send a frame callback, so simply dropping any of these requests on the floor passes.

Add an extra test checking that we actually send these frame callbacks.

The existing test checks that we don't generate a frame storm,
but does *not* check that we actually send a frame callback,
so simply dropping any of these requests on the floor passes.

Add an extra test checking that we actually send these frame
callbacks.
Copy link
Contributor

@AlanGriffiths AlanGriffiths left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of optional nits

@@ -19,6 +19,7 @@
#include "helpers.h"
#include "in_process_server.h"

#include <functional>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new code doesn't seem to need this, so why?

*/
TEST_F(FrameSubmission, frame_requests_without_buffer_are_called_back_eventually)
{
std::array<bool, 5> called = {0};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relying on the implicit conversion to bool seems ugly

Suggested change
std::array<bool, 5> called = {0};
std::array<bool, 5> called{false};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants