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

Added navigation-timing/nav2_test_redirect_chain_xserver_final_original_origin #25679

Conversation

nicjansma
Copy link
Contributor

Adds a test that:

  • starts from a page on web-platform.test/...
  • iframe added for www.web-platform.test/... (cross origin)
  • which redirects to www.web-platform.test/... (cross origin)
  • which redirects to web-platform.test/... (same as original origin)

In this case, because of the cross-origin redirects, redirectCount, redirectStart and redirectEnd should all be 0.

@nicjansma
Copy link
Contributor Author

CC @yoavweiss @npm1

Copy link
Contributor

@npm1 npm1 left a comment

Choose a reason for hiding this comment

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

Looks great!

@npm1 npm1 merged commit 857d102 into web-platform-tests:master Sep 22, 2020
@nicjansma nicjansma deleted the navigation-timing/nav2_test_redirect_chain_xserver_final_original_origin branch September 22, 2020 23:09
@sefeng211
Copy link
Contributor

Question: redirect-opt-in.py sets TAO header for the cross-origin redirects, shouldn't it allow timings to be returned?

@npm1
Copy link
Contributor

npm1 commented Sep 22, 2021

Looking at the deprecated interface, it seems to imply that the redirects should not be set for cross origin redirects (regardless of TAO). But I don't know where the create the navigation timing entry is called, do you know @yoavweiss or @noamr ?

@noamr
Copy link
Contributor

noamr commented Sep 22, 2021

Looking at the deprecated interface, it seems to imply that the redirects should not be set for cross origin redirects (regardless of TAO). But I don't know where the create the navigation timing entry is called, do you know @yoavweiss or @noamr ?

It is called from the HTML spec.

For navigation timing, redirectCount is set to zero if there are any cross-origin no-cors redirects here.

The resource timing properties (redirectStart and redirectEnd) are handled in FETCH with the same TAO rules as any resource.

@npm1
Copy link
Contributor

npm1 commented Sep 22, 2021

Ok thanks, does that answer your question @sefeng211 ? I also filed w3c/navigation-timing#157 because it is really hard to find answers in this spec now.

@sefeng211
Copy link
Contributor

So er....this test was written based on the deprecated interface, but it should be interpreted based on the current Fetch spec right...Am I misunderstanding something?

If so, should I read it as, it returns 0 because the redirectCount is 0? I am still not sure why we should return 0 for redirectStart in this case.

Sorry! I am having a hard time to understand the spec..

@npm1
Copy link
Contributor

npm1 commented Sep 22, 2021

Ok, so I think the spec is currently following what Resource Timing is doing, which is to set it depending on TAO checks. In particular this test and the spec seem at odds. I filed w3c/navigation-timing#158 to find out the answer, apologies for the mess in this spec!

@noamr
Copy link
Contributor

noamr commented Sep 23, 2021

Ok, so I think the spec is currently following what Resource Timing is doing, which is to set it depending on TAO checks. In particular this test and the spec seem at odds. I filed w3c/navigation-timing#158 to find out the answer, apologies for the mess in this spec!

Right. something is actually missing in the spec. I'm on it, thanks for capturing it.

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.

6 participants