Auto merge of #23536 - gatoWololo:omar_timing_entries, r=jdm

Let resources timing entries be added to performance entry buffer.

<!-- Please describe your changes on the following line: -->
Update relevant tests to properly report and expect failure.

These changes are the first step for #23328. Not sure if I would say they _fix_ the issue.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [X] There are tests for these changes: Existing tests have been updated to expect pass/failures.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23536)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2019-06-24 10:48:39 -04:00 committed by GitHub
commit 7490dd6f0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 92 additions and 70 deletions

View file

@ -62,7 +62,7 @@ pub fn submit_timing_data(
PerformanceResourceTiming::new(global, url, initiator_type, None, resource_timing);
global
.performance()
.queue_entry(performance_entry.upcast::<PerformanceEntry>(), false);
.queue_entry(performance_entry.upcast::<PerformanceEntry>(), true);
}
impl<Listener: PreInvoke + Send + 'static> NetworkListener<Listener> {

View file

@ -0,0 +1,4 @@
[avoid-reload-on-resize.html]
[Avoid srcset image reloads when viewport resizes]
expected: FAIL

View file

@ -9,6 +9,3 @@
[case-sensitivity.any.html]
type: testharness
[getEntriesByName values are case sensitive]
expected: FAIL

View file

@ -70,9 +70,6 @@
[PerformanceResourceTiming interface: resource must inherit property "workerStart" with the proper type]
expected: FAIL
[PerformanceResourceTiming interface: resource must inherit property "initiatorType" with the proper type]
expected: FAIL
[PerformanceResourceTiming interface: attribute transferSize]
expected: FAIL
@ -82,66 +79,36 @@
[PerformanceResourceTiming interface: resource must inherit property "secureConnectionStart" with the proper type]
expected: FAIL
[PerformanceResourceTiming interface: resource must inherit property "requestStart" with the proper type]
expected: FAIL
[PerformanceResourceTiming interface: resource must inherit property "transferSize" with the proper type]
expected: FAIL
[PerformanceResourceTiming interface: resource must inherit property "domainLookupStart" with the proper type]
expected: FAIL
[PerformanceResourceTiming interface: resource must inherit property "connectStart" with the proper type]
expected: FAIL
[PerformanceResourceTiming interface: attribute decodedBodySize]
expected: FAIL
[Stringification of resource]
expected: FAIL
[PerformanceResourceTiming interface: resource must inherit property "redirectStart" with the proper type]
expected: FAIL
[PerformanceResourceTiming interface: resource must inherit property "toJSON()" with the proper type]
expected: FAIL
[PerformanceResourceTiming interface: resource must inherit property "responseEnd" with the proper type]
expected: FAIL
[PerformanceResourceTiming interface: resource must inherit property "redirectEnd" with the proper type]
expected: FAIL
[PerformanceResourceTiming interface: resource must inherit property "nextHopProtocol" with the proper type]
expected: FAIL
[PerformanceResourceTiming interface: resource must inherit property "domainLookupEnd" with the proper type]
expected: FAIL
[PerformanceResourceTiming interface: resource must inherit property "decodedBodySize" with the proper type]
expected: FAIL
[PerformanceResourceTiming interface: resource must inherit property "fetchStart" with the proper type]
expected: FAIL
[PerformanceResourceTiming interface: attribute encodedBodySize]
expected: FAIL
[PerformanceResourceTiming interface: resource must inherit property "connectEnd" with the proper type]
expected: FAIL
[PerformanceResourceTiming interface: resource must inherit property "encodedBodySize" with the proper type]
expected: FAIL
[PerformanceResourceTiming interface: operation toJSON()]
expected: FAIL
[PerformanceResourceTiming interface: resource must inherit property "responseStart" with the proper type]
expected: FAIL
[PerformanceResourceTiming must be primary interface of resource]
expected: FAIL
[PerformanceResourceTiming interface: attribute secureConnectionStart]
expected: FAIL

View file

@ -0,0 +1,4 @@
[no-entries-for-cross-origin-css-fetched.sub.html]
[Make sure that resources fetched by cross origin CSS are not in the timeline.]
expected: FAIL

View file

@ -5,27 +5,15 @@
[domainLookupEnd should not be 0 in timing-allow cross-origin request.]
expected: FAIL
[connectStart should not be 0 in timing-allow cross-origin request.]
expected: FAIL
[connectEnd should not be 0 in timing-allow cross-origin request.]
expected: FAIL
[requestStart should not be 0 in timing-allow cross-origin request.]
expected: FAIL
[responseStart should not be 0 in timing-allow cross-origin request.]
expected: FAIL
[fetchStart should not be 0 in timing-allow cross-origin request.]
expected: FAIL
[responseEnd should not be 0 in timing-allow cross-origin request.]
expected: FAIL
[redirectEnd should be 0 in cross-origin request since no redirect.]
expected: FAIL
[secureConnectionStart should be 0 in cross-origin request since no ssl!]
expected: FAIL
[The iframe should have one resource timing entry.]
expected: FAIL

View file

@ -1,10 +1,4 @@
[resource_TAO_zero.htm]
[fetchStart should be greater than 0 in cross-origin request.]
expected: FAIL
[responseEnd should be greater than 0 in cross-origin request.]
expected: FAIL
[secureConnectionStart should be 0 in cross-origin request.]
expected: FAIL
@ -17,3 +11,15 @@
[redirectEnd should be 0 in cross-origin request.]
expected: FAIL
[connectEnd should be 0 in cross-origin request.]
expected: FAIL
[connectStart should be 0 in cross-origin request.]
expected: FAIL
[There should be one resource timing entry.]
expected: FAIL
[requestStart should be 0 in cross-origin request.]
expected: FAIL

View file

@ -2,3 +2,18 @@
[There should be 2 PerformanceEntries]
expected: FAIL
[domainLookupEnd and fetchStart should be the same]
expected: FAIL
[connectStart and fetchStart should be the same]
expected: FAIL
[domainLookupStart and fetchStart should be the same]
expected: FAIL
[secureConnectionStart should be zero]
expected: FAIL
[connectEnd and fetchStart should be the same]
expected: FAIL

View file

@ -2,3 +2,18 @@
[There should be 2 PerformanceEntries]
expected: FAIL
[secureConnectionStart and fetchStart should be the same]
expected: FAIL
[domainLookupEnd and fetchStart should be the same]
expected: FAIL
[connectStart and fetchStart should be the same]
expected: FAIL
[domainLookupStart and fetchStart should be the same]
expected: FAIL
[connectEnd and fetchStart should be the same]
expected: FAIL

View file

@ -2,3 +2,18 @@
[There should be 2 PerformanceEntries]
expected: FAIL
[secureConnectionStart and fetchStart should be the same]
expected: FAIL
[domainLookupEnd and fetchStart should be the same]
expected: FAIL
[connectStart and fetchStart should be the same]
expected: FAIL
[domainLookupStart and fetchStart should be the same]
expected: FAIL
[connectEnd and fetchStart should be the same]
expected: FAIL

View file

@ -2,3 +2,18 @@
[There should be 2 PerformanceEntries]
expected: FAIL
[secureConnectionStart and fetchStart should be the same]
expected: FAIL
[domainLookupEnd and fetchStart should be the same]
expected: FAIL
[connectStart and fetchStart should be the same]
expected: FAIL
[domainLookupStart and fetchStart should be the same]
expected: FAIL
[connectEnd and fetchStart should be the same]
expected: FAIL

View file

@ -1,4 +0,0 @@
[resource_dedicated_worker.html]
[There should be six entries: 4 scripts, 1 stylesheet, and the worker itself]
expected: FAIL

View file

@ -15,9 +15,6 @@
[PerformanceEntry has correct protocol attribute (iframe)]
expected: FAIL
[window.performance.getEntriesByName() and window.performance.getEntriesByNameType() return same data (img)]
expected: FAIL
[PerformanceEntry has correct name, initiatorType, startTime, and duration (img)]
expected: FAIL

View file

@ -51,9 +51,6 @@
[PerformanceEntry has correct protocol attribute (xmlhttprequest)]
expected: FAIL
[window.performance.getEntriesByName() and window.performance.getEntriesByNameType() return same data (img)]
expected: FAIL
[PerformanceEntry has correct order of timing attributes (script)]
expected: FAIL

View file

@ -18,3 +18,9 @@
[performance.toJSON is available in workers]
expected: FAIL
[performance.clearResourceTimings in workers]
expected: FAIL
[performance.setResourceTimingBufferSize in workers]
expected: FAIL

View file

@ -19679,7 +19679,7 @@
"support"
],
"mozilla/xmlhttprequest_url.html": [
"e5d10f27c06e1febd3bb70f8f128194fc3f63861",
"3a765c1e45b0ff25d9161e70f2ad0718769a4cdb",
"testharness"
],
"webxr/create_session.html": [

View file

@ -19,7 +19,7 @@ async_test(function(t) {
request.onload = t.step_func_done(function() {
let entries = window.performance.getEntriesByType("resource");
assert_equals(entries.length, 1);
assert_equals(entries.length, 3);
assert_equals(entries[0].name, href);
});
}, "Performance entries should contain the URL where the XMLHttpRequest originated");