Closed Bug 1462879 Opened 7 years ago Closed 6 years ago

PerformanceNavigationTiming must be notified correctly

Categories

(Core :: DOM: Core & HTML, enhancement, P2)

58 Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: baku, Assigned: baku)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

https://w3c.github.io/navigation-timing/#processing-model The spec says that: [...] 2. "Create a new PerformanceNavigationTiming object and add it to the performance entry buffer." This makes the entry immediately available via getEntries() [...] After the load event ends: 28. "Queue the new PerformanceNavigationTiming object."
Attached patch part 1 - NotifySplinter Review
Attachment #8979001 - Flags: review?(valentin.gosu)
Attachment #8979001 - Flags: review?(bugs)
Comment on attachment 8979001 [details] [diff] [review] part 1 - Notify Review of attachment 8979001 [details] [diff] [review]: ----------------------------------------------------------------- Looks good!
Attachment #8979001 - Flags: review?(valentin.gosu) → review+
Attachment #8979001 - Attachment description: performance2.patch → part 1 - Notify
Before, PerformanceNavigationTiming.name was always 'document'. Now it contains the URL of the document. This must be considered in getEntriesByName(). In addition, it's possible to have multiple entries with the same name. This bug is needed to fix some WPTs.
Attachment #8979008 - Flags: review?(valentin.gosu)
Comment on attachment 8979008 [details] [diff] [review] part 2 - getEntriesByName Review of attachment 8979008 [details] [diff] [review]: ----------------------------------------------------------------- r+, it you really did want me to review it, not bz :)
Attachment #8979008 - Flags: review?(valentin.gosu) → review+
Comment on attachment 8979009 [details] [diff] [review] part 3 - Update the channel properties before notify Review of attachment 8979009 [details] [diff] [review]: ----------------------------------------------------------------- ::: testing/web-platform/tests/navigation-timing/nav2_test_attributes_values.html @@ +93,5 @@ > // running this test. > assert_true(entries[0].transferSize > entries[0].encodedBodySize, > "Expected transferSize to be greater than encodedBodySize in uncached navigation."); > + assert_equals(entries[0].encodedBodySize, 5272); > + assert_equals(entries[0].decodedBodySize, 5272); Do these tests pass in other browsers?
Attachment #8979009 - Flags: review?(valentin.gosu) → review+
> Do these tests pass in other browsers? The size changed because I had to change the URL for the comparison with PerformanceNavigationTiming.name
Attachment #8979001 - Flags: review?(bugs) → review+
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/f3058ee77146 PerformanceNavigationTiming must be notified correctly, r=valentin, r=smaug https://hg.mozilla.org/integration/mozilla-inbound/rev/2f2b2965aa89 Performance.getEntriesByName must consider the PerformanceNavigationTiming name, r=valentin https://hg.mozilla.org/integration/mozilla-inbound/rev/1b3a818279f3 Update the channel properties before notify, r=valentin
Depends on: 1464135
Flags: needinfo?(amarchesini)
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/4e171db33014 PerformanceNavigationTiming must be notified correctly, r=valentin, r=smaug https://hg.mozilla.org/integration/mozilla-inbound/rev/e5ae7c2df4a4 Performance.getEntriesByName must consider the PerformanceNavigationTiming name, r=valentin https://hg.mozilla.org/integration/mozilla-inbound/rev/ae1bf2d218bb Update the channel properties before notify, r=valentin
Backed out 3 changesets (bug 1462879) for failing mochitests on Android at dom/tests/mochitest/general/test_resource_timing.htm Backout: https://hg.mozilla.org/integration/mozilla-inbound/rev/6a7c05d39fdfb5082565fb076f051a4437f813aa Failure push: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=ae1bf2d218bb2db3d1438cbf492a772e6eb5ec82 Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=183242346&repo=mozilla-inbound&lineNumber=1671 [task 2018-06-15T00:06:08.789Z] 00:06:08 INFO - 350 INFO TEST-PASS | dom/tests/mochitest/general/test_resource_timing.html | http://mochi.test:8888/tests/image/test/mochitest/damon.jpg should be a valid entry name [task 2018-06-15T00:06:08.789Z] 00:06:08 INFO - Buffered messages finished [task 2018-06-15T00:06:08.789Z] 00:06:08 INFO - 351 INFO TEST-UNEXPECTED-FAIL | dom/tests/mochitest/general/test_resource_timing.html | This iframe should contain itself only once [task 2018-06-15T00:06:08.789Z] 00:06:08 INFO - ok@dom/tests/mochitest/general/resource_timing_main_test.html:55:3 [task 2018-06-15T00:06:08.789Z] 00:06:08 INFO - doTest@dom/tests/mochitest/general/resource_timing_iframe.html:32:3 [task 2018-06-15T00:06:08.789Z] 00:06:08 INFO - onload@dom/tests/mochitest/general/resource_timing_iframe.html:1:1
Flags: needinfo?(amarchesini)
What blocks the landing of this patches is a failure on android. It seems that the nsIChannel doesn't have the correct url spec, in iframes, when onload is triggered. The name is taken here: https://searchfox.org/mozilla-central/rev/285da1fd7dcf67448b9175741fa330158edcff73/dom/performance/PerformanceMainThread.cpp#18-39 but somehow, only on android, here we have 'document' instead of the correct iframe URL: https://searchfox.org/mozilla-central/rev/285da1fd7dcf67448b9175741fa330158edcff73/dom/tests/mochitest/general/resource_timing_iframe.html#30-33
Flags: needinfo?(amarchesini)
Priority: -- → P2
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/d36901e8058e PerformanceNavigationTiming must be notified correctly - part 1 - notify, r=smaug, r=valentin https://hg.mozilla.org/integration/mozilla-inbound/rev/c4fae17b04a6 PerformanceNavigationTiming must be notified correctly - part 2 - getEntryByName, r=valentin https://hg.mozilla.org/integration/mozilla-inbound/rev/cb557622b966 PerformanceNavigationTiming must be notified correctly - part 3 - Update the channel properties before notify, r=valentin
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: