mirror of
https://github.com/servo/servo.git
synced 2025-10-01 00:59:15 +01:00
refactored performance timing to align with updated spec
refactoring with ResourceFetchMetadata implemented deprecated window.timing functionality created ResourceTimingListener trait fixed w3c links in navigation timing updated include.ini to run resource timing tests on ci
This commit is contained in:
parent
3fe83f1d06
commit
26007fddd3
103 changed files with 1881 additions and 322 deletions
|
@ -27064,7 +27064,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"mozilla/interfaces.html": [
|
||||
"b1de57409ad5e6f9fedeb8a34c9474b4e378ec0a",
|
||||
"ad17e930ddb5bc2daecb86216efe8885ae399173",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/interfaces.js": [
|
||||
|
@ -27072,7 +27072,7 @@
|
|||
"support"
|
||||
],
|
||||
"mozilla/interfaces.worker.js": [
|
||||
"fbd6e92c097dea4f99924de219c9f6aa07a45282",
|
||||
"a5f2e00f234ea66b80e8a9bd4dbbc5433926191f",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/invalid-this.html": [
|
||||
|
@ -32904,11 +32904,11 @@
|
|||
"testharness"
|
||||
],
|
||||
"mozilla/window_performance.html": [
|
||||
"6b96c18b3cdef8b8bce294f1b45ce09192b00cd0",
|
||||
"690870b7080e179481ca0255f7c30337e8b6636a",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/window_performance_topLevelDomComplete.html": [
|
||||
"ce2431a7279e7cefa9e8032edabe276ac5deb227",
|
||||
"50bbc2917b5ac900b5061a0b2c30b6c1fef1067e",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/window_requestAnimationFrame.html": [
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[window_performance.html]
|
||||
[window_performance]
|
||||
expected: FAIL
|
||||
|
|
@ -181,10 +181,11 @@ test_interfaces([
|
|||
"PerformanceEntry",
|
||||
"PerformanceMark",
|
||||
"PerformanceMeasure",
|
||||
"PerformanceNavigationTiming",
|
||||
"PerformanceObserver",
|
||||
"PerformanceObserverEntryList",
|
||||
"PerformancePaintTiming",
|
||||
"PerformanceTiming",
|
||||
"PerformanceResourceTiming",
|
||||
"Plugin",
|
||||
"PluginArray",
|
||||
"PopStateEvent",
|
||||
|
|
|
@ -39,6 +39,7 @@ test_interfaces([
|
|||
"PerformanceObserver",
|
||||
"PerformanceObserverEntryList",
|
||||
"PerformancePaintTiming",
|
||||
"PerformanceResourceTiming",
|
||||
"ProgressEvent",
|
||||
"PromiseRejectionEvent",
|
||||
"Request",
|
||||
|
|
|
@ -11,9 +11,13 @@ test(function() {
|
|||
assert_true(window.performance instanceof Performance, "Should be Performance");
|
||||
|
||||
assert_not_equals(window.performance.timing, undefined);
|
||||
assert_true(window.performance.timing instanceof PerformanceTiming, "Should be PerformanceTiming");
|
||||
|
||||
assert_greater_than(window.performance.timing.navigationStart, 0);
|
||||
var entries = window.performance.getEntries();
|
||||
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);
|
||||
|
||||
var last = window.performance.now();
|
||||
assert_greater_than(last, 0);
|
||||
|
|
|
@ -1,18 +1,23 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Performance toLevelDomComplete</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Performance topLevelDomComplete</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<body>
|
||||
<script>
|
||||
async_test(function(t) {
|
||||
window.onload = t.step_func(function() {
|
||||
assert_true(performance.timing.domLoading <= performance.timing.topLevelDomComplete);
|
||||
assert_true(performance.timing.topLevelDomComplete <= performance.timing.domComplete);
|
||||
t.done();
|
||||
});
|
||||
}, "performance.topLevelDomComplete");
|
||||
async_test(function (t) {
|
||||
window.onload = t.step_func(function (entryList, obs) {
|
||||
var entries = window.performance.getEntries();
|
||||
assert_greater_than(entries.length, 0);
|
||||
var navigation = entries[0];
|
||||
assert_true(navigation instanceof PerformanceNavigationTiming);
|
||||
|
||||
assert_true(navigation.domContentLoadedEventStart <= navigation.topLevelDomComplete);
|
||||
assert_true(navigation.topLevelDomComplete <= navigation.domComplete);
|
||||
|
||||
t.done();
|
||||
});
|
||||
}, "top level dom complete");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue