Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[fuchsia][scenic] Accept Uint64 values in timestamp for pointerinjector. #34888

Merged
merged 1 commit into from
Jul 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ bool PointerInjectorDelegate::HandlePlatformMessage(
}

auto timestamp = args.FindMember("timestamp");
if (!timestamp->value.IsInt()) {
if (!timestamp->value.IsInt() && !timestamp->value.IsUint64()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Any unit test we can add for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We already have some unittests in pointerinjector_delegate_unittest.cc which check this code path.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually those were added as part of the previous PR (#34692). This was a minor bug which I discovered while doing some manual testing on estelle.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see, thanks, sorry for not checking first.

FML_LOG(ERROR) << "Argument 'timestamp' is not a int";
return false;
}
Expand Down