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

Test that RT entries are created at the right time for iframes #32490

Merged
merged 3 commits into from Jan 25, 2022

Conversation

noamr
Copy link
Contributor

@noamr noamr commented Jan 21, 2022

Copy link
Contributor

@yoavweiss yoavweiss left a comment

Choose a reason for hiding this comment

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

Looks good! One question about the 500ms number

const entries = performance.getEntriesByName(iframe.src);
const navigationEntry = iframe.contentWindow.performance.getEntriesByType('navigation')[0];
assert_equals(entries.length, 1);
assert_greater_than(performance.now(), entries[0].responseEnd + 500);
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is "500" coming from? Can you put it in a constant with a meaningful name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made it clearer in the test.

Copy link
Contributor

@yoavweiss yoavweiss left a comment

Choose a reason for hiding this comment

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

LGTM

@noamr noamr merged commit 7466236 into master Jan 25, 2022
@noamr noamr deleted the iframe-sequence branch January 25, 2022 08:32
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

4 participants