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

Iframe fixture: ensure that element is measured before layout #32625

Merged
merged 2 commits into from
Feb 12, 2021

Conversation

dvoytenko
Copy link
Contributor

No description provided.

const resource = resources.getResourceForElementOptional(
element
);
if (resource) {
Copy link
Member

Choose a reason for hiding this comment

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

when won't there be a resource?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not a real thing per se. But happens in tests, when a tested element doesn't have a resource. TBH, I'd like to fix all those odd tests, but don't have time right now.

Copy link
Member

Choose a reason for hiding this comment

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

Thank you for explaining! Agreed. So many oddities + impossible situations within tests

@dvoytenko dvoytenko merged commit e86cc83 into ampproject:master Feb 12, 2021
@dvoytenko dvoytenko deleted the fixes/measure-iframe-fixture branch February 12, 2021 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants