Last Comment Bug 668513 - W3C Test failures for NavigationTiming: type and redirects
: W3C Test failures for NavigationTiming: type and redirects
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All Other
: -- normal (vote)
: ---
Assigned To: Igor Bazarny
:
: Andrew Overholt [:overholt]
Mentors:
Depends on: 570341
Blocks: 554045
  Show dependency treegraph
 
Reported: 2011-06-30 08:21 PDT by Igor Bazarny
Modified: 2011-09-23 19:28 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Tests and fixes for navigation type and redirect count (8.88 KB, patch)
2011-06-30 09:08 PDT, Igor Bazarny
bugs: review+
Details | Diff | Splinter Review

Description Igor Bazarny 2011-06-30 08:21:40 PDT
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.24 Safari/535.1

Steps to reproduce:

1. visit http://w3c-test.org/webperf/tests/approved/test_navigation_type_backforward.htm 
  - In this test, the page in the iframe is navigated to through a script operation (document.location.href=). The correct navigation
    type should be TYPE_NAVIGATE. Right now it's detected as TYPE_RESERVED.

2. visit http://w3c-test.org/webperf/tests/approved/test_timing_attributes_order.htm
  - It has the same failure as above when detecting the transition type.

3. visit http://w3c-test.org/webperf/tests/approved/test_timing_client_redirect.htm
  - The page is navigated to using a client meta-refresh redirect, so it's navigation type should be TYPE_NAVIGATE instead of
    TYPE_RESERVED.

4. http://w3c-test.org/webperf/tests/approved/test_timing_server_redirect.htm
  - This is a server redirect within the same origin so the redirection count should be 1. Right now it's returnning 0.



Actual results:

1, 2, 3: navigation.type is TYPE_RESERVED
4: redirectCount is 0


Expected results:

1, 2, 3: navigation.type is TYPE_NAVIGATE
4: redirectCount is 1
Comment 1 Igor Bazarny 2011-06-30 09:08:06 PDT
Created attachment 543152 [details] [diff] [review]
Tests and fixes for navigation type and redirect count

Tests and 2 small changes in implementation:
- Change in navigation type conversion
- Added field to store redirect count
Related W3C tests now pass
Comment 2 Olli Pettay [:smaug] 2011-07-03 12:32:36 PDT
Comment on attachment 543152 [details] [diff] [review]
Tests and fixes for navigation type and redirect count

Btw, do we have tests for location.replace handling?
If I read the code correctly, that would end up using
LOAD_STOP_CONTENT_AND_REPLACE.

Does the spec say anything about replace?
Comment 3 Christian :Biesinger (don't email me, ping me on IRC) 2011-07-04 02:36:11 PDT
http://hg.mozilla.org/mozilla-central/rev/df4ec91d0b0a

I'll let Igor answer the question in the last comment.
Comment 4 Igor Bazarny 2011-07-04 05:26:16 PDT
No, we don't have tests for location.replace and if load type is LOAD_STOP_CONTENT_AND_REPLACE we will get wrong navigation type, as spec says 'TYPE_NAVIGATE: Navigation started by ... initializing through a script operation other than the ones used by TYPE_RELOAD and TYPE_BACK_FORWARD'
We need a test and follow-up bug for that. thanks.
Comment 5 Olli Pettay [:smaug] 2011-07-04 05:37:42 PDT
(In reply to comment #4)
> We need a test and follow-up bug for that.
Could you please file the bug.
It should be easy to fix that one :)

Note You need to log in before you can comment on or make changes to this bug.