Add start_time to resource timing.

This commit is contained in:
Tommy Lincoln 2019-10-15 03:06:43 -07:00
parent 1f64024655
commit fcad88cddd
8 changed files with 280 additions and 15 deletions

View file

@ -19634,7 +19634,7 @@
"testharness"
],
"mozilla/window_performance.html": [
"690870b7080e179481ca0255f7c30337e8b6636a",
"302073e8041763102d678326509d7ef0a1fb5c79",
"testharness"
],
"mozilla/window_performance_topLevelDomComplete.html": [

View file

@ -1,4 +0,0 @@
[window_performance.html]
[window_performance]
expected: FAIL

View file

@ -16,8 +16,13 @@ test(function() {
assert_not_equals(entries.length, 0);
assert_true(entries[0] instanceof PerformanceNavigationTiming);
// TODO(#21254) navigationTiming/startTime is not fully implemented yet, so this assertion will fail
assert_greater_than(entries[0].startTime, 0);
/* PerformanceResourceTiming */
var resourceEntries = window.performance.getEntriesByType("resource");
assert_not_equals(resourceEntries.length, 0);
assert_true(resourceEntries[0] instanceof PerformanceResourceTiming);
// no redirects => 0 < startTime == fetchStart
assert_greater_than(resourceEntries[0].startTime, 0);
assert_equals(resourceEntries[0].startTime, resourceEntries[0].fetchStart);
var last = window.performance.now();
assert_greater_than(last, 0);